/* =========================================================
   Capital K — minimalist private office aesthetic (v7)
   Palette: ivory / midnight / champagne accent
   Typography: Cormorant Garamond + Noto Serif JP (display),
               Inter + Noto Sans JP (body)
   v6: larger body type, tighter prose width, generous rhythm,
       stronger CTA, FAQ + differentiation strip, footer cleanup
   v7: unified type scale (tokens), consistent body sizes &
       line-heights, JA reading rhythm, multi-paragraph ledes,
       visible focus states (a11y)
   ========================================================= */

:root {
  --ivory:       #F8F5EF;
  --paper:       #FFFFFF;
  --midnight:    #0E1B2C;
  --midnight-2:  #16263D;
  --charcoal:    #14181F;          /* darkened from #1A1A1A for contrast */
  --graphite:    #3E434C;          /* darkened from #4A4F58 for contrast */
  --graphite-2:  #5A6068;
  --mist:        #DDD6C8;
  --rule:        #C9BFAB;
  --champagne:   #B8924C;
  --champagne-2: #9C7838;

  --serif:  "Cormorant Garamond", "Noto Serif JP", "Times New Roman", serif;
  --sans:   "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --jp-serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;

  --container: 1180px;
  --prose-max: 720px;              /* per feedback: cap prose 680–760 */
  --gutter: 28px;
  --radius: 2px;
  --shadow: 0 1px 0 rgba(14,27,44,.04), 0 6px 24px rgba(14,27,44,.06);
  --shadow-lg: 0 10px 40px rgba(14,27,44,.12);
  --ease: cubic-bezier(.4,0,.2,1);

  /* ---- Type scale (rem is relative to the 16px root) ----
     One ladder reused everywhere so sizes stay consistent. */
  --fs-label: .8rem;     /* ~13px — uppercase tracked labels (eyebrow, kicker, dt, form span) */
  --fs-sm:    .9375rem;  /* 15px  — list items, secondary links, notes */
  --fs-base:  1rem;      /* 16px  — form fields, default */
  --fs-body:  1.0625rem; /* 17px  — running prose (about, pillars, FAQ answers) */
  --fs-lede:  1.1875rem; /* 19px  — section ledes, hero sub-paragraph */
  --fs-quote: 1.2rem;    /* ~19px — pull-quote / contact intro */

  /* Line-heights: looser for reading prose, tighter for display */
  --lh-body:  1.75;
  --lh-body-ja: 1.95;    /* JA needs more leading (no inter-word spaces) */
  --lh-tight: 1.4;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--charcoal);
  background: var(--ivory);
  line-height: 1.7;                /* loosened from 1.65 */
  font-size: 18px;                 /* desktop body up from 16 */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (max-width: 720px) {
  body { font-size: 17px; line-height: 1.65; }
}
img { max-width: 100%; display: block; }
a { color: var(--midnight); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--champagne-2); }

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---------- Accessible focus (keyboard only) ---------- */
:focus-visible {
  outline: 2px solid var(--champagne-2);
  outline-offset: 3px;
  border-radius: 1px;
}
.btn:focus-visible { outline-offset: 4px; }
/* Don't double-draw on inputs that already show a focused border */
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible { outline-offset: 1px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--midnight);
  margin: 0 0 .5em;
  line-height: 1.18;
}
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) h4 {
  font-family: var(--jp-serif);
  letter-spacing: 0;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 500; }
h3 { font-size: 1.4rem; font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { margin: 0 0 1em; }

.eyebrow,
.kicker {
  font-family: var(--sans);
  font-size: var(--fs-label);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--champagne-2);
  font-weight: 500;
  margin: 0 0 1.2rem;
}
.lede {
  font-size: var(--fs-lede);
  color: var(--graphite);
  max-width: var(--prose-max);
  line-height: var(--lh-body);
}
/* Multi-paragraph ledes (services) render as <p> children */
.lede p { margin: 0 0 .9em; }
.lede p:last-child { margin-bottom: 0; }
:lang(ja) .lede { line-height: var(--lh-body-ja); }
.prose { max-width: var(--prose-max); }
.prose p { font-size: var(--fs-body); color: var(--graphite); line-height: var(--lh-body); }
:lang(ja) .prose p { line-height: var(--lh-body-ja); }
.prose strong { color: var(--midnight); font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 245, 239, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--rule); }

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 88px;
}
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--serif); color: var(--midnight); }
.brand-logo { display: block; height: 56px; width: auto; max-width: 60vw; }
@media (max-width: 600px) {
  .brand-logo { height: 44px; }
}

.primary-nav { margin-left: auto; display: flex; gap: 2rem; }
.primary-nav a {
  font-size: .92rem;
  letter-spacing: .04em;
  color: var(--charcoal);
  position: relative;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--champagne);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.primary-nav a:hover::after { transform: scaleX(1); }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  letter-spacing: .12em;
  color: var(--graphite);
}
.lang-toggle button {
  padding: 4px 6px;
  color: var(--graphite);
  font-weight: 500;
  border-bottom: 1px solid transparent;
}
.lang-toggle button[aria-pressed="true"] {
  color: var(--midnight);
  border-bottom-color: var(--champagne);
}
.lang-toggle .divider { color: var(--rule); }

