/* Sonari Learning — shared styles */

:root {
  --paper: #F4F1EA;
  --ink: #1C1B19;
  --muted: #4E4A43;
  --soft: #5E5A52;
  --line: #DDD7CB;
  --sand: #E8E1D3;
  --deep: #1F2B28;
  --deep-line: #4A5752;
  --deep-muted: #C9C4B8;
  --accent: #B4532A;
  --accent-dark: #8F3F1E;
  --accent-on-deep: #E9A27F;

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(1.25rem, 6.5vw, 6rem);
  --max: 1248px;
  --section: clamp(4.5rem, 9vw, 8rem);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(3rem, 7vw, 6rem); line-height: 1; }
h2 { font-size: clamp(2.25rem, 4.6vw, 4rem); }
h3 { font-size: clamp(1.6rem, 2.2vw, 2.1rem); }

p { margin: 0; }
ul { margin: 0; padding-left: 1.2rem; }
li + li { margin-top: 0.7rem; }
img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-dark); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1rem; border-radius: var(--radius); z-index: 100;
}
.skip-link:focus { top: 1rem; color: var(--paper); }

/* Layout */

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }
.section--tight-top { padding-top: 0; }
.section--rule { border-top: 1px solid var(--line); }
.section--deep { background: var(--deep); color: var(--paper); }
.section--sand { background: var(--sand); }

.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.stack--lg { gap: 2rem; }

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 6vw, 6rem);
}
.split--offset { grid-template-columns: 5fr 7fr; }
.split--end { align-items: end; }
.split--center { align-items: center; }

.grid-3, .grid-4 { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.head-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

/* Type helpers */

.label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}
.section--deep .label, .band .label { color: var(--accent-on-deep); }

.lede { font-size: clamp(1.15rem, 1.6vw, 1.375rem); line-height: 1.6; color: var(--muted); max-width: 42rem; }
.body-lg { font-size: 1.2rem; line-height: 1.7; color: var(--muted); }
.muted { color: var(--muted); }
.section--deep .muted, .band .muted { color: var(--deep-muted); }
.small { font-size: 0.95rem; color: var(--soft); }
.meta { font-size: 0.95rem; font-weight: 600; color: var(--soft); }

.text-link {
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.accent-link { font-weight: 600; color: var(--accent); }
.accent-link:hover { color: var(--accent-dark); }

/* Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.5rem; padding: 0 1.75rem;
  border-radius: 999px;
  font: 600 1.05rem/1 var(--sans);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Header */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 5.5rem; gap: 1.5rem;
}
.brand { font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.brand:hover { color: var(--ink); }

.nav { display: flex; align-items: center; gap: 2.5rem; font-weight: 500; }
.nav a[aria-current="page"] { border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
.nav .btn { min-height: 3rem; padding: 0 1.5rem; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--ink); border-radius: 999px;
  font: 600 1rem var(--sans); color: var(--ink);
  min-height: 2.75rem; padding: 0 1.1rem; cursor: pointer;
}

/* Hero */

.hero { padding-block: clamp(4.5rem, 9vw, 7.5rem) clamp(3.5rem, 6vw, 5.5rem); }
.hero h1 { max-width: 16ch; }
.signal { margin-top: clamp(2.5rem, 5vw, 4rem); }
.signal svg { width: 100%; height: auto; overflow: visible; }
.signal path {
  stroke: var(--accent);
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: draw 2.4s ease-out 0.3s forwards;
}
.signal-captions {
  display: flex; justify-content: space-between;
  margin-top: 0.75rem; font-size: 0.95rem; font-weight: 600; color: var(--soft);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Clients strip */

.clients { border-block: 1px solid var(--line); }
.clients .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem 3rem; flex-wrap: wrap; padding-block: 2rem;
}
.clients ul {
  list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem 3rem;
  font-family: var(--serif); font-size: clamp(1.4rem, 2vw, 1.75rem); color: var(--muted);
}
.clients li + li { margin-top: 0; }

/* Principles / steps */

.ruled { padding-top: 1.75rem; border-top: 1px solid var(--line); }
.ruled--strong { border-top: 2px solid var(--ink); }
.section--deep .ruled { border-top-color: var(--deep-line); }
.step-num { font-family: var(--serif); font-size: 2.5rem; line-height: 1; color: var(--accent); }

/* Cards */

.card {
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.card .grow { flex-grow: 1; }
.card--outline { background: transparent; }

/* Stats */

.stat-num {
  font-family: var(--serif); line-height: 1; color: var(--accent);
  font-size: clamp(4rem, 7vw, 6.5rem);
}
.stat-title { font-size: 1.25rem; font-weight: 600; }
.stat-block { display: flex; flex-direction: column; gap: 1rem; }
a.stat-block:hover { color: var(--ink); }
a.stat-block:hover .stat-title { text-decoration: underline; text-underline-offset: 4px; }

.stat-bar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--deep); color: var(--paper); border-radius: var(--radius);
}
.stat-bar > div { padding: clamp(1.75rem, 3vw, 3rem) clamp(1.25rem, 2.5vw, 2.5rem); display: flex; flex-direction: column; gap: 0.5rem; }
.stat-bar > div + div { border-left: 1px solid var(--deep-line); }
.stat-bar .stat-num { font-size: clamp(3rem, 5vw, 4.5rem); color: var(--accent-on-deep); }
.stat-bar span:last-child { color: var(--deep-muted); }

