/* ============================================
   法律事務所蓮 - style.css
   Design: Deep Teal / Warm Terracotta / Rich Navy
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a6e7a;
  --primary-fg: #e8f4f6;
  --secondary: #b0623a;
  --secondary-fg: #fdf0ea;
  --accent: #2a3a5c;
  --accent-fg: #e0e4ed;
  --foreground: #1a2040;
  --foreground-80: rgba(26, 32, 64, 0.8);
  --foreground-90: rgba(26, 32, 64, 0.9);
  --background: #f5f8fa;
  --muted: #edf1f4;
  --border: #d4dce4;
  --white: #ffffff;
  --radius: 1.2rem;
  --radius-xl: 1.5rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--foreground);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', 'Noto Sans JP', serif;
  font-weight: 700;
  line-height: 1.3;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.narrow { max-width: 960px; }
.medium { max-width: 800px; }
.wide { max-width: 1120px; }

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

/* --- Header --- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
}

.nav-desktop {
  display: none;
  gap: 2rem;
}

.nav-desktop a:hover {
  color: var(--primary);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--foreground);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}

.nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile a:hover {
  color: var(--primary);
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .nav-toggle { display: none; }
}

/* --- Hero Section --- */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 5rem;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.hero-card {
  display: inline-block;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding: 3rem 3.5rem;
  border-radius: var(--radius);
}

.hero-title {
  font-size: 3.2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--foreground-90);
  margin-bottom: 2rem;
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background: var(--background);
  clip-path: polygon(0 50%, 25% 30%, 50% 50%, 75% 30%, 100% 50%, 100% 100%, 0 100%);
  z-index: 5;
}

@media (min-width: 768px) {
  .hero-title { font-size: 4.5rem; }
  .hero-subtitle { font-size: 1.5rem; }
  .hero-card { padding: 3rem 4rem; }
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.875rem 2.5rem;
  border-radius: 9999px;
  font-size: 1.125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn:hover {
  transform: scale(1.05);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
}

.btn-primary:hover {
  background: #15595e;
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-accent:hover {
  background: #1f2d4a;
}

.btn-full {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 1.125rem;
}

/* --- Sections --- */
.section {
  padding: 6rem 0;
}

.section.animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

.bg-white {
  background: var(--white);
}

.bg-gradient {
  background: linear-gradient(180deg, var(--background) 0%, var(--muted) 100%);
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 3rem;
  text-align: center;
}

.color-primary { color: var(--primary); }
.color-secondary { color: var(--secondary); }
.color-accent { color: var(--accent); }

/* --- Cards --- */
.card {
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  overflow: hidden;
}

.card-primary { border-color: rgba(26, 110, 122, 0.3); }
.card-secondary { border-color: rgba(176, 98, 58, 0.3); }
.card-accent { border-color: rgba(42, 58, 92, 0.3); }

.card-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .card { padding: 2.5rem; }
}

/* --- About Section --- */
.about-text {
  font-size: 1.125rem;
  color: var(--foreground-90);
}

.about-text p {
  margin-bottom: 1rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-cta {
  font-weight: 500;
  color: var(--primary);
}

/* --- Services Section --- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  color: var(--foreground-90);
}

.services-col p {
  margin-bottom: 0.5rem;
}

.services-image {
  margin-top: 2rem;
}

.services-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 2px solid rgba(176, 98, 58, 0.2);
}

@media (min-width: 768px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

/* --- Profile Section --- */
.profile-text {
  color: var(--foreground-90);
}

.profile-text p {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.career-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.career-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.career-list {
  color: var(--foreground-90);
}

.career-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.career-date {
  font-weight: 500;
  min-width: 8rem;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .career-item {
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
  }
  .career-date { min-width: auto; }
}

/* --- Access Section --- */
.access-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.info-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.25rem;
  color: var(--primary);
}

.info-label {
  font-weight: 500;
}

.info-value {
  color: var(--foreground-80);
  margin-top: 0.25rem;
}

.access-directions p {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.bullet {
  font-weight: 500;
}

.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  height: 256px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
}

@media (min-width: 768px) {
  .access-grid { grid-template-columns: 1fr 1fr; }
}

/* --- Contact Section --- */
.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-desc {
  font-size: 1.125rem;
  color: var(--foreground-80);
  margin-top: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Lato', 'Noto Sans JP', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--white);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 160px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #a0a8b8;
}

/* --- Footer --- */
#site-footer {
  background: var(--accent);
  color: var(--accent-fg);
  padding: 3rem 0;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  margin-bottom: 1.5rem;
}

.footer-brand h4 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  opacity: 0.9;
}

.footer-info {
  font-size: 0.875rem;
  opacity: 0.8;
}

.footer-info p {
  margin-bottom: 0.5rem;
}

.footer-copy {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-copy p {
  font-size: 0.875rem;
  opacity: 0.7;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: var(--primary-fg);
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  z-index: 100;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* --- Animations --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
