/* ============================================================
   Kin Coffee — V1 Editorial Ivory
   Kinfolk-adjacent magazine spread: centered-logo hero, 12-col
   asymmetric body grid, menu card on a walnut stand, gutter labels,
   underline form. Builds on assets/css/tokens.css.
   ============================================================ */

:root {
  --pad-x: clamp(20px, 5vw, 72px);
  --content-max: 1400px;
  --grid-gap: clamp(20px, 2.5vw, 40px);
  --error: #8A3B2A;
}

::selection { background: var(--taupe); color: var(--ivory); }

h1, h2, h3, h4, p { margin: 0; }

p + p { margin-top: 1em; }

/* ---------- buttons — the page's only saturated element ---------- */
.btn,
form[data-inquiry-form] button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 38px;
  background: var(--taupe-deep);
  color: var(--ivory);
  border: 0;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.25s var(--ease-out);
}
.btn:hover,
form[data-inquiry-form] button[type="submit"]:hover {
  background: var(--ink);
}
.btn--nav { padding: 12px 26px; min-height: 44px; }

/* ============================================================
   HEADER — nav to the side, logo in the middle, Inquire right
   ============================================================ */
.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "logo logo"
    "nav  cta";
  align-items: center;
  gap: 8px 16px;
  padding: 12px var(--pad-x);
  transition: background-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), padding 0.35s var(--ease-out);
}
.site-head.is-solid {
  background: rgba(246, 242, 236, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--hairline);
}

.wordmark {
  grid-area: logo;
  justify-self: center;
  text-align: center;
  text-decoration: none;
  line-height: 1;
}
.wordmark-kin {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.42em;
  margin-right: -0.42em; /* optically re-center the tracking */
  color: var(--ink);
}
.wordmark-sub {
  display: block;
  margin-top: 5px;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.4em;
  margin-right: -0.4em;
  text-transform: uppercase;
  color: var(--ink);
}

.site-nav {
  grid-area: nav;
  display: flex;
  gap: 0 16px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-block: -8px;   /* keeps the row visually slim, target stays 48px */
  padding-inline: 2px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}
.site-nav a:hover { color: var(--taupe-dark); }
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.head-cta { grid-area: cta; justify-self: end; }

/* home, top of page on phones: the hero carries the big logo, so the
   header drops its small one until you scroll */
@media (max-width: 799.98px) {
  .site-head--home:not(.is-solid) .wordmark { display: none; }
}

@media (min-width: 800px) {
  .site-head {
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "nav logo cta";
    padding-block: 20px;
  }
  .site-head.is-solid { padding-block: 12px; }
  .site-nav { gap: 0 30px; }
  .site-head--home .wordmark {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
  }
  .site-head--home.is-solid .wordmark { opacity: 1; visibility: visible; }
}

/* ============================================================
   HERO — the logo in the middle of the screen, cart image below
   ============================================================ */
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 78svh;
  padding: 104px var(--pad-x) 64px;
  text-align: center;
}

.hero-logo {
  margin: 0;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}
.hero-logo-kin {
  display: block;
  font-size: clamp(76px, 13vw, 176px);
  letter-spacing: 0.34em;
  margin-right: -0.34em; /* optically re-center the tracking */
}
.hero-logo-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9em;
  margin-top: 0.75em;
  font-size: clamp(14px, 1.7vw, 22px);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}
.hero-logo-sub::before,
.hero-logo-sub::after {
  content: "";
  width: 3em;
  height: 1px;
  background: currentColor;
}
.hero-logo-sub::after { margin-left: -0.42em; } /* tracking trails the last letter */

.hero-tagline {
  margin-top: clamp(30px, 4vw, 44px);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.15;
  color: var(--taupe-warm);
  text-wrap: balance;
}
.hero-support {
  margin: 18px 0 36px;
  max-width: 46ch;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 2;
  color: var(--ink);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 60%;
}

@media (min-width: 960px) {
  .hero-copy { min-height: 84svh; padding-top: 120px; }
  .hero-media img { aspect-ratio: 16 / 7; }
}

/* one-time hero entrance — the single permitted deviation */
@keyframes hero-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes hero-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.hero-copy > * { animation: hero-up 0.9s var(--ease-out) both; }
.hero-logo     { animation-delay: 0.1s; }
.hero-tagline  { animation-delay: 0.28s; }
.hero-support  { animation-delay: 0.4s; }
.hero-copy .btn { animation-delay: 0.52s; }
.hero-media    { animation: hero-fade 1.3s var(--ease-out) both 0.35s; }

/* ============================================================
   SECTION SCAFFOLDING
   ============================================================ */
.section { padding: var(--pad-section) var(--pad-x); }
.section--beige { background: var(--beige); }
.section-inner { max-width: var(--content-max); margin-inline: auto; }

[id] { scroll-margin-top: 96px; }