.nav-burger {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--midnight);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(96px, 14vw, 176px) 0 clamp(96px, 12vw, 152px);
  background: linear-gradient(180deg, var(--ivory) 0%, var(--paper) 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  right: -8%; top: -10%;
  width: 50vw; height: 50vw;
  max-width: 720px; max-height: 720px;
  background: radial-gradient(closest-side, rgba(184,146,76,.10), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 880px; }
.hero-title {
  margin-top: .2em;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.2;
  letter-spacing: 0.005em;
}
.hero-summary {
  font-size: var(--fs-body);
  letter-spacing: .04em;
  color: var(--midnight);
  font-weight: 500;
  margin: 1.6em 0 0;
  max-width: var(--prose-max);
  border-left: 2px solid var(--champagne);
  padding-left: 18px;
  line-height: 1.55;
}
.hero-sub {
  font-size: var(--fs-lede);
  color: var(--graphite);
  max-width: 62ch;
  margin-top: 1.2em;
  line-height: var(--lh-body);
}
:lang(ja) .hero-sub { line-height: var(--lh-body-ja); }
.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 2.6em;
  flex-wrap: wrap;
}
.hero-rule {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}

/* ---------- Differentiation strip ---------- */
.diff-strip {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 28px 0;
}
.diff-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  align-items: start;
}
.diff-item {
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--midnight);
  font-weight: 600;
  text-align: center;
  line-height: 1.5;
}
.diff-item::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--champagne);
  margin: 0 auto 12px;
}
@media (max-width: 880px) {
  .diff-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 480px) {
  .diff-grid { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 36px;               /* larger per feedback */
  font-size: .96rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all .25s var(--ease);
  cursor: pointer;
  min-height: 52px;
}
.btn-primary {
  background: var(--midnight);
  color: var(--ivory);
  border-color: var(--midnight);
  box-shadow: 0 4px 14px rgba(14,27,44,.16);
}
.btn-primary:hover {
  background: var(--champagne-2);
  color: var(--ivory);
  border-color: var(--champagne-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-ghost {
  background: transparent;
  color: var(--midnight);
  border-color: var(--midnight);
}
.btn-ghost:hover {
  background: var(--midnight);
  color: var(--ivory);
  transform: translateY(-2px);
}
@media (max-width: 600px) {
  .btn { padding: 16px 28px; width: 100%; }
}

/* ---------- Section base ---------- */
.section { padding: clamp(88px, 12vw, 152px) 0; }
.section-head { margin-bottom: 4rem; }
.section-head h2 { max-width: var(--prose-max); }
.section-head .lede { margin-top: 1.2rem; }

/* ---------- About ---------- */
.section-about { background: var(--paper); }
.grid-two {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 72px;
  align-items: start;
}

/* Firm Profile — card-based with subtle dividers */
.fact-card {
  background: var(--ivory);
  border: 1px solid var(--rule);
  padding: 40px;
  border-radius: var(--radius);
  position: relative;
}
.fact-card h3 {
  font-size: .9rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--champagne-2);
  font-family: var(--sans);
  font-weight: 600;
  margin: 0 0 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--rule);
}
.facts {
  margin: 0;
  display: grid;
  gap: 0;
}
.facts > div {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 12px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px dashed var(--mist);
}
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts > div:first-child { padding-top: 0; }
.facts dt {
  font-size: var(--fs-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--graphite-2);
  font-weight: 500;
}
.facts dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--midnight);
  line-height: 1.4;
}
:lang(ja) .facts dd { font-family: var(--jp-serif); }

/* ---------- Services ---------- */
.section-services { background: var(--ivory); }
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.pillar {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 48px 36px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  position: relative;
}
.pillar::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--champagne);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.pillar:hover {
  transform: translateY(-6px);
  border-color: var(--champagne);
  box-shadow: var(--shadow);
}
.pillar:hover::before { transform: scaleX(1); }
.pillar-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 300;
  font-style: italic;
  color: var(--champagne);
  line-height: 1;
  margin-bottom: 4px;
}
.pillar h3 { margin: 0; font-size: 1.55rem; }
.pillar p { color: var(--graphite); margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); }
:lang(ja) .pillar p { line-height: var(--lh-body-ja); }
.pillar ul {
  list-style: none;
  margin: auto 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--mist);
  display: grid;
  gap: 10px;
}
.pillar li {
  font-size: var(--fs-sm);
  color: var(--graphite);
  padding-left: 1.4em;
  position: relative;
  line-height: 1.5;
}
.pillar li::before {
  content: "";
  position: absolute;
  left: 0; top: .8em;
  width: 10px; height: 1px;
  background: var(--champagne);
}

