/* The Kitchen Codex — Coming Soon
   Warm archival minimalism: ink, cream, Codex green.
   Static HTML/CSS; existing Kit signup is the only script integration. */

:root {
  --ink: #171717;
  --ink-soft: #232323;
  --cream: #f4efe4;
  --cream-dim: #e9e2d2;
  --green: #3a6b51;
  --green-deep: #2c5440;
  --paper: #faf7ef;
  --muted-on-dark: #c9c2b2;
  --muted-on-light: #5d574b;
  --line-on-dark: rgba(244, 239, 228, 0.16);
  --line-on-light: rgba(23, 23, 23, 0.14);
  --radius: 14px;
  --max: 1080px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::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.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: clip;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

/* Visible focus everywhere */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}
.hero :focus-visible { outline-color: var(--cream); }

.wrap {
  width: min(var(--max), 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--ink);
  color: var(--cream);
  border-bottom: 1px solid var(--line-on-dark);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  min-height: 64px;
}
.wordmark {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}
.wordmark-mark { color: var(--cream); flex: none; }
.header-status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}
.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #7fb894;
  box-shadow: 0 0 0 4px rgba(127, 184, 148, 0.18);
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(rgba(244, 239, 228, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 228, 0.035) 1px, transparent 1px),
    var(--ink);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--cream);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.eyebrow { margin: 0 0 1.25rem; }
.eyebrow-pill {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line-on-dark);
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(58, 107, 81, 0.35);
}
.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 16ch;
}
.lede {
  margin: 0 0 1.25rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.7;
  color: #ddd6c4;
  max-width: 56ch;
}
.hero-tagline {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted-on-dark);
}

/* Vault card composition */
.hero-visual { display: flex; justify-content: center; }
.vault {
  position: relative;
  width: min(340px, 100%);
  aspect-ratio: 4 / 4.6;
}
.vault-card {
  position: absolute;
  inset-inline: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(23, 23, 23, 0.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.vault-card--back  { top: 0;    transform: rotate(-5deg)  translateY(6px);  opacity: 0.75; }
.vault-card--mid   { top: 15%;  transform: rotate(3.5deg) translateY(6px);  opacity: 0.9; }
.vault-card--front { top: 30%;  transform: rotate(-1deg); min-height: 62%; }
.card-index {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--green);
  font-weight: 700;
}
.card-title {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.2;
}
.card-meta { font-size: 0.88rem; color: var(--muted-on-light); }
.card-rule {
  margin: 0.55rem 0 0.35rem;
  border-top: 1px dashed rgba(23, 23, 23, 0.25);
}
.card-note {
  font-family: var(--serif);
  font-style: italic;
  color: var(--green-deep);
}
.card-tabs {
  position: absolute;
  top: -11px;
  right: 1.2rem;
  display: flex;
  gap: 5px;
}
.card-tabs i {
  width: 26px;
  height: 12px;
  border-radius: 4px 4px 0 0;
  background: var(--cream-dim);
  border: 1px solid rgba(23, 23, 23, 0.2);
  border-bottom: none;
}
.card-tabs i.on { background: var(--green); border-color: var(--green-deep); }

/* ---------- Values ---------- */
.values { padding-block: clamp(3rem, 7vw, 5rem); }
.values h2,
.shiso h2,
.promise h2,
.cta h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin: 0 0 0.75rem;
}
.section-sub {
  margin: 0 0 2rem;
  color: var(--muted-on-light);
  max-width: 62ch;
}
.value-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
.value-card {
  background: var(--paper);
  border: 1px solid var(--line-on-light);
  border-top: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  box-shadow: 0 2px 10px rgba(23, 23, 23, 0.05);
}
.value-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.3rem;
}
.value-card p { margin: 0; font-size: 0.98rem; color: #3d3a33; }

/* ---------- Shiso companion / official mascot ---------- */
.shiso { padding-block: 0 clamp(3rem, 7vw, 5rem); }
.shiso-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  background: var(--paper);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius);
}
.shiso-copy, .shiso-portrait { min-width: 0; }
.shiso-kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--green-deep);
}
.shiso-leaf { flex: none; }
.shiso-intro {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--green-deep);
}
.shiso-copy > p:not([class]) { margin: 0 0 1rem; }
.shiso-nutrition {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted-on-light);
}
.shiso-nutrition strong { color: var(--green-deep); }
.shiso-portrait {
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #0c120d;
  border: 1px solid rgba(58, 107, 81, 0.35);
  box-shadow: 0 12px 26px rgba(23, 23, 23, 0.12);
}
.shiso-portrait img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
}
.shiso-portrait figcaption {
  padding: 0.8rem 1rem 0.9rem;
  border-top: 1px solid rgba(244, 239, 228, 0.14);
  color: #ddd6c4;
  font-size: 0.79rem;
  line-height: 1.45;
  text-align: center;
}

