/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:       #1a2744;
  --navy-light: #243460;
  --gold:       #c9a84c;
  --gold-light: #e8c97a;
  --white:      #ffffff;
  --off-white:  #f8f7f4;
  --gray-100:   #f2f1ee;
  --gray-300:   #d1cfc9;
  --gray-500:   #8a8880;
  --gray-700:   #4a4845;
  --text:       #2c2b28;
  --radius:     8px;
  --shadow:     0 4px 24px rgba(26,39,68,0.10);
  --shadow-lg:  0 8px 40px rgba(26,39,68,0.16);
  --transition: 0.25s ease;
  --max-width:  1160px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.75;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== CONTAINER ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
  letter-spacing: 0.03em;
}
.btn-primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--gold-light); border-color: var(--gold-light);
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,168,76,0.35);
}
.btn-outline { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline:hover, .btn-outline:focus-visible { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.btn-full { width: 100%; text-align: center; }

/* ===== SECTION COMMON ===== */
.section { padding: 96px 0; }
.section-label {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 12px;
}
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700; color: var(--navy); line-height: 1.4; margin-bottom: 20px;
}
.section-desc { color: var(--gray-500); font-size: 1rem; margin-bottom: 48px; }
.center { text-align: center; }

/* ===== SISTER SITE BANNER ===== */
.sister-banner {
  background: #111827;
  border-bottom: 2px solid #5b8fa8;
  padding: 10px 0;
}
.sister-banner-inner {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
}
.sister-banner-text { font-size: 0.78rem; color: rgba(255,255,255,0.55); }
.sister-banner-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: #5b8fa8; color: #ffffff;
  font-size: 0.78rem; font-weight: 700; padding: 5px 14px;
  border-radius: 20px; transition: background var(--transition); white-space: nowrap;
}
.sister-banner-link:hover { background: #4a7a92; }
.sister-banner-link .sister-icon { font-size: 0.9rem; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy); box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 24px;
}
.logo { display: flex; flex-direction: column; line-height: 1.2; }
.logo-ja {
  font-family: 'Noto Serif JP', serif; font-size: 1.05rem;
  font-weight: 700; color: var(--gold); white-space: nowrap;
}
.logo-en { font-size: 0.65rem; color: var(--gray-300); letter-spacing: 0.04em; white-space: nowrap; }