/* Quote */

.quote { text-align: center; max-width: 60rem; margin-inline: auto; }
.quote p:first-child { font-family: var(--serif); font-style: italic; font-size: clamp(1.8rem, 3.4vw, 3rem); line-height: 1.2; }
.quote p + p { margin-top: 1.5rem; font-weight: 600; color: var(--muted); }

/* Band (dark call-to-action box) */

.band {
  display: flex; justify-content: space-between; align-items: center;
  gap: 2rem 4rem; flex-wrap: wrap;
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.75rem, 5vw, 5rem);
  background: var(--deep); color: var(--paper); border-radius: var(--radius);
}
.band h2 { max-width: 20ch; }
.band--sand { background: var(--sand); color: var(--ink); }

.closing { text-align: center; }
.closing .stack { align-items: center; }
.closing p { max-width: 38rem; }

/* Services */

.service {
  display: grid; grid-template-columns: 5fr 4fr 3fr; gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2rem, 4vw, 3.5rem);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.service + .service { margin-top: 2rem; }
.facts { display: flex; gap: 2.5rem; flex-wrap: wrap; padding-top: 0.5rem; }
.facts div { display: flex; flex-direction: column; gap: 0.25rem; }
.facts dt { font-size: 0.95rem; color: var(--soft); }
.facts dd { margin: 0; font-size: 1.25rem; font-weight: 600; }
.col-head { font-weight: 600; color: var(--soft); }

.faq > div { padding-block: 1.75rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.6rem; }
.faq > div:last-child { border-bottom: 1px solid var(--line); }

/* Work list */

.work-item {
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--ink);
}
.work-item:last-of-type { border-bottom: 1px solid var(--ink); }
.work-item:hover { color: var(--ink); }
.work-item:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; }
.work-visual {
  aspect-ratio: 5 / 4; border-radius: var(--radius);
  display: flex; align-items: flex-end; padding: 2rem;
  font-family: var(--serif); line-height: 0.9;
  font-size: clamp(4.5rem, 9vw, 8rem);
}
.work-visual--deep { background: var(--deep); color: var(--accent-on-deep); }
.work-visual--sand { background: var(--sand); color: var(--accent); }
.work-visual--line { background: var(--line); color: var(--deep); }
.inline-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.inline-stats div { display: flex; flex-direction: column; gap: 0.25rem; }
.inline-stats strong { font-family: var(--serif); font-weight: 400; font-size: 3rem; line-height: 1; color: var(--accent); }
.inline-stats span { font-size: 0.95rem; color: var(--muted); }

/* Case study */

.facts-line { display: flex; flex-wrap: wrap; gap: 0.75rem 3rem; color: var(--muted); }
.facts-line b { color: var(--ink); font-weight: 600; margin-right: 0.4rem; }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.compare .card { gap: 1.5rem; }
.compare .card--outline h3, .compare .card--outline ul { color: var(--muted); }
.compare .card--after { border-color: var(--ink); }

/* About */

.portrait { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; background: var(--line); }
.edu > div {
  display: flex; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap;
  padding-block: 1.4rem; border-top: 1px solid var(--line); font-size: 1.1rem;
}
.edu > div:last-child { border-bottom: 1px solid var(--line); }
.edu b { font-weight: 600; }

/* Contact */

.expect { counter-reset: step; list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.expect li { display: flex; gap: 1.25rem; align-items: baseline; margin: 0; font-size: 1.1rem; }
.expect li::before {
  counter-increment: step; content: counter(step);
  font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--accent); min-width: 1ch;
}

.form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-weight: 600; font-size: 0.975rem; }
.field input, .field select, .field textarea {
  font: 1rem/1.5 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid #A39C8E; border-radius: 4px;
  padding: 0.85rem 1rem; min-height: 3.25rem; width: 100%;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.hidden { position: absolute; left: -9999px; }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--soft); font-size: 0.95rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Footer */

.site-footer { background: var(--ink); color: var(--deep-muted); font-size: 0.95rem; margin-top: var(--section); }
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; flex-wrap: wrap; padding-block: 3.5rem;
}
.site-footer .brand { color: var(--paper); display: block; margin-bottom: 0.75rem; }
.site-footer nav { display: flex; gap: 1.25rem 2rem; flex-wrap: wrap; }
.site-footer a:hover { color: var(--paper); }

/* Responsive */

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service { grid-template-columns: 1fr 1fr; }
  .service > :first-child { grid-column: 1 / -1; }
  .stat-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-bar > div:nth-child(3) { border-left: 0; }
  .stat-bar > div:nth-child(n+3) { border-top: 1px solid var(--deep-line); }
}

@media (max-width: 860px) {
  .split, .split--offset, .grid-3, .compare, .work-item, .form-row { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 5.5rem;
    flex-direction: column; align-items: flex-start; gap: 1.25rem;
    padding: 1.5rem var(--gutter) 2rem;
    background: var(--paper); border-bottom: 1px solid var(--line); z-index: 50;
  }
  .nav.is-open { display: flex; }
  .site-header { position: relative; }
}

@media (max-width: 600px) {
  .grid-4, .service, .stat-bar { grid-template-columns: 1fr; }
  .stat-bar > div + div { border-left: 0; border-top: 1px solid var(--deep-line); }
  .btn-row .btn { width: 100%; }
  .signal-captions { font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .signal path { animation: none; stroke-dashoffset: 0; }
}