h2,
.page-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 14px 0 26px;
  text-wrap: balance;
}
.section-head { margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2,
.section-head .page-title { margin-bottom: 0; }

/* first section on a subpage clears the fixed header */
.section.page-first { padding-top: calc(var(--pad-section) + 64px); }
@media (min-width: 800px) {
  .section.page-first { padding-top: calc(var(--pad-section) + 40px); }
}
.section-head .inquire-lede { margin-top: 22px; }

/* 12-column asymmetric grid — desktop only */
.grid12 { display: grid; grid-template-columns: 1fr; gap: 44px; }

@media (min-width: 960px) {
  .grid12 {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--grid-gap);
    row-gap: 48px;
    align-items: center;
  }

  /* gutter eyebrows — set into the margin column, alignment varies */
  .gutter-label--vert {
    grid-column: 1;
    align-self: start;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
  }
  .gutter-label--end { align-self: end; }

  /* intro — text 5 cols left, image 6 right */
  .intro-text  { grid-column: 2 / 7; }
  .intro-media { grid-column: 7 / 13; }

  /* founders — text left, portrait-cropped image right */
  .founders-text  { grid-column: 2 / 7; }
  .founders-media { grid-column: 7 / 13; }
}

.frame img { width: 100%; height: auto; }

.founders-media img { aspect-ratio: 4 / 5; object-fit: cover; }

/* ============================================================
   INTRO
   ============================================================ */
.intro-text p,
.founders-text p { max-width: 54ch; }

/* ============================================================
   MENU — the printed table card on a walnut stand.
   The stand is a size container, so the card scales like
   print (cqi units) in both the desktop and /mobile builds.
   ============================================================ */
.menu-stand {
  container-type: inline-size;
  max-width: 620px;
  margin-inline: auto;
}
.menu-card {
  margin-inline: 3.5cqi;   /* the base runs a little wider than the card */
  padding: clamp(40px, 11cqi, 72px) clamp(24px, calc(18cqi - 33px), 80px) clamp(60px, 14cqi, 92px);
  background: #FBF8F3;     /* menu-card stock, a shade brighter than the ivory page */
  box-shadow:
    0 1px 2px rgba(61, 51, 44, 0.12),
    0 26px 44px -26px rgba(61, 51, 44, 0.4);
}

.menu-card-logo {
  margin: 0 0 clamp(36px, 9cqi, 56px);
  font-family: var(--font-sans);   /* the wordmark, not the italic h2 */
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  color: var(--ink);
}
.menu-card-kin {
  display: block;
  font-size: clamp(56px, 15cqi, 96px);
  letter-spacing: 0.2em;
  margin-right: -0.2em;    /* optically re-center the tracking */
}
.menu-card-sub {
  display: block;
  margin-top: 0.9em;
  font-size: clamp(12px, 2.6cqi, 16px);
  font-weight: 500;
  letter-spacing: 0.5em;
  margin-right: -0.5em;
  text-transform: uppercase;
}

.menu-subhead {
  margin: clamp(32px, 8cqi, 52px) 0 clamp(14px, 3cqi, 20px);
  padding-bottom: 0.9em;
  border-bottom: 1px solid rgba(61, 51, 44, 0.55);
  font-size: clamp(11px, 2.2cqi, 14px);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
}
.menu-card-logo + .menu-subhead { margin-top: 0; }

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-list li,
.menu-milk {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(22px, 5cqi, 31px);
  line-height: 1.25;
  color: var(--ink);
}
.menu-milk { margin: 0; }
.menu-list--sig li + li { margin-top: clamp(12px, 3cqi, 18px); }
.sig-name { display: block; }
.sig-desc {
  display: block;
  margin-top: 0.1em;
  font-size: clamp(15px, 3.1cqi, 19px);
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.menu-note {
  margin: clamp(36px, 8cqi, 52px) 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(16px, 3.1cqi, 19px);
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
  color: var(--ink-soft);
}

/* the walnut base the card slots into */
.menu-stand-base {
  position: relative;
  z-index: 1;
  height: clamp(34px, 8cqi, 52px);
  margin-top: calc(-1 * clamp(20px, 5cqi, 30px));
  border-radius: 2px;
  background: linear-gradient(180deg, #7A6352 0, #7A6352 3px, #5E4A3B 3px, #4B3A2E 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 2px 3px rgba(61, 51, 44, 0.3),
    0 26px 30px -20px rgba(61, 51, 44, 0.55);
}

/* ============================================================
   FOUNDERS
   ============================================================ */
.founders-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 2.8vw, 38px);
  line-height: 1.25;
  color: var(--taupe-warm);
  margin: 1.4em 0 1.1em;
}

/* ============================================================
   FAQ — keyboard-native details/summary
   ============================================================ */
.faq-inner { max-width: 820px; margin-inline: 0; }
@media (min-width: 960px) {
  /* nudge the block off the left edge — same optical column as the intro text */
  .faq-inner { margin-left: calc(8.33% + var(--grid-gap)); }
}

.faq { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }

