/* Medomi AI — site styles */

:root {
  --paper: #F5F2EC;
  --paper-2: #EFEBE2;
  --surface: #FCFBF8;
  --ink: #1B2230;
  --ink-2: #414A5A;
  --muted: #6A7180;
  --line: #E0DACE;
  --green: #2F5D50;
  --green-deep: #244A40;
  --green-soft: #DDE7E1;
  --terra: #C8643B;
  --terra-deep: #A84E2A;
  --terra-soft: #F6E3D8;
  --sand: #E9DFCF;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 34, 48, .05), 0 12px 32px -12px rgba(27, 34, 48, .18);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---------- Type ---------- */

h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.35rem); line-height: 1.04; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.85rem); line-height: 1.1; }
h3 { font-size: 1.06rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }

.eyebrow {
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green); color: #fff;
  font-weight: 500; font-size: 1rem; line-height: 1;
  padding: 15px 24px; border-radius: 999px;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--green-deep); transform: translateY(-1px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-row { display: flex; align-items: center; gap: 28px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-weight: 600; font-size: 1.16rem; letter-spacing: -0.02em; color: var(--ink); }
.brand-ai { color: var(--green); margin-left: .22em; font-weight: 500; }

.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-size: .95rem; color: var(--ink-2); }
.nav a:hover { color: var(--green); }

/* ---------- Hero ---------- */

.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 112px); overflow: hidden; }
.hero-grid {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(32px, 5vw, 72px);
}
.lede { font-size: clamp(1.08rem, 1.5vw, 1.24rem); color: var(--ink-2); max-width: 34em; margin-top: 26px; }
.lede-strong { margin-top: 12px; color: var(--ink); font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2vw, 1.55rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 36px; }

/* Product sketch */
.sketch { margin: 0; position: relative; }
.sketch::before {
  content: ""; position: absolute; inset: -9% -14% -9% 12%;
  background: var(--green-soft); border-radius: 28px; transform: rotate(-2.5deg);
}
.sketch-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
  font-size: .9rem;
}
.sketch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 2px 4px 16px; }
.sketch-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; line-height: 1.2; }
.sketch-sub { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.sketch-time { font-family: var(--mono); font-size: .78rem; color: var(--muted); padding-top: 7px; }

.sketch-list { display: grid; gap: 8px; }
.row { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: #fff; border-left-width: 3px; }
.row-alert { border-left-color: var(--terra); }
.row-change { border-left-color: #D9A441; }
.row-stable { border-left-color: var(--green-soft); background: transparent; }
.row-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.row-who { color: var(--ink-2); font-size: .84rem; }
.row-who b { color: var(--ink); font-weight: 600; }
.row-what { margin-top: 6px; font-weight: 500; line-height: 1.4; }
.row-stable .row-what { font-weight: 400; color: var(--ink-2); }
.row-src { margin-top: 7px; font-family: var(--mono); font-size: .72rem; color: var(--green); display: flex; align-items: center; gap: 7px; }
.src-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }

.tag { font-size: .7rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.tag-alert { background: var(--terra-soft); color: var(--terra-deep); }
.tag-change { background: #F7EBCF; color: #7A5A12; }
.tag-stable { background: var(--green-soft); color: var(--green-deep); }

.sketch-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 14px; padding: 12px 6px 2px 4px; border-top: 1px dashed var(--line);
}
.foot-status { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: .82rem; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(47, 93, 80, .5); animation: pulse 2.4s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(47, 93, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 93, 80, 0); } }
.foot-btn { background: var(--ink); color: #fff; font-size: .8rem; font-weight: 500; padding: 8px 15px; border-radius: 999px; }

.sketch figcaption { position: relative; margin-top: 14px; font-size: .78rem; color: var(--muted); text-align: right; }

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }

/* Problem */
.problem { background: var(--surface); border-block: 1px solid var(--line); }
.problem-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 84px); align-items: center; }
.problem-art img { border-radius: var(--radius); width: 100%; aspect-ratio: 3 / 2.6; object-fit: cover; object-position: 78% 50%; background: var(--sand); }
.problem-copy > p:not(.eyebrow) { color: var(--ink-2); margin-top: 20px; max-width: 34em; font-size: 1.08rem; }
.facts { margin-top: 34px; display: grid; gap: 0; }
.facts li { padding: 20px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr); gap: 8px 24px; }
.facts li:last-child { padding-bottom: 0; }
.facts p { color: var(--ink-2); font-size: .98rem; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 30px; position: relative;
}
.step-n { font-family: var(--mono); font-size: .8rem; color: var(--terra); letter-spacing: .08em; }
.step h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.15; margin: 44px 0 10px; letter-spacing: -0.01em; }
.step p { color: var(--ink-2); font-size: .97rem; }
.step-final { background: var(--green); border-color: var(--green); color: #fff; }
.step-final .step-n { color: #F0C2AC; }
.step-final p { color: rgba(255, 255, 255, .84); }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 34px; right: -13px; z-index: 1;
  width: 9px; height: 9px; border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); transform: rotate(45deg);
}

