/* ==========================================================================
   Crown Coffee Gear — site styles
   Brand tokens live in :root. Edit those to retune the whole site.
   ========================================================================== */

:root {
  /* Surfaces */
  --black:        oklch(0.135 0.008 60);   /* page background */
  --black-raised: oklch(0.165 0.007 65);   /* cards / sections */
  --black-deep:   oklch(0.115 0.006 60);   /* alternating bands */
  --black-footer: oklch(0.105 0.005 60);
  --line:         oklch(0.24 0.008 70);    /* hairline borders */
  --line-soft:    oklch(0.26 0.008 70);

  /* Ink */
  --ink:          oklch(0.94 0.008 85);
  --ink-muted:    oklch(0.70 0.012 75);
  --ink-dim:      oklch(0.60 0.012 75);

  /* Accents — use sparingly */
  --amber:        oklch(0.78 0.115 68);    /* primary CTA / live */
  --amber-bright: oklch(0.83 0.12 68);     /* hover */
  --mint:         oklch(0.82 0.085 165);   /* success / fresh */
  --gold:         #d4ab65;                 /* logo gold */

  /* Type */
  --serif: "Instrument Serif", Georgia, serif;
  --sans:  "Instrument Sans", system-ui, -apple-system, sans-serif;

  --maxw: 1240px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: oklch(0.78 0.115 68 / .3); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }

/* ---- Layout helpers ------------------------------------------------------ */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 5vw; }
.section   { padding-block: clamp(70px, 9vw, 130px); }
.band      { background: var(--black-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.center    { text-align: center; }
.eyebrow   { font-size: 13px; letter-spacing: .34em; text-transform: uppercase; color: var(--amber); font-weight: 600; }
.lede      { font-size: clamp(17px, 2vw, 21px); line-height: 1.6; color: var(--ink-muted); }
.slogan    { font-family: var(--serif); font-style: italic; color: var(--amber); }

/* ---- Nav ----------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 15px 5vw;
  background: oklch(0.135 0.008 60 / .82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { height: 34px; width: auto; }
.brand span { font-family: var(--serif); font-size: 25px; line-height: 1; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 15.5px; color: var(--ink-muted); }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-block; font-family: inherit; font-size: 16.5px; font-weight: 600;
  padding: 14px 28px; border-radius: 100px; cursor: pointer; border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--amber); color: #1a1206; }
.btn-primary:hover { background: var(--amber-bright); }
.btn-ghost { border-color: oklch(0.4 0.01 70); color: var(--ink); }
.btn-ghost:hover { border-color: oklch(0.6 0.01 70); }
.btn-mint { background: var(--mint); color: #06140d; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; text-align: center; padding: clamp(70px,8vw,96px) 5vw clamp(70px,9vw,100px); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 8%, oklch(0.2 0.012 70), oklch(0.135 0.007 62) 62%); }
.hero h1 { font-size: clamp(54px, 8vw, 118px); line-height: .92; margin-top: 22px; }
.hero .lede { max-width: 600px; margin: 28px auto 0; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }
.hero-meta { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 46px; font-size: 14px; color: var(--ink-dim); }

/* ---- Dial visual (self-contained) ---------------------------------------- */
.dial-wrap { position: relative; width: min(420px, 82vw); aspect-ratio: 1; margin: 72px auto 0; }

/* ---- Cards / grids ------------------------------------------------------- */
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 32px 30px; background: var(--black-raised); }
.card .eyebrow { font-size: 13px; letter-spacing: .16em; }
.card h3 { font-size: 30px; margin: 12px 0; }
.card p { font-size: 16.5px; line-height: 1.55; color: var(--ink-muted); }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(34px, 5vw, 58px); line-height: 1.04; margin: 18px auto 0; max-width: 18ch; }