.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 48px;
  padding: 21px 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  color: var(--taupe-dark);
  transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--taupe-dark); }

.faq-a { padding: 0 0 26px; }
.faq-a p { max-width: 58ch; }

.faq-cta { margin-top: clamp(48px, 6vw, 72px); }
.faq-cta p { max-width: 46ch; margin-bottom: 26px; }

/* ============================================================
   INQUIRE — tall image left, beige field right, underline inputs
   ============================================================ */
.inquire { background: var(--beige); }

.inquire-grid { display: grid; grid-template-columns: 1fr; gap: 48px; }

.inquire-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (min-width: 960px) {
  .inquire-grid {
    grid-template-columns: 5fr 7fr;
    column-gap: clamp(48px, 6vw, 96px);
    align-items: stretch;
  }
  .inquire-media { position: relative; }
  .inquire-media img {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
  }
  .inquire-panel { max-width: 640px; }
}

.inquire-lede { max-width: 44ch; }

/* form layout */
form[data-inquiry-form] {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 36px;
}
@media (min-width: 640px) {
  form[data-inquiry-form] { grid-template-columns: 1fr 1fr; }
  form[data-inquiry-form] [data-field]:has(#inq-message) { grid-column: 1 / -1; }
}
form[data-inquiry-form] [data-field] { margin-bottom: 30px; }

form[data-inquiry-form] label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
}
form[data-inquiry-form] .opt {
  text-transform: none;
  letter-spacing: 0.03em;
  font-weight: 400;
  color: rgba(61, 51, 44, 0.72);
}

form[data-inquiry-form] input,
form[data-inquiry-form] select,
form[data-inquiry-form] textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 2px 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(131, 114, 97, 0.55);
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  color-scheme: light;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
form[data-inquiry-form] textarea { resize: vertical; min-height: 96px; }

/* underline focus: the hairline darkens and thickens — no boxes */
form[data-inquiry-form] input:focus-visible,
form[data-inquiry-form] select:focus-visible,
form[data-inquiry-form] textarea:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 1px 0 0 var(--ink);
}

form[data-inquiry-form] select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233D332C' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
}

form[data-inquiry-form] ::placeholder {
  color: rgba(61, 51, 44, 0.45);
  opacity: 1;
}

form[data-inquiry-form] [aria-invalid="true"] {
  border-color: var(--error);
}
.field-error {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--error);
}

[data-form-status] {
  grid-column: 1 / -1;
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.6;
}
[data-form-status].is-error { color: var(--error); }

form[data-inquiry-form] button[type="submit"] {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 4px;
}

.form-trust {
  grid-column: 1 / -1;
  margin-top: 24px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.form-privacy {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(61, 51, 44, 0.72);
}

[data-form-success] h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(32px, 3vw, 40px);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 16px;
}
[data-form-success] p { max-width: 48ch; }
[data-form-success]:focus { outline: 2px solid var(--taupe); outline-offset: 4px; }

/* ============================================================
   FOOTER — quiet, three columns
   ============================================================ */
.site-foot {
  padding: clamp(72px, 9vw, 120px) var(--pad-x) 40px;
  border-top: 1px solid var(--hairline);
}
.foot-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.2;
  color: var(--taupe-warm);
  margin-bottom: clamp(48px, 6vw, 72px);
  max-width: 18ch;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
}
@media (min-width: 800px) {
  .foot-grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--grid-gap);
  }
  .foot-col:nth-child(1) { grid-column: 1 / 5; }
  .foot-col:nth-child(2) { grid-column: 6 / 8; }
  .foot-col:nth-child(3) { grid-column: 9 / 13; }
}

.foot-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 16px;
}
.foot-col p { margin: 0; font-size: 14.5px; line-height: 1.7; max-width: 34ch; }
.foot-col p + p { margin-top: 8px; }
.foot-col a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -10px;   /* slim rows, generous target */
  text-decoration: none;
  color: var(--ink);
}
.foot-col a:not(.btn):hover { color: var(--taupe-dark); text-decoration: underline; }
.foot-cta { margin-top: 18px; }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: rgba(61, 51, 44, 0.75);
}
.foot-bottom p { margin: 0; }

/* ============================================================
   SMALL-SCREEN POLISH
   ============================================================ */
@media (max-width: 480px) {
  .btn--nav { padding: 12px 16px; font-size: 11px; letter-spacing: 0.14em; }
}

/* ============================================================
   MOBILE STICKY CTA BAR — thumb-reach conversion path
   ============================================================ */
.kin-mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(246, 242, 236, 0.93);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--hairline);
  transform: translateY(110%);
  transition: transform 0.35s var(--ease-out);
}
.kin-mobile-bar.is-shown { transform: none; }
.kin-mobile-bar .btn { display: flex; width: 100%; }
@media (min-width: 700px) { .kin-mobile-bar { display: none; } }
@media (prefers-reduced-motion: reduce) { .kin-mobile-bar { transition: none; } }