.main-nav ul { display: flex; align-items: center; gap: 8px; }
.main-nav a {
  color: var(--gray-300); font-size: 0.88rem; padding: 8px 12px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition); white-space: nowrap;
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--white); background: rgba(255,255,255,0.08); }
.btn-nav { background: var(--gold) !important; color: var(--navy) !important; font-weight: 700 !important; padding: 8px 18px !important; }
.btn-nav:hover, .btn-nav:focus-visible { background: var(--gold-light) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 88vh; display: flex; align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, #2d4a8a 100%);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(201,168,76,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 40%);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; padding: 80px 24px; max-width: 760px; }
.hero-sub { font-size: 0.9rem; color: var(--gold); font-weight: 500; letter-spacing: 0.06em; margin-bottom: 20px; }
.hero-title { font-family: 'Noto Serif JP', serif; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; color: var(--white); line-height: 1.35; margin-bottom: 20px; }
.hero-en { font-size: 1rem; color: rgba(255,255,255,0.65); margin-bottom: 40px; font-style: italic; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-langs { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.lang-badge { background: rgba(255,255,255,0.12); color: var(--white); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; border: 1px solid rgba(255,255,255,0.2); }

/* ===== TRUST BAR ===== */
.trust-bar { background: var(--gold); padding: 28px 0; }
.trust-inner { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; }
.trust-item { display: flex; flex-direction: column; align-items: center; padding: 0 40px; gap: 2px; }
.trust-item strong { font-size: 1.8rem; font-weight: 700; color: var(--navy); line-height: 1; }
.trust-item span { font-size: 0.8rem; color: var(--navy); font-weight: 500; }
.trust-divider { width: 1px; height: 40px; background: rgba(26,39,68,0.2); }

/* ===== ABOUT ===== */
.about { background: var(--off-white); }
.about-inner { display: grid; grid-template-columns: 1fr 380px; gap: 64px; align-items: center; }
.about-text p { color: var(--gray-700); margin-bottom: 20px; font-size: 0.97rem; }
.lawyer-card { background: var(--white); border-radius: 16px; padding: 40px 32px; box-shadow: var(--shadow-lg); text-align: center; border-top: 4px solid var(--gold); }
.lawyer-avatar { font-size: 4rem; margin-bottom: 16px; display: block; }
.lawyer-name { font-family: 'Noto Serif JP', serif; font-size: 1.3rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.lawyer-title { font-size: 0.82rem; color: var(--gold); font-weight: 600; letter-spacing: 0.05em; margin-bottom: 20px; }
.lawyer-credentials { text-align: left; display: flex; flex-direction: column; gap: 8px; }
.lawyer-credentials li { font-size: 0.85rem; color: var(--gray-700); padding-left: 16px; position: relative; }
.lawyer-credentials li::before { content: '✓'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* ===== SERVICES ===== */
.services { background: var(--white); }
.service-category {
  font-family: 'Noto Serif JP', serif; font-size: 1.2rem; font-weight: 700; color: var(--navy);
  margin: 56px 0 28px; padding: 16px 24px; background: var(--gray-100);
  border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0;
  display: flex; align-items: center; gap: 12px;
}
.category-icon { font-size: 1.4rem; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.service-card { background: var(--white); border: 1px solid var(--gray-300); border-radius: 12px; padding: 28px 24px; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.service-card.featured { border-color: var(--navy); background: linear-gradient(135deg, var(--off-white) 0%, var(--white) 100%); }
.service-card.featured:hover { border-color: var(--gold); }
.service-icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.service-card h4 { font-family: 'Noto Serif JP', serif; font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.service-en { font-size: 0.75rem; color: var(--gold); font-weight: 600; letter-spacing: 0.04em; margin-bottom: 12px; }
.service-card > p:not(.service-en) { font-size: 0.88rem; color: var(--gray-700); margin-bottom: 16px; line-height: 1.65; }
.service-list { display: flex; flex-direction: column; gap: 6px; }
.service-list li { font-size: 0.82rem; color: var(--gray-700); padding-left: 14px; position: relative; }
.service-list li::before { content: '›'; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* ===== FLOW ===== */
.flow { background: var(--navy); }
.flow .section-label { color: var(--gold); }
.flow .section-title { color: var(--white); }
.flow-steps { display: flex; align-items: flex-start; justify-content: center; gap: 0; flex-wrap: wrap; margin-top: 56px; }
.flow-step { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 32px 24px; text-align: center; flex: 1; min-width: 180px; max-width: 240px; }
.step-number { font-size: 2.5rem; font-weight: 700; color: var(--gold); opacity: 0.4; line-height: 1; margin-bottom: 8px; font-family: 'Playfair Display', serif; }
.step-icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.flow-step h4 { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.flow-step p { font-size: 0.83rem; color: rgba(255,255,255,0.6); line-height: 1.6; }
.flow-arrow { font-size: 1.8rem; color: var(--gold); opacity: 0.5; align-self: center; padding: 0 8px; flex-shrink: 0; }

/* ===== CONTACT ===== */
.contact { background: var(--off-white); }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact-info p { color: var(--gray-700); margin-bottom: 32px; }
.contact-details { display: flex; flex-direction: column; gap: 16px; }
.contact-details li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.92rem; color: var(--gray-700); }
.contact-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.contact-details a { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.contact-details a:hover { color: var(--gold); }
.contact-form { background: var(--white); border-radius: 16px; padding: 40px 36px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.required { color: #c0392b; margin-left: 2px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--gray-300);
  border-radius: var(--radius); font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.92rem; color: var(--text); background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition); outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26,39,68,0.1);
}
.form-group textarea { resize: vertical; }
.form-note { font-size: 0.75rem; color: var(--gray-500); margin-top: 12px; line-height: 1.6; }
.form-consent { margin-bottom: 16px; }
.consent-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 0.82rem !important; font-weight: 400 !important; color: var(--gray-700) !important; line-height: 1.6; }
.consent-label input[type="checkbox"] { width: auto; margin-top: 3px; flex-shrink: 0; accent-color: var(--navy); }
.consent-link { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.consent-link:hover { color: var(--gold); }
.form-disclaimer { font-size: 0.78rem; color: var(--gray-500); background: var(--gray-100); border-left: 3px solid var(--gold); padding: 12px 14px; border-radius: 0 var(--radius) var(--radius) 0; line-height: 1.65; margin-bottom: 20px; }

/* ===== PRIVACY POLICY ===== */
.privacy-policy { background: var(--off-white); border-top: 1px solid var(--gray-300); }
.privacy-inner { max-width: 800px; }
.privacy-intro { color: var(--gray-700); margin-bottom: 40px; font-size: 0.97rem; }
.privacy-block { margin-bottom: 36px; }
.privacy-block h3 { font-family: 'Noto Serif JP', serif; font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--gray-300); }
.privacy-block p { font-size: 0.9rem; color: var(--gray-700); margin-bottom: 10px; line-height: 1.75; }
.privacy-block ul { list-style: disc; padding-left: 20px; margin-bottom: 10px; }
.privacy-block ul li { font-size: 0.9rem; color: var(--gray-700); margin-bottom: 4px; line-height: 1.65; }
.privacy-block a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.privacy-block a:hover { color: var(--gold); }
.privacy-updated { font-size: 0.78rem; color: var(--gray-500); margin-top: 40px; font-style: italic; }

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9000;
  background: var(--navy); border-top: 2px solid var(--gold); padding: 16px 24px;
}
.cookie-banner-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookie-banner p { font-size: 0.82rem; color: rgba(255,255,255,0.8); flex: 1; min-width: 200px; line-height: 1.6; }
.cookie-banner a { color: var(--gold); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn { padding: 8px 20px; border-radius: var(--radius); font-size: 0.82rem; font-weight: 700; cursor: pointer; border: 2px solid transparent; transition: background var(--transition), color var(--transition); }
.cookie-btn-accept { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.cookie-btn-accept:hover { background: var(--gold-light); }
.cookie-btn-decline { background: transparent; color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.3); }
.cookie-btn-decline:hover { border-color: rgba(255,255,255,0.6); color: var(--white); }

/* ===== FOOTER ===== */
.site-footer { background: var(--navy); color: var(--gray-300); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 48px 24px; gap: 32px; flex-wrap: wrap; }
.footer-logo { font-family: 'Noto Serif JP', serif; font-size: 1rem; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.footer-tagline { font-size: 0.78rem; color: rgba(255,255,255,0.4); letter-spacing: 0.06em; }
.footer-nav ul { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { font-size: 0.85rem; color: var(--gray-300); transition: color var(--transition); }
.footer-nav a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 24px; text-align: center; font-size: 0.78rem; color: rgba(255,255,255,0.6); display: flex; flex-direction: column; gap: 4px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; }
  .about-card { max-width: 400px; }
  .contact-inner { grid-template-columns: 1fr; }
  .flow-steps { flex-direction: column; align-items: center; }
  .flow-arrow { transform: rotate(90deg); padding: 4px 0; }
  .flow-step { max-width: 100%; width: 100%; }
}
@media (max-width: 768px) {
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--navy); padding: 16px 24px 24px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  .main-nav a { display: block; width: 100%; }
  .nav-toggle { display: flex; }
  .trust-inner { gap: 0; }
  .trust-item { padding: 12px 20px; }
  .trust-divider { height: 32px; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; padding: 36px 24px; }
  .footer-nav ul { gap: 16px; }
  .cookie-banner-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
  .trust-inner { flex-direction: column; gap: 0; }
  .trust-divider { width: 80px; height: 1px; }
}

/* ===== SKIP LINK ===== */
.skip-link { position: absolute; top: -100%; left: 16px; background: var(--gold); color: var(--navy); padding: 10px 20px; border-radius: 0 0 var(--radius) var(--radius); font-weight: 700; font-size: 0.9rem; z-index: 9999; transition: top 0.2s; }
.skip-link:focus { top: 0; }

/* ===== NETLIFY HONEYPOT ===== */
.hidden { display: none; }

/* ===== FOCUS VISIBLE ===== */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