/* Principles */
.principles { background: var(--ink); color: #fff; }
.principles .eyebrow { color: #9CC4B4; }
.principle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .13); border-radius: var(--radius); overflow: hidden; }
.principle { background: var(--ink); padding: clamp(26px, 3.4vw, 42px); }
.principle svg { width: 34px; height: 34px; fill: none; stroke: #E59873; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 22px; }
.principle h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.01em; }
.principle p { margin-top: 10px; color: rgba(255, 255, 255, .74); max-width: 30em; }

/* Status */
.status-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.status-intro { color: var(--ink-2); margin-top: 20px; max-width: 33em; font-size: 1.08rem; }
.timeline { margin-top: 40px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 28px; width: 1px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 30px 34px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid #B9B2A4;
}
.timeline li.is-now::before { background: var(--terra); border-color: var(--terra); box-shadow: 0 0 0 5px var(--terra-soft); }
.t-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.is-now .t-label { color: var(--terra-deep); }
.timeline h3 { margin-top: 3px; font-size: 1.1rem; }
.timeline p { color: var(--ink-2); font-size: .97rem; margin-top: 3px; max-width: 31em; }

.meet { background: var(--green); color: #fff; border-radius: 20px; padding: clamp(28px, 3.6vw, 42px); position: sticky; top: 96px; }
.meet h3 { font-family: var(--serif); font-weight: 500; font-size: 1.75rem; letter-spacing: -0.01em; line-height: 1.15; }
.meet ul { margin-top: 22px; }
.meet li { padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .2); display: grid; gap: 2px; }
.meet li:last-child { padding-bottom: 0; }
.meet li b { font-weight: 600; }
.meet li span { color: rgba(255, 255, 255, .8); font-size: .96rem; }

/* Team */
.team { background: var(--surface); border-block: 1px solid var(--line); }
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.person { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--green-soft); margin-bottom: 20px; object-fit: cover; }
.person h3 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; letter-spacing: -0.01em; }
.role { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin-top: 6px; }
.bio { color: var(--ink-2); font-size: .97rem; margin-top: 14px; }
.person a { color: var(--green); font-weight: 500; font-size: .93rem; display: inline-block; margin-top: 14px; }
.person.is-placeholder { border-style: dashed; background: transparent; }
.person.is-placeholder h3, .person.is-placeholder .bio { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 44px; }
.footer-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px 36px; }
.disclaimer { color: var(--muted); font-size: .84rem; max-width: 46em; }
.copy { color: var(--muted); font-size: .84rem; white-space: nowrap; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:not(:last-child)::after { display: none; }
  .step h3 { margin-top: 28px; }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .hero-grid, .problem-grid, .status-grid { grid-template-columns: minmax(0, 1fr); }
  .sketch { max-width: 520px; margin-top: 12px; }
  .sketch::before { inset: -6% -30% -6% 18%; }
  .problem-art { order: 2; }
  .problem-art img { aspect-ratio: 3 / 2; }
  .meet { position: static; }
  .footer-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .steps, .people, .principle-grid { grid-template-columns: minmax(0, 1fr); }
  .facts li { grid-template-columns: minmax(0, 1fr); }
  .row-top { flex-wrap: wrap; }
  .sketch-card { padding: 14px; }
  .foot-status { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
  .btn { transition: none; }
}
