/* ABOUT: Styles for www.closenest.app — the CloseNest design tokens (docs/design/01-tokens.md) on one page */
/* ABOUT: Light only, linen page as in the CN1–CN8 store art, ink footer; no shadows, no script, no third-party requests */

@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/LibreBaskerville-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/LibreBaskerville-Bold.ttf") format("truetype");
}

:root {
  /* colour — the tokens, nothing else */
  --cn-porcelain: #FCFAF6;
  --cn-linen: #F2EFE8;
  --cn-ink: #2A2723;
  --cn-ink-muted: #6B665E;
  --cn-salmon: #FF6F61;
  --cn-salmon-ink: #B9432F;
  --cn-ink-10: rgba(42, 39, 35, 0.1);

  /* type — Libre Baskerville 400 and 700; the app's five sizes, plus the store art's headline size */
  --font-family: "Libre Baskerville", ui-serif, Georgia, "Times New Roman", serif;
  --font-size-display: clamp(2rem, 1.4rem + 2vw, 3rem);       /* the CN1–CN8 headline: 32 on a phone, 48 on a desktop */
  --font-size-display-intro: clamp(1.25rem, 1rem + 1vw, 2rem); /* the Insights sentence, too long for the full size */
  --font-size-body-title: 1.25rem;    /* 20 */
  --font-size-body-subtitle: 1.125rem;/* 18 */
  --font-size-body-small: 1rem;       /* 16 */
  --font-size-nav: 0.75rem;           /* 12 */

  /* space, shape, line and motion — from the tokens */
  --gutter: 27px;                     /* gutterScreen */
  --gap-card: 18px;                   /* cardPadding, stackGapCards */
  --gap-stack: 23px;                  /* todayStackInset */
  --gap-wide: 44px;                   /* gutterOnboarding */
  --section-space: 88px;              /* two onboarding gutters */
  --radius-control: 8px;
  --radius-card: 16px;
  --radius-card-lg: 24px;
  --rule: 3px;
  --ease-fade: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-base: 220ms;

  color-scheme: light;
}

