/* BrewPrint — brewprint.app site styles
   Warm, rounded, premium. Mirrors the app's palette + SF Rounded type. */

:root {
  --canvas: #faf6ef;
  --canvas-2: #f3ebdd;
  --surface: #ffffff;
  --surface-2: #f5efe4;
  --espresso: #432a1f;
  --espresso-soft: #6f4a37;
  --crema: #ead9bc;
  --amber: #e29a32;
  --ink: #2a201b;
  --muted: #6b5a4e;
  --line: rgba(67, 42, 31, 0.12);
  --shadow: 0 18px 50px -24px rgba(67, 42, 31, 0.45);
  --shadow-sm: 0 6px 22px -14px rgba(67, 42, 31, 0.4);
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1080px;
  --font: ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.6;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #1a1410; --canvas-2: #221a14; --surface: #241b15; --surface-2: #2c211a;
    --espresso: #e7cbaa; --espresso-soft: #d8b48f; --crema: #3a2b20; --ink: #f1e7db;
    --muted: #a8978a; --line: rgba(231, 203, 170, 0.16);
    --shadow: 0 18px 50px -24px rgba(0,0,0,0.7); --shadow-sm: 0 6px 22px -14px rgba(0,0,0,0.6);
  }
}

a { color: var(--espresso-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Skip link (keyboard / screen-reader) */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--espresso); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
  font-weight: 700; font-size: 15px;
}
.skip-link:focus { left: 0; text-decoration: none; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--espresso); font-size: 19px; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: var(--espresso); color: #fff; font-size: 18px;
}
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--ink); font-weight: 600; font-size: 16px; }
.nav-links a:hover { color: var(--espresso); text-decoration: none; }
@media (max-width: 680px) { .nav-links a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--espresso); color: #fff !important;
  padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 16px;
  box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.ghost { background: var(--surface); color: var(--espresso) !important; border: 1px solid var(--line); box-shadow: none; }

/* Hero */
.hero { padding: 84px 0 64px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 80%;
  background: radial-gradient(55% 55% at 72% 16%, color-mix(in srgb, var(--amber) 9%, transparent), transparent 72%);
  z-index: 0; pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; gap: 36px; } .hero { padding: 56px 0 40px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px;
  color: var(--espresso-soft); background: var(--surface-2); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 20px;
}
h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 18px; color: var(--espresso); font-weight: 800; }
.lede { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 30ch; margin: 0 0 28px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta-note { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* Phone mock + caffeine curve */
.phone {
  justify-self: center; width: min(320px, 82vw); aspect-ratio: 320 / 660;
  background: var(--surface); border-radius: 44px; border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 18px; position: relative;
}
.phone .screen { width: 100%; height: 100%; border-radius: 30px; background: var(--canvas-2); overflow: hidden; display: flex; flex-direction: column; padding: 22px 18px; gap: 14px; }
.phone .ring { width: 150px; height: 150px; border-radius: 50%; margin: 8px auto 4px; display: grid; place-items: center;
  background: conic-gradient(var(--espresso) 0 62%, var(--crema) 62% 100%); }
.phone .ring span { width: 116px; height: 116px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 34px; color: var(--ink); }
.phone .mini { font-size: 12px; color: var(--muted); text-align: center; }
.phone .curve { margin-top: auto; background: var(--surface); border-radius: 16px; padding: 12px; }
.phone .curve svg { width: 100%; height: 74px; display: block; }

/* Real screenshot hero + gallery */
.hero-shot { justify-self: center; width: min(300px, 76vw); height: auto; border-radius: 40px; box-shadow: var(--shadow); display: block; }
.gallery { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; }
.gallery img { width: min(236px, 64vw); height: auto; border-radius: 32px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }

/* Sections */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; color: var(--espresso); margin: 0 0 12px; font-weight: 800; }
.section-head p { color: var(--muted); margin: 0; font-size: 18px; }
.alt { background: var(--canvas-2); }

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.card .ico { width: 46px; height: 46px; border-radius: 13px; background: color-mix(in srgb, var(--amber) 18%, var(--surface)); display: grid; place-items: center; font-size: 22px; margin-bottom: 14px; }
.card h3 { margin: 0 0 8px; font-size: 20px; color: var(--espresso); font-weight: 750; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

/* Privacy band */
.privacy-band { background: var(--espresso); color: #fff; border-radius: var(--radius); padding: 48px; text-align: center; box-shadow: var(--shadow); }
.privacy-band h2 { color: #fff; font-size: clamp(26px, 4vw, 34px); margin: 0 0 12px; letter-spacing: -0.02em; }
.privacy-band p { color: color-mix(in srgb, #fff 78%, transparent); max-width: 56ch; margin: 0 auto; font-size: 17px; }
.pill-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.pill { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); color: #fff; padding: 8px 15px; border-radius: 999px; font-size: 14px; font-weight: 600; }

/* Science note */
.note { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; color: var(--muted); font-size: 15px; }
.note a { font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--canvas-2); padding: 40px 0; margin-top: 24px; }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); font-weight: 600; font-size: 15px; }
.foot-links a:hover { color: var(--espresso); text-decoration: none; }
.foot small { color: var(--muted); }

/* Legal / article pages */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 72px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); margin: 0 0 8px; }
.doc .meta { color: var(--muted); font-size: 15px; margin: 0 0 36px; }
.doc h2 { font-size: 23px; color: var(--espresso); margin: 36px 0 12px; letter-spacing: -0.01em; }
.doc h3 { font-size: 19px; color: var(--espresso); margin: 26px 0 8px; }
.doc p, .doc li { color: var(--ink); font-size: 17px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .callout { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin: 22px 0; }
.doc .emergency { background: color-mix(in srgb, #c0392b 6%, var(--surface)); border-color: color-mix(in srgb, #c0392b 26%, var(--line)); }
.back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; font-size: 15px; margin-bottom: 24px; }

/* SEO / guide article extras (shared by the calculator + guide pages) */
table.drinks { width: 100%; border-collapse: collapse; margin: 14px 0 8px; font-size: 16px; }
table.drinks th, table.drinks td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.drinks th { color: var(--espresso); font-size: 14px; }
table.drinks td:last-child, table.drinks th:last-child { text-align: right; }
.cta-card { background: var(--espresso); color: #fff; border-radius: var(--radius); padding: 30px; text-align: center; box-shadow: var(--shadow); margin: 36px 0 8px; }
.cta-card h2 { color: #fff; margin: 0 0 8px; font-size: 24px; }
.cta-card p { color: color-mix(in srgb, #fff 80%, transparent); margin: 0 auto 18px; max-width: 46ch; font-size: 16px; }
.crosslinks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 0; }
@media (max-width: 620px) { .crosslinks { grid-template-columns: 1fr; } }
.crosslinks a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; color: var(--ink); box-shadow: var(--shadow-sm); }
.crosslinks a:hover { text-decoration: none; transform: translateY(-1px); }
.crosslinks b { display: block; color: var(--espresso); font-size: 16px; margin-bottom: 3px; }
.crosslinks span { color: var(--muted); font-size: 14px; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
