/* ==========================================================================
   MeetlyAI — styles
   Palette + type per NOTES.md. Hero only for now.
   ========================================================================== */

/* --- Fonts (self-hosted, latin subset) --- */
@font-face {
  font-family: "Public Sans";
  src: url("assets/fonts/public-sans-var.woff2") format("woff2");
  font-weight: 400 600;   /* variable file, whole axis */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Zilla Slab";
  src: url("assets/fonts/zilla-slab-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Zilla Slab";
  src: url("assets/fonts/zilla-slab-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Design tokens --- */
:root {
  --zinc:    #556168;  /* Paris rooftop zinc — dominant structural colour */
  --zinc-dk: #414b51;
  --pierre:  #E5E1D6;  /* Haussmann limestone — the page paper */
  --pierre-lt:#EEEAE0;
  --encre:   #23262A;  /* cadastral ink — text */
  --dpe-a:   #3F9C4A;  /* DPE class-A green — live / HOT */
  --dpe-g:   #C0432E;  /* DPE class-G red — cold end only */
  --laiton:  #B99A5B;  /* shopfront brass — single warm accent */

  --disp: "Zilla Slab", Georgia, "Times New Roman", serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1120px;
  --radius: 10px;         /* enamel-plaque rounded rectangle */
  --section-y: clamp(2.5rem, 5vw, 4rem);  /* single vertical gap between sections */
}

/* --- Reset-ish --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  color: var(--encre);
  background: var(--pierre);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
h1 { margin: 0; }
ol { margin: 0; padding: 0; list-style: none; }

/* --- Header: zinc band --- */
.site-header {
  background: var(--zinc);
  color: var(--pierre-lt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.wordmark__ai { color: var(--laiton); }
.wordmark__loc {
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.72;
}
.header-link {
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(238, 234, 224, 0.35);
  padding-bottom: 1px;
}
.header-link:hover { border-bottom-color: var(--laiton); }

/* --- Hero --- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 4vw, 2.5rem) 0;  /* bottom gap owned by --section-y */
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  margin: 0 0 1.1rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--zinc);
  font-weight: 600;
}
h1 {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  max-width: 15ch;
}
.lede {
  margin: 1.4rem 0 2rem;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  max-width: 46ch;
  color: #35393d;
}
.lede strong { font-weight: 600; color: var(--encre); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
}
.btn {
  display: inline-block;
  background: var(--zinc);
  color: var(--pierre-lt);
  text-decoration: none;
  font-family: var(--body);   /* <button> doesn't inherit font */
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--zinc-dk);
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:disabled { opacity: 0.6; cursor: default; }
.btn:hover { background: var(--zinc-dk); }

/* --- The vitrine (agency window) --- */
.vitrine {
  border: 3px solid var(--laiton);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--zinc) 0%, var(--zinc-dk) 100%);
  padding: 14px;
  box-shadow: 0 18px 40px -22px rgba(35, 38, 42, 0.55);
}
.vitrine__glass {
  background: var(--pierre-lt);
  border-radius: 8px;
  padding: clamp(0.9rem, 2.5vw, 1.3rem);
  display: grid;
  gap: 1.1rem;
}

/* WhatsApp card */
.card {
  background: #fff;
  border: 1px solid rgba(35, 38, 42, 0.10);
  border-radius: var(--radius);
  overflow: hidden;
}
.card__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--pierre);
  border-bottom: 1px solid rgba(35, 38, 42, 0.10);
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--zinc);
}
.card__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--dpe-a);
}
.thread {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem;
}
.msg {
  margin: 0;
  max-width: 82%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.msg--in {
  justify-self: start;
  background: var(--pierre);
  border-bottom-left-radius: 3px;
}
.msg--out {
  justify-self: end;
  background: #e4efe4;
  border-bottom-right-radius: 3px;
}

/* DPE-style band — three segments = the classifier's three tiers */
.dpe { display: grid; gap: 0.6rem; }
.dpe__band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.dpe__step {
  border-radius: 4px;
  padding: 0.6rem 0.4rem;
  display: grid;
  place-items: center;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.95);
  opacity: 0.42;
}
.dpe--hot  { background: var(--dpe-a); }                           /* green */
.dpe--warm { background: #E0A32E; color: rgba(35, 38, 42, 0.85); } /* amber */
.dpe--cold { background: var(--dpe-g); }                           /* red   */

/* One source of truth: data-grade on .dpe lights the matching tier and writes
   the verdict. All steps default dimmed (above); only the graded one is lit. */
.dpe[data-grade="HOT"]  .dpe--hot,
.dpe[data-grade="WARM"] .dpe--warm,
.dpe[data-grade="COLD"] .dpe--cold {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--laiton), 0 4px 10px -4px rgba(35, 38, 42, 0.45);
}