@media (min-width: 900px) {
  :root {
    --gutter: 44px;
    --section-space: 132px;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cn-linen);
  color: var(--cn-ink);
  font-family: var(--font-family);
  font-size: var(--font-size-body-small);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
strong { font-weight: 700; }
.nowrap { white-space: nowrap; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
/* Focus: salmon as text colour on the light page (salmon itself is too faint there), salmon on the ink footer */
a:focus-visible, .panels:focus-visible { outline: var(--rule) solid var(--cn-salmon-ink); outline-offset: 4px; border-radius: var(--radius-control); }
.site-footer a:focus-visible { outline-color: var(--cn-salmon); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: var(--gutter); }

/* Header: transparent over the linen page */
.site-header { background: transparent; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 88px; }

.brand { display: flex; flex-direction: column; gap: 10px; }
.wordmark { display: block; color: var(--cn-ink); }
/* The strapline's ink runs the wordmark's letters, C to t (the ® left out), with no full stop to fall short on:
   tracked as the invite code is (0.04em), it is sized to fit — 12.46, between the app's 12 and 14 — and steps
   half a pixel left so its C sits on the wordmark's. */
.strapline { font-size: 12.46px; line-height: 1; letter-spacing: 0.04em; margin-left: -0.5px; }
.wordmark svg, svg.wordmark { width: auto; height: 26px; aspect-ratio: 164 / 26; fill: currentColor; }

.store-badge { display: inline-block; border-radius: 8px; transition: opacity var(--duration-base) var(--ease-fade); }
.store-badge:hover { opacity: 0.8; }
.store-badge img { width: auto; height: 40px; }
.store-badge--large img { height: 54px; }
.store-badge--header { display: none; }
@media (min-width: 720px) { .store-badge--header { display: inline-block; } }

/* Type */
.display {
  font-size: var(--font-size-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display--intro { font-size: var(--font-size-display-intro); line-height: 1.35; }
.display--closing { font-size: 2rem; }  /* the headline's phone size, kept on a desktop: a sign-off, not a heading */
.kicker { font-size: var(--font-size-body-subtitle); color: var(--cn-ink-muted); margin-bottom: var(--gap-card); }
.lead { font-size: var(--font-size-body-title); line-height: 1.4; margin-top: var(--gap-stack); text-wrap: pretty; }

/* The salmon rule: the app's active-tab indicator, marking each section */
.marker { display: block; width: 44px; height: var(--rule); background: var(--cn-salmon); margin-bottom: var(--gap-stack); }

/* Rows: words beside a phone on a desktop; words above the phone on a phone, as in the store art */
.row { display: grid; gap: var(--gap-wide); justify-items: center; text-align: center; }
.row__text { max-width: 520px; }
.row__text .marker { margin-inline: auto; }
.row__media { width: 100%; display: flex; justify-content: center; }

@media (min-width: 900px) {
  .row { grid-template-columns: 1fr 1fr; align-items: center; justify-items: start; text-align: left; column-gap: 88px; }
  .row__text .marker { margin-inline: 0; }
  .row--flip .row__media { order: -1; }
}

.phone { width: min(300px, 74vw); height: auto; }
.phone--hero { width: min(340px, 80vw); }

/* Hero */
.hero { padding-block: var(--gap-card) var(--section-space); }
.hero .store-badge { margin-top: var(--gap-wide); }

/* Sections */
.section { padding-block: 0 var(--section-space); }

.lines { margin-top: var(--gap-wide); display: grid; gap: var(--gap-card); }
.lines li {
  background: var(--cn-porcelain);
  border: 1px solid var(--cn-ink-10);
  border-radius: var(--radius-card);
  padding: var(--gap-card) var(--gap-stack);
  font-size: var(--font-size-body-subtitle);
  line-height: 1.4;
}

/* Insights: three phones in a row, or a row to swipe on a phone */
.intro { max-width: 860px; margin-inline: auto; text-align: center; }
.intro .marker { margin-inline: auto; }

.panels {
  margin-top: var(--section-space);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-wide);
}
.panel { display: flex; flex-direction: column; align-items: center; text-align: center; }
.panel .phone { width: min(300px, 100%); }
.panel__title {
  margin-top: var(--gap-wide);
  max-width: 300px;
  font-size: var(--font-size-body-title);
  font-weight: 400;
  line-height: 1.4;
  text-wrap: balance;
}

@media (max-width: 759px) {
  .panels {
    margin-top: var(--gap-wide);
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    display: flex;
    gap: var(--gap-stack);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .panels::-webkit-scrollbar { display: none; }
  .panel { flex: 0 0 min(260px, 72vw); scroll-snap-align: center; }
  .panel .phone { width: 100%; }
  .panel__title { margin-top: var(--gap-stack); font-size: var(--font-size-body-subtitle); }
}

/* Privacy: the one porcelain panel, the app's own screen colour */
.privacy {
  background: var(--cn-porcelain);
  border-radius: var(--radius-card-lg);
  padding: var(--section-space) var(--gutter);
}
@media (min-width: 900px) {
  .privacy { padding: var(--gap-wide) 88px; }
}

/* Closing */
.closing { padding-block: 0 var(--section-space); }
.closing__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.closing__art { width: 266px; height: auto; margin-bottom: var(--gap-wide); }
.closing .store-badge { margin-top: var(--gap-wide); }

/* Footer: inverted — porcelain on ink */
.site-footer { background: var(--cn-ink); color: var(--cn-porcelain); padding-block: 88px; }
.site-footer__inner {
  display: grid;
  gap: var(--gap-wide);
  grid-template-columns: 1fr;
  font-size: var(--font-size-body-small);
}
.wordmark--footer { color: var(--cn-porcelain); }
.site-footer__brand p { margin-top: var(--gap-card); }
.site-footer__links { display: grid; gap: var(--gap-card); }
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__legal { font-size: var(--font-size-nav); }

@media (min-width: 720px) {
  .site-footer__inner { grid-template-columns: 1fr auto; align-items: start; }
  .site-footer__links { justify-items: end; }
  .site-footer__legal { grid-column: 1 / -1; }
}
