/* Caffeinity — site styles
   Ported from `Caffeinity Site.dc.html`. Design tokens first, then layout. */

:root {
  --paper:      #F3F2F2;
  --paper-warm: #F8F4F4;
  --ink:        #201F1D;
  --ink-72:     rgba(32, 31, 29, .72);
  --ink-70:     rgba(32, 31, 29, .70);
  --ink-65:     rgba(32, 31, 29, .65);
  --ink-62:     rgba(32, 31, 29, .62);
  --ink-50:     rgba(32, 31, 29, .50);
  --ink-45:     rgba(32, 31, 29, .45);
  --rule:       rgba(32, 31, 29, .16);
  --hairline:   rgba(32, 31, 29, .12);
  --edge:       rgba(32, 31, 29, .10);

  --brass:      #B68235;
  --brass-ink:  #7D5411;
  --brass-wash: rgba(182, 130, 53, .10);
  --brass-wash-strong: rgba(182, 130, 53, .20);

  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --text:    Lora, Georgia, 'Times New Roman', serif;

  --shell:  1120px;
  --gutter: 32px;
  --radius: 7px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Stop iOS Safari inflating type when the phone is turned to landscape. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-wrap: break-word;
}

img { max-width: 100%; }

a {
  color: var(--brass-ink);
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease;
}
a:hover { color: var(--brass); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: rgba(182, 130, 53, .22); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 13px;
  letter-spacing: 1.15px;
}
.skip-link:focus { left: var(--gutter); top: 12px; }

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  /* env() keeps content clear of the notch / rounded corners in landscape. */
  padding-left: calc(var(--gutter) + env(safe-area-inset-left));
  padding-right: calc(var(--gutter) + env(safe-area-inset-right));
}

.rule {
  height: 1px;
  border: 0;
  background: var(--rule);
  margin: 0;
}

.eyebrow {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 1.15px;
  text-transform: uppercase;
  color: var(--ink-50);
}

.section { padding-top: 120px; }

.section-title {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 500;
  letter-spacing: -.5px;
  line-height: 1.1;
  margin: 14px 0 0;
}
.section-title.narrow { max-width: 14em; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.3px;
  color: var(--brass-ink);
  border: 1px solid var(--brass);
  background: var(--brass-wash);
  border-radius: var(--radius);
  padding: 16px 34px;
}
.btn:hover { background: var(--brass-wash-strong); color: var(--brass-ink); }

.btn-sm { font-size: 11.5px; letter-spacing: 1.15px; padding: 9px 18px; }
.btn-lg { background: rgba(182, 130, 53, .14); padding: 17px 38px; }
.btn-lg:hover { background: rgba(182, 130, 53, .24); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 242, 242, .92);
  border-bottom: 1px solid var(--hairline);
}
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .site-header { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}

.header-inner {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: block;
  mix-blend-mode: multiply;
}
.brand-mark-sm { width: 28px; height: 28px; }

.brand-word {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2.2px;
}
.brand-word-sm { font-size: 14px; letter-spacing: 2px; }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  min-width: 0;
}
.nav > a { font-size: 13px; color: var(--ink-62); white-space: nowrap; }
.nav > a:hover { color: var(--ink); }

.header-cta { flex: none; }
.header-cta:hover { color: var(--brass-ink); }

/* ---------- Hero ---------- */

.hero {
  padding-top: 88px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 72px;
  align-items: center;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(44px, 7.2vw, 76px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -1.2px;
  margin: 20px 0 0;
  max-width: 9.5em;
  text-wrap: pretty;
}

.lede {
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink-72);
  max-width: 30em;
  margin: 24px 0 0;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.cta-center { justify-content: center; gap: 16px; margin-top: 34px; }

.cta-note { font-size: 13.5px; color: var(--ink-50); }

.hero-shot { justify-self: end; width: 100%; }

.device {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--hairline);
  border-radius: 26px;
  box-shadow: 0 20px 50px rgba(32, 31, 29, .09);
}
.hero-shot .device {
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(32, 31, 29, .10);
}

/* ---------- Stats ---------- */

.stats {
  padding-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat { padding: 0 24px; border-left: 1px solid var(--hairline); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat:last-child { padding-right: 0; }

.stat-figure {
  font-family: var(--display);
  font-size: 34px;
  line-height: 1;
}
.stat-label {
  font-size: 10.5px;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-top: 4px;
}

/* ---------- Features ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 80px;
  align-items: center;
  margin-top: 104px;
}
.feature:first-of-type { margin-top: 72px; }
.feature-reverse { grid-template-columns: 320px 1fr; }

.feature-icon { display: block; width: 26px; height: 26px; opacity: .9; }

.feature-copy h3 {
  font-family: var(--display);
  font-size: clamp(27px, 3.6vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  margin: 16px 0 0;
}
.feature-copy > p {
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--ink-72);
  max-width: 32em;
  margin: 14px 0 0;
  text-wrap: pretty;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 12px;
}
.ticks li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 15.5px;
  color: rgba(32, 31, 29, .78);
}
.ticks li::before { content: "—"; color: var(--brass); }

/* ---------- Cards / steps ---------- */

.card {
  background: var(--paper-warm);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 28px 26px 30px;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-num {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2.1px;
  color: var(--brass-ink);
}
.steps h3 {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.2;
  margin: 14px 0 0;
}
.steps p {
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--ink-70);
  margin: 10px 0 0;
}

/* ---------- Privacy ---------- */

.privacy {
  padding: 52px 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.privacy h2 {
  font-family: var(--display);
  font-size: clamp(30px, 4.4vw, 40px);
  font-weight: 500;
  letter-spacing: -.4px;
  line-height: 1.12;
  margin: 18px 0 0;
}
.privacy > div > p {
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--ink-72);
  margin: 16px 0 0;
  text-wrap: pretty;
}

.promises {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}
.promises li {
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}
.promise-title { display: block; font-size: 15.5px; font-weight: 600; }
.promise-note {
  display: block;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-65);
  margin-top: 4px;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px 72px;
  margin-top: 44px;
}
.faq-item { border-top: 1px solid var(--rule); padding-top: 20px; }
.faq-item h3 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}
.faq-item p {
  font-size: 15.5px;
  line-height: 1.66;
  color: var(--ink-70);
  margin: 10px 0 0;
}