/* Verdict text and colour also derive from data-grade — the same one value. */
.dpe[data-grade="HOT"]  .stamp::after { content: "HOT"; }
.dpe[data-grade="WARM"] .stamp::after { content: "WARM"; }
.dpe[data-grade="COLD"] .stamp::after { content: "COLD"; }
.dpe[data-grade="HOT"]  .stamp { color: var(--dpe-a); }
.dpe[data-grade="WARM"] .stamp { color: #B26A12; }
.dpe[data-grade="COLD"] .stamp { color: var(--dpe-g); }

.dpe__verdict {
  font-size: 0.85rem;
  color: var(--zinc);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stamp {
  font-family: var(--disp);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--encre);   /* overridden per tier by the data-grade rules above */
  border: 2px solid var(--laiton);
  border-radius: 5px;
  padding: 0.1rem 0.5rem;
  transform: rotate(-2deg);
  background: #fff;
}

/* --- Content sections: shared shell --- */
/* One gap between sections: top padding only, so adjacent sections don't stack
   their spacing. The last section restores its bottom padding below. */
.qualifier,
.rag,
.build,
.limits,
.contact {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) clamp(1rem, 4vw, 2.5rem) 0;
}
main > section:last-child { padding-bottom: var(--section-y); }
.section-head { max-width: 64ch; margin-bottom: clamp(1.6rem, 3.5vw, 2.6rem); }
.kicker {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--zinc);
  font-weight: 600;
}
.qualifier h2,
.rag h2,
.build h2,
.limits h2,
.contact h2 {
  margin: 0;
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 20ch;
}
.section-lede {
  margin: 1.1rem 0;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  max-width: 54ch;
  color: #35393d;
}
.section-stack {
  margin: 0;
  font-size: 0.85rem;
  color: var(--zinc);
  font-variant-numeric: tabular-nums;
}

/* The artifact: a recreated Google Sheet */
.sheet-figure { margin: 0; }
.sheet {
  border: 1px solid rgba(35, 38, 42, 0.14);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;                 /* clip corners; inner scroller handles overflow */
  box-shadow: 0 18px 40px -26px rgba(35, 38, 42, 0.5);
}
.sheet__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--pierre);
  border-bottom: 1px solid rgba(35, 38, 42, 0.12);
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--zinc);
}
.sheet__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}
.sheet__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dpe-a);
}
.sheet__scroll { overflow-x: auto; }   /* wide table scrolls inside its own box */
.sheet__table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.sheet__table th,
.sheet__table td {
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid rgba(35, 38, 42, 0.08);
  white-space: nowrap;
}
.sheet__table thead th {
  background: #FBFAF6;
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zinc);
  font-weight: 600;
}
.sheet__table tbody tr:last-child td { border-bottom: none; }
.sheet__table tbody tr:hover { background: #FAF9F4; }
.sheet__table .num { font-variant-numeric: tabular-nums; }

/* Grade pill — echoes the hero's DPE band: a DPE-coloured swatch + verdict */
.grade {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  border: 1px solid;
  white-space: nowrap;
}
.grade--hot { color: #2F6D37; background: rgba(63, 156, 74, 0.10); border-color: rgba(63, 156, 74, 0.35); }
.grade--warm { color: #8A5A15; background: rgba(224, 163, 46, 0.12); border-color: rgba(224, 163, 46, 0.40); }
.grade--cold { color: #8F3324; background: rgba(192, 67, 46, 0.09); border-color: rgba(192, 67, 46, 0.30); }
.sw { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.sw--hot { background: var(--dpe-a); }
.sw--warm { background: #E0A32E; }
.sw--cold { background: var(--dpe-g); }

.sheet-caption {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  color: var(--zinc);
  opacity: 0.85;
}

/* --- Section 3: Email RAG assistant — the Gmail draft --- */
.draft-figure { margin: 0; }
.draft {
  /* full container width to match the section-2 sheet card, edge-to-edge */
  border: 1px solid rgba(35, 38, 42, 0.14);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 40px -26px rgba(35, 38, 42, 0.5);
}
.draft__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--zinc);
  color: var(--pierre-lt);
  padding: 0.6rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.draft__saved {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  font-size: 0.78rem;
  opacity: 0.9;
}
.draft__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--laiton);        /* amber = pending / not sent */
}
.draft__meta {
  padding: 0.35rem 0.95rem;
  border-bottom: 1px solid rgba(35, 38, 42, 0.08);
}
.draft__row {
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}
.draft__label {
  color: var(--zinc);
  font-weight: 600;
  font-size: 0.8rem;
  width: 4rem;
  flex: none;
}

/* provenance — the pipeline made visible before it stops at the draft */
.provenance {
  list-style: none;
  margin: 0;
  padding: 0.7rem 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: var(--pierre-lt);
  border-bottom: 1px solid rgba(35, 38, 42, 0.08);
  font-size: 0.8rem;
}
.provenance li {
  background: #fff;
  border: 1px solid rgba(35, 38, 42, 0.12);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}
.prov__k {
  color: var(--zinc);
  font-weight: 600;
  margin-right: 0.35rem;
}

.draft__body {
  padding: 1rem 0.95rem;
  font-size: 0.92rem;
  line-height: 1.55;
}
.draft__body p { margin: 0 0 0.7rem; }
.draft__body p:last-child { margin: 0; }

/* the checkpoint: Send is present and untouched. It is deliberately styled as a
   FLAT, MUTED control inside a screenshot — no shadow, no fill weight — so it
   reads as an image and never competes with the page's one real button (the
   hero CTA). The emphasis lives in the "←" note beside it, not in the button. */
.draft__foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 0.95rem;
  border-top: 1px solid rgba(35, 38, 42, 0.10);
}
.send {
  display: inline-flex;
  align-items: center;
  background: rgba(85, 97, 104, 0.12);   /* washed zinc — inert */
  color: var(--zinc);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 1.35rem;
  border-radius: 8px;
  border: 1px solid rgba(35, 38, 42, 0.14);
  cursor: default;
}
.draft__stophere {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--zinc);
}
.draft__stophere::before {
  content: "←";
  position: absolute;
  left: 0;
  color: var(--laiton);
  font-weight: 700;
}

/* --- How it's built: the full stack in one view (spec-sheet rows) --- */
.stack-grid { margin: 0; }
.stack-item {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0.4rem 2rem;
  padding: 0.95rem 0;
  border-top: 1px solid rgba(35, 38, 42, 0.10);
}
.stack-item:last-child { border-bottom: 1px solid rgba(35, 38, 42, 0.10); }
.stack-item dt {
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zinc);
}
.stack-item dd {
  margin: 0;
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.5;
  color: var(--encre);
}
.stack-item dd b { font-weight: 600; }