/* ---- Forms --------------------------------------------------------------- */
.field {
  background: var(--black-raised); border: 1px solid oklch(0.3 0.008 70);
  border-radius: 100px; padding: 14px 22px; font-size: 16px; color: var(--ink);
  font-family: inherit; outline: none; width: 100%;
}
.field:focus { border-color: var(--amber); }
.field.invalid { border-color: oklch(0.6 0.16 35); }
textarea.field { border-radius: 14px; resize: vertical; min-height: 120px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.form-row .field { flex: 1 1 260px; }
.form-note { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-top: 30px; font-size: 14px; color: var(--ink-dim); }
.success {
  border: 1px solid oklch(0.82 0.06 165 / .45); border-radius: 16px; padding: 28px;
  background: linear-gradient(oklch(0.19 0.012 150), oklch(0.165 0.008 130));
}
.success .check { font-size: 36px; color: var(--mint); line-height: 1; }
.success h3 { font-size: 28px; color: #fff; margin: 12px 0 6px; }
.success p { font-size: 16px; color: oklch(0.8 0.012 130); line-height: 1.5; }
[hidden] { display: none !important; }

/* ---- FAQ ----------------------------------------------------------------- */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-inline: auto; }
.faq-item { border: 1px solid var(--line-soft); border-radius: 14px; background: var(--black-raised); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; color: var(--ink); font-family: inherit;
  font-size: 18px; font-weight: 600; padding: 22px 26px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.faq-q:hover { color: #fff; }
.faq-q .plus { font-size: 24px; color: var(--amber); line-height: 1; transition: transform .25s ease; flex: none; }
.faq-item[open] .plus { transform: rotate(45deg); }
.faq-a { padding: 0 26px 22px; font-size: 16.5px; line-height: 1.6; color: var(--ink-muted); }

/* ---- Compatibility checker ----------------------------------------------- */
.checker { border: 1px solid var(--line-soft); border-radius: 22px; padding: clamp(26px,4vw,40px); background: var(--black-raised); text-align: left; }
.checker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; display: block; margin-bottom: 9px; }
.select { width: 100%; background: oklch(0.13 0.006 60); border: 1px solid oklch(0.32 0.008 70); border-radius: 12px;
  padding: 14px 16px; font-size: 16px; color: var(--ink); font-family: inherit; outline: none; cursor: pointer; }
.result { margin-top: 20px; border-radius: 14px; padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start; }
.result.ok   { background: linear-gradient(oklch(0.19 0.012 150),oklch(0.165 0.008 130)); border: 1px solid oklch(0.82 0.06 165 / .5); }
.result.soon { background: linear-gradient(oklch(0.2 0.018 68),oklch(0.165 0.01 66)); border: 1px solid oklch(0.78 0.07 68 / .5); }
.result.no   { background: var(--black-raised); border: 1px solid var(--line-soft); }
.result .ico { font-size: 28px; line-height: 1; flex: none; }
.result h4 { margin: 0; font-size: 20px; }
.result p  { margin: 4px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-muted); }

/* ---- Footer -------------------------------------------------------------- */
.footer { background: var(--black-footer); border-top: 1px solid var(--line); padding: clamp(56px,7vw,88px) 5vw 40px; }
.footer-grid { max-width: var(--maxw); margin-inline: auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 15px; color: var(--ink-muted); margin-bottom: 11px; }
.footer-col a:hover { color: #fff; }
.footer-brand img { height: 30px; margin-bottom: 12px; }
.footer-brand .name { font-family: var(--serif); font-size: 23px; color: #fff; }
.footer-bottom { max-width: var(--maxw); margin: 44px auto 0; padding-top: 24px; border-top: 1px solid oklch(0.2 0.008 70);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 13.5px; color: oklch(0.52 0.01 70); }
.footer-bottom a { margin-left: 22px; }
.footer-bottom a:hover { color: oklch(0.8 0.01 75); }

/* ---- Visible keyboard focus (WCAG 2.4.7) --------------------------------- */
/* Only shows on keyboard navigation (:focus-visible), so pointer/mouse users
   see no change to the visual design. Fields/selects keep their amber border
   on plain :focus and gain a clear ring when focused via the keyboard. */
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.field:focus-visible,
.select:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.faq-q:focus-visible { outline: 2px solid var(--amber); outline-offset: -3px; }
/* Don't draw the legacy outline for mouse users who don't get :focus-visible. */
:focus:not(:focus-visible) { outline: none; }

/* ---- Scroll reveal ------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 58px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: oklch(0.135 0.008 60 / .98); border-bottom: 1px solid var(--line); padding: 8px 5vw 20px; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; text-align: center; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .checker-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}