/* ---------- Closer ---------- */

.closer {
  border: 1px solid var(--brass);
  background: rgba(182, 130, 53, .07);
  border-radius: var(--radius);
  padding: 72px 40px;
  text-align: center;
}
.closer-mark {
  width: 84px;
  height: 84px;
  display: block;
  margin: 0 auto;
  mix-blend-mode: multiply;
}
.closer h2 {
  font-family: var(--display);
  font-size: clamp(36px, 5.6vw, 52px);
  font-weight: 500;
  letter-spacing: -.6px;
  line-height: 1.08;
  margin: 26px 0 0;
}
.closer > p {
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-72);
  margin: 14px auto 0;
  max-width: 32em;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-top: 64px;
  padding-bottom: 56px;
  margin-top: 80px;
}
.site-footer .rule { margin-bottom: 28px; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 26px; font-size: 13px; }
.footer-links a { color: rgba(32, 31, 29, .6); }
.footer-links a:hover { color: var(--brass-ink); }

.copyright { font-size: 13px; color: var(--ink-45); margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  :root { --gutter: 24px; }

  .section { padding-top: 88px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 56px;
    padding-bottom: 64px;
  }
  .hero-shot { justify-self: center; max-width: 320px; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px 0; }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }

  .feature,
  .feature-reverse {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 72px;
  }
  /* Keep image below copy on every row once stacked. */
  .feature-reverse .feature-copy { order: -1; }
  .feature > .device { max-width: 320px; justify-self: center; }

  .steps { grid-template-columns: 1fr; }

  .privacy { grid-template-columns: 1fr; gap: 36px; padding: 36px 28px; }

  .faq { grid-template-columns: 1fr; gap: 32px; }

  .closer { padding: 56px 28px; }
}

@media (max-width: 760px) {
  /* Brand and DOWNLOAD share the top row; the links get their own row below,
     scrolling sideways rather than wrapping into a ragged block. */
  .header-inner {
    flex-wrap: wrap;
    row-gap: 4px;
    padding-top: 12px;
    padding-bottom: 0;
  }
  .brand     { order: 1; }
  .header-cta{ order: 2; }
  .nav       { order: 3; flex-basis: 100%; }

  .nav {
    gap: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Bleed to the screen edges so the row reads as scrollable. */
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter);
  }
  .nav::-webkit-scrollbar { display: none; }

  /* Roomier hit targets — 13px text alone is a ~17px tall tap area. */
  .nav > a {
    font-size: 13px;
    padding: 12px 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav > a:first-child { padding-left: 0; }

  .btn { padding: 15px 26px; }
  .cta-row { gap: 14px; }
}

/* Very narrow phones (iPhone SE): shrink the wordmark so the brand and the
   DOWNLOAD button still share the top row instead of stacking. */
@media (max-width: 380px) {
  .brand { gap: 9px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-word { font-size: 13px; letter-spacing: 1.5px; }
  .header-cta { font-size: 10.5px; letter-spacing: .9px; padding: 9px 12px; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; gap: 22px 0; }
  .stat { padding-left: 0; padding-right: 0; border-left: 0; }

  /* Full-width buttons: easier to hit, and no awkward half-width wrap. */
  .cta-row { display: grid; justify-items: stretch; }
  .cta-row .btn { display: block; text-align: center; width: 100%; }
  .cta-note { text-align: center; }
  .header-cta { width: auto; display: inline-block; }

  .closer { padding: 44px 20px; }
  .privacy { padding: 32px 22px; }
  .card { padding: 24px 22px 26px; }
}

@media print {
  .site-header { position: static; }
  .device { box-shadow: none; }
}

/* ---------- Legal pages (privacy, support) ---------- */

.legal { padding-top: 64px; padding-bottom: 100px; max-width: 720px; }
.legal .eyebrow { margin-bottom: 6px; }
.legal .updated { color: var(--ink-50); font-size: 13px; margin: 10px 0 0; }
.legal h2 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
  margin: 48px 0 12px;
}
.legal h2:first-of-type { margin-top: 40px; }
.legal p { margin: 0 0 16px; color: var(--ink-72); }
.legal ul { margin: 0 0 16px; padding-left: 22px; color: var(--ink-72); }
.legal li { margin: 0 0 8px; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