/* --- Section 4: who this isn't for — two limits, not a list --- */
.limits__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
}
.limit {
  border-top: 2px solid rgba(85, 97, 104, 0.28);  /* quiet rule, not a bullet */
  padding-top: 1.1rem;
}
.limit__lead {
  margin: 0 0 0.6rem;
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.2;
  color: var(--encre);
}
.limit__body {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.55;
  color: #35393d;
  max-width: 48ch;
}

/* --- Section 5: contact --- */
.contact__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.contact-form {
  display: grid;
  gap: 1rem;
  background: #fff;
  border: 1px solid rgba(35, 38, 42, 0.14);
  border-radius: 12px;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  box-shadow: 0 18px 40px -26px rgba(35, 38, 42, 0.5);
}
.field { display: grid; gap: 0.35rem; }
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--zinc);
}
.field input,
.field textarea {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(35, 38, 42, 0.22);
  border-radius: 8px;
  background: #fff;
  color: var(--encre);
}
.field textarea { resize: vertical; min-height: 6.5rem; }
.contact-form .btn { justify-self: start; }

.form-status {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--zinc);
}
.form-status.is-error { color: #8F3324; }

.contact__success {
  background: rgba(63, 156, 74, 0.10);
  border: 1px solid rgba(63, 156, 74, 0.35);
  border-radius: 12px;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  font-size: 1rem;
  line-height: 1.5;
  color: #2F6D37;
}

.contact__aside {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #35393d;
}
.contact__aside p { margin: 0 0 0.6rem; }
.upwork-link {
  display: inline-block;
  font-weight: 600;
  color: var(--encre);
  text-decoration: none;
  border-bottom: 2px solid var(--laiton);
  padding-bottom: 1px;
}
.upwork-link:hover { border-bottom-color: var(--zinc); }

/* --- Focus visibility --- */
:focus-visible {
  outline: 3px solid var(--laiton);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- Responsive --- */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  /* Promote the copy's children into the hero grid so the vitrine can be
     interleaved between the h1 and the lede via order. DOM order is unchanged
     (see keyboard note below). */
  .hero__copy { display: contents; }
  .eyebrow       { order: 1; margin-bottom: 0; }
  h1             { order: 2; max-width: 20ch; }
  .vitrine       { order: 3; }
  .lede          { order: 4; margin: 0; }
  .hero__actions { order: 5; }
}
/* Narrow phones: the Grade column is the payoff, so it must be visible without
   sideways scroll. Drop the two lowest-value columns (Received, Prospect) and
   let the table size to the viewport instead of scrolling. */
@media (max-width: 640px) {
  .sheet__scroll { overflow-x: visible; }
  .sheet__table { min-width: 0; }
  .sheet__table th:nth-child(1),
  .sheet__table td:nth-child(1),   /* Received */
  .sheet__table th:nth-child(2),
  .sheet__table td:nth-child(2) {  /* Prospect */
    display: none;
  }
  .sheet__table td:nth-child(3) { white-space: normal; }  /* listing may wrap */

  .limits__grid { grid-template-columns: 1fr; }           /* stack the two limits */
  .stack-item { grid-template-columns: 1fr; gap: 0.2rem; } /* term above tools */
  .contact__grid { grid-template-columns: 1fr; }          /* form, then aside */
}

@media (max-width: 420px) {
  .header-link { font-size: 0.8rem; }
  .dpe__step { font-size: 0.72rem; }
}

/* --- Reduced motion (no animation used, but honour intent for transitions) --- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