/* ---------- Promise ---------- */
.promise {
  background: var(--green-deep);
  color: var(--cream);
  padding-block: clamp(3rem, 7vw, 5rem);
}
.promise-inner { max-width: 44rem; }
.promise p { margin: 0; color: #e4ddcb; font-size: 1.1rem; line-height: 1.75; }

/* ---------- CTA ---------- */
.cta {
  padding-block: clamp(3rem, 7vw, 5rem);
  text-align: center;
}
.cta-inner { max-width: 44rem; margin-inline: auto; }
.cta-inner h2 { margin-bottom: 0.75rem; }
.cta-inner p { margin: 0; color: var(--muted-on-light); }

/* ---------- Early access signup ---------- */
.early-access {
  padding-block: 0 clamp(3rem, 7vw, 5rem);
}
.early-access-card {
  max-width: 44rem;
  margin-inline: auto;
  background: var(--paper);
  border: 1px solid var(--line-on-light);
  border-top: 4px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(23, 23, 23, 0.05);
  padding: clamp(1.6rem, 4vw, 2.5rem);
  text-align: center;
}
.card-index--on-card {
  margin: 0 0 0.9rem;
}
.early-access-card h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin: 0 0 0.6rem;
}
.early-access-sub {
  margin: 0 0 1.6rem;
  color: var(--muted-on-light);
  max-width: 46ch;
  margin-inline: auto;
}
.early-access-errors {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.early-access-errors li {
  margin: 0 0 0.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(140, 47, 27, 0.4);
  border-left: 4px solid #8c2f1b;
  border-radius: 8px;
  background: #f8ece6;
  color: #6e2313;
  font-size: 0.95rem;
  text-align: left;
}
.early-access-errors:empty { display: none; }
.early-access-fields {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  text-align: left;
}
.early-access-field { flex: 1 1 auto; min-width: 0; }
.early-access-label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #3d3a33;
}
.early-access-input {
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(23, 23, 23, 0.3);
  border-radius: 10px;
}
.early-access-input::placeholder { color: #8a8474; }
.early-access-button {
  flex: none;
  align-self: end;
  min-height: 52px;
  padding: 0.7rem 1.6rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  color: var(--cream);
  background: var(--green);
  border: 1px solid var(--green-deep);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.early-access-button:hover { background: var(--green-deep); }
.early-access-button:disabled { opacity: 0.65; cursor: wait; }
.early-access-trust {
  margin: 0.9rem 0 0;
  font-size: 0.88rem;
  color: var(--muted-on-light);
}
/* Kit inline success message (rendered by ck.js, styled natively) */
.early-access-form .formkit-alert-success {
  margin: 0 0 0.9rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(58, 107, 81, 0.45);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #edf3ee;
  color: var(--green-deep);
  font-size: 1rem;
  text-align: left;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--muted-on-dark);
  border-top: 1px solid var(--line-on-dark);
}
.footer-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.5rem;
}
.footer-inner p { margin: 0; }
.footer-brand { font-family: var(--serif); color: var(--cream); font-size: 1.05rem; }
.footer-meta { font-size: 0.92rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero h1 { max-width: 20ch; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .shiso-card { grid-template-columns: 1fr; }
  .vault { width: min(300px, 88%); }
}
@media (max-width: 540px) {
  body { font-size: 1rem; }
  .value-grid { grid-template-columns: 1fr; }
  /* Polish: header status becomes ambient — hero pill carries the message */
  .header-status { display: none; }
  .wordmark { font-size: 1.05rem; }
  /* Polish: smaller card-stack footprint for a balanced mobile hero */
  .vault { width: min(250px, 80%); }
  .card-title { font-size: 1.25rem; }
  .card-meta { font-size: 0.82rem; }
  /* Polish: tighter value cards without going cramped */
  .value-card { padding: 1.1rem 1.15rem; }
  .value-card h3 { margin-bottom: 0.35rem; font-size: 1.2rem; }
  /* Polish: lighter promise paragraph on small screens */
  .promise p { font-size: 1.02rem; line-height: 1.68; }
  .cta { text-align: left; }
  /* Signup stacks full-width on small screens */
  .early-access-fields { flex-direction: column; }
  .early-access-button { align-self: stretch; }
}

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