/* ---------- FAQ ---------- */
.section-faq { background: var(--paper); }
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  gap: 0;
}
.faq-item {
  border-top: 1px solid var(--rule);
  padding: 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  padding: 24px 4px;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--midnight);
  line-height: 1.4;
  font-weight: 500;
  transition: color .2s var(--ease);
}
:lang(ja) .faq-q { font-family: var(--jp-serif); }
.faq-q:hover { color: var(--champagne-2); }
.faq-icon {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  position: relative;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  background: var(--champagne);
  transition: transform .3s var(--ease);
}
.faq-icon::before { width: 16px; height: 1.5px; transform: translate(-50%, -50%); }
.faq-icon::after  { width: 1.5px; height: 16px; transform: translate(-50%, -50%); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) scaleY(0); }
.faq-a {
  padding: 0 4px 28px;
  color: var(--graphite);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  max-width: 720px;
}
:lang(ja) .faq-a { line-height: var(--lh-body-ja); }
.faq-a p { margin: 0; }

/* ---------- Contact ---------- */
.section-contact { background: var(--ivory); }
.contact-pre {
  text-align: center;
  font-family: var(--serif);
  font-size: var(--fs-quote);
  color: var(--midnight);
  font-style: italic;
  max-width: 640px;
  margin: 0 auto 3rem;
  line-height: 1.55;
}
:lang(ja) .contact-pre { font-family: var(--jp-serif); font-style: normal; }
.contact-form {
  display: grid;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}
.row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.contact-form label { display: grid; gap: 8px; }
.contact-form span {
  font-size: var(--fs-label);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 500;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--charcoal);
  background: var(--paper);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--midnight);
  background: var(--paper);
}
.contact-form textarea { resize: vertical; min-height: 160px; font-family: var(--sans); }
.contact-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
}
.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.form-note {
  font-size: var(--fs-sm);
  color: var(--graphite);
  margin: 0;
  max-width: 42ch;
}
.contact-direct {
  text-align: center;
  margin-top: 3rem;
  color: var(--graphite);
  font-size: var(--fs-sm);
}

/* ---------- Footer (simplified) ---------- */
.site-footer {
  background: var(--midnight);
  color: rgba(248, 245, 239, .85);
  padding: 64px 0 32px;
}
.site-footer .footer-logo {
  display: block;
  height: 52px;
  width: auto;
  margin-bottom: 1rem;
}
.site-footer .footer-legal {
  color: var(--ivory);
  font-size: 0.84rem;
  letter-spacing: .04em;
  opacity: 0.9;
  margin: 0 0 .4rem;
}
.site-footer a { color: rgba(248, 245, 239, .92); }
.site-footer a:hover { color: var(--champagne); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer-contact a { display: block; padding: 3px 0; font-size: var(--fs-sm); }
.footer-contact .footer-h {
  font-size: var(--fs-label);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--champagne);
  font-weight: 500;
  margin: 0 0 12px;
}
.footer-meta { font-size: .88rem; color: rgba(248, 245, 239, .7); margin: 6px 0 0; line-height: 1.6; }
.footer-rule {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(248, 245, 239, .12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.footer-disclaimer {
  font-size: 0.74rem;
  color: rgba(248, 245, 239, .58);
  line-height: 1.7;
  margin: 16px 0 0;
  max-width: 100%;
}
.copy { font-size: .82rem; color: rgba(248, 245, 239, .6); margin: 0; }
@media (max-width: 600px) {
  .site-footer .footer-logo { height: 44px; }
  .footer-rule { flex-direction: column; align-items: flex-start; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .grid-two { grid-template-columns: 1fr; gap: 40px; }
  .pillars { grid-template-columns: 1fr; gap: 24px; }
  .row-two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 88px 0; }
  .section-head { margin-bottom: 3rem; }
}

@media (max-width: 720px) {
  .nav-wrap { gap: .8rem; }
  .nav-burger { display: flex; margin-left: auto; }
  .primary-nav {
    position: absolute;
    top: 88px; left: 0; right: 0;
    background: var(--ivory);
    flex-direction: column;
    gap: 0;
    margin: 0;
    border-bottom: 1px solid var(--rule);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform .3s var(--ease), opacity .25s var(--ease), visibility 0s linear .3s;
    pointer-events: none;
    z-index: -1;
  }
  .primary-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
    transition: transform .3s var(--ease), opacity .25s var(--ease), visibility 0s linear 0s;
  }
  .primary-nav a {
    padding: 18px var(--gutter);
    border-bottom: 1px solid var(--mist);
  }
  .primary-nav a::after { display: none; }
  .lang-toggle { order: 3; }
  .pillar { padding: 36px 28px; }
  .fact-card { padding: 32px 24px; }
  .faq-q { font-size: 1.1rem; padding: 20px 4px; }
  .hero { padding: 80px 0 72px; }
  .hero-summary { font-size: var(--fs-sm); padding-left: 14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}
