/*
  Nestmark site. The page is a "sheet" (deep plum, the kerf colour) and every section is a
  "piece" cut from it: square corners, a kerf-width gap between pieces, colours from the app's
  Iris palette. Same idea as the App Store screenshots.
*/
@font-face { font-family: 'Young Serif'; src: url('/nestmark/assets/fonts/YoungSerif.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('/nestmark/assets/fonts/SourceSans3.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Chivo Mono'; src: url('/nestmark/assets/fonts/ChivoMono.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --kerf: 10px;
  --plum: #1B1926;
  --plum-card: #282437;
  --lavender: #DBDAF1;
  --lavender-2: #E9E8F6;
  --lavender-3: #A5A4D8;
  --light: #F2F1FA;
  --ink: #252525;
  --purple: #573476;
  --lift: #B9A0DC;
  --yellow: #FECD1A;
  --magenta: #FC1C88;
  --dotted: #C9C7E6;
  --serif: 'Young Serif', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  --mono: 'Chivo Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { background: var(--plum); scroll-behavior: smooth; }
body {
  margin: 0; background: var(--plum); color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- sheet + pieces */
.sheet { max-width: 1440px; margin: 0 auto; padding: var(--kerf); display: grid; gap: var(--kerf); }
.row { display: grid; gap: var(--kerf); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.piece { position: relative; padding: clamp(28px, 4.6vw, 68px); min-width: 0; }
.piece.tight { padding: clamp(24px, 3.2vw, 44px); }

.lavender   { background: var(--lavender); }
.lavender-2 { background: var(--lavender-2); }
.lavender-3 { background: var(--lavender-3); }
.white      { background: #fff; }
.yellow     { background: var(--yellow); }
.purple     { background: var(--purple); color: var(--light); }
.plum       { background: var(--plum-card); color: var(--light); }
.magenta    { background: var(--magenta); color: #fff; }
.waste {
  background: #262233 repeating-linear-gradient(135deg, #4A4768 0 2px, transparent 2px 22px);
  min-height: 60px;
}

/* ---------------------------------------------------------------- type */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(44px, 6.1vw, 86px); line-height: 1.02; }
h2 { font-size: clamp(32px, 3.7vw, 54px); line-height: 1.05; }
h3 { font-size: clamp(24px, 2.1vw, 30px); line-height: 1.12; }
p { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.55; margin: 0; }
p + p { margin-top: 0.8em; }
.lede { font-size: clamp(19px, 1.65vw, 23px); line-height: 1.45; font-weight: 500; max-width: 36ch; }
.lavender .lede, .lavender-2 .lede, .white .lede { color: var(--purple); }
.purple p, .plum p { color: #DCD3EE; }
.magenta p { color: #fff; font-weight: 600; font-size: clamp(19px, 1.45vw, 21px); }
.muted { opacity: 0.78; }
.stack > * + * { margin-top: 18px; }

.eyebrow {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
  font: 500 13px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--purple);
}
.purple .eyebrow, .plum .eyebrow { color: var(--lift); }
.yellow .eyebrow { color: var(--ink); }
.magenta .eyebrow { color: #fff; }
.badge {
  display: inline-block; font: 600 15px/1 var(--mono); letter-spacing: 0; padding: 7px 10px 6px;
  border-radius: 8px; background: var(--yellow); color: var(--ink);
}
.yellow .badge { background: var(--ink); color: var(--yellow); }
.pro {
  font: 600 11px/1 var(--mono); letter-spacing: 0.14em; padding: 6px 9px 5px; border-radius: 999px;
  border: 2px solid currentColor;
}

/* ---------------------------------------------------------------- wordmark */
.wordmark {
  display: inline-flex; align-items: flex-start; font: 400 30px/1 var(--serif); color: var(--ink);
  text-decoration: none; letter-spacing: -0.005em;
}
.wordmark .prime { display: inline-flex; gap: 0.055em; margin: 0.02em 0 0 0.1em; transform: skewX(-14deg); }
.wordmark .prime i { display: block; width: 0.085em; height: 0.36em; border-radius: 0.035em; background: var(--magenta); }
.plum .wordmark, .purple .wordmark { color: var(--light); }
.plum .wordmark .prime i, .purple .wordmark .prime i { background: var(--yellow); }

/* ---------------------------------------------------------------- nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav a:not(.wordmark) { font: 600 16px/1 var(--sans); text-decoration: none; }
.nav a:not(.wordmark):hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------- buttons + tags */
.appstore {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 24px 15px; border-radius: 999px;
  background: var(--ink); color: #fff; font: 650 17px/1 var(--sans); text-decoration: none;
}
.appstore[aria-disabled="true"] { cursor: default; }
.appstore .soon { font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--yellow); }
.textlink { font-weight: 650; text-underline-offset: 4px; }

.tag {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font: 650 17px/1 var(--sans); padding: 11px 16px 10px; border-radius: 999px;
  background: var(--yellow); color: var(--ink); box-shadow: 0 10px 24px rgba(18, 12, 38, 0.25);
}
.tag small { font-size: 14px; font-weight: 500; opacity: 0.75; }
.tag.ink { background: var(--ink); color: var(--yellow); }
.tag.attention { background: #fff; color: var(--ink); border: 2.5px dashed var(--magenta); box-shadow: none; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags .tag { box-shadow: none; }
.yellow .tag:not(.attention) { background: var(--ink); color: var(--yellow); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { font: 600 15px/1 var(--sans); padding: 9px 13px 8px; border-radius: 999px; background: rgba(87, 52, 118, 0.1); color: var(--purple); }

/* ---------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 4vw, 64px); align-items: center; margin-top: clamp(40px, 6vw, 88px); }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.hero-phone { position: relative; width: min(390px, 100%); margin: 0 auto; }
.hero-phone img { width: 100%; filter: drop-shadow(0 34px 44px rgba(14, 10, 30, 0.38)); }
.hero-phone .tag { position: absolute; }
.hero-phone .t1 { right: -6%; top: 20.5%; }
.hero-phone .t2 { left: -14%; top: 54%; }

/* ---------------------------------------------------------------- glyph cards (same as screenshots 3 and 6) */
.glyphs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.glyph-card { background: #fff; color: var(--ink); border-radius: 18px; padding: 16px 16px 18px; }
.glyph-card svg { width: 76px; height: 58px; display: block; margin-bottom: 10px; }
.glyph-card b { display: block; font: 700 18px/1.1 var(--sans); }
.glyph-card span { display: block; margin-top: 5px; font: 500 15px/1.25 var(--sans); color: var(--purple); }

/* ---------------------------------------------------------------- features */
.feature { display: flex; flex-direction: column; gap: 16px; }
.feature .head { display: flex; align-items: center; gap: 12px; }
.feature h3 { max-width: 18ch; }
.feature .art { margin-top: auto; padding-top: 8px; }
.tape { background: #fff; color: var(--ink); border-radius: 18px; padding: 6px 18px; }
.tape div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.tape div + div { border-top: 2px dotted var(--dotted); }
.tape code { font: 500 18px/1 var(--mono); }
.tape .tag { box-shadow: none; padding: 8px 13px 7px; }
.pdf-art { display: flex; justify-content: center; }
.pdf-art img { width: min(300px, 80%); transform: rotate(3deg); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45); }

/* ---------------------------------------------------------------- pricing */
.price { font: 400 clamp(40px, 4vw, 56px)/1 var(--serif); padding-bottom: 10px; }
.price small { font: 600 16px/1 var(--sans); margin-left: 8px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.35; }
.checks svg { flex: none; width: 24px; height: 24px; margin-top: 1px; }
.fine { font: 600 13px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------------------------------------------------------------- faq */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(24px, 4vw, 64px); }
.faq details { border-top: 2px dotted var(--dotted); padding: 18px 0; }
.faq details:last-child { border-bottom: 2px dotted var(--dotted); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font: 650 clamp(18px, 1.4vw, 20px)/1.3 var(--sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 500 24px/1 var(--mono); color: var(--purple); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin-top: 10px; max-width: 60ch; }

/* ---------------------------------------------------------------- footer */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; align-items: flex-end; }
.footer nav ul { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; margin: 0; padding: 0; }
.footer nav a { font-weight: 650; text-decoration: none; }
.footer nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer .small { font-size: 15px; color: #B9B6D9; margin-top: 10px; }

/* ---------------------------------------------------------------- legal pages */
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: clamp(40px, 5vw, 64px); }
.legal .updated { margin-top: 14px; font: 500 13px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--purple); }
.legal h2 { font-size: clamp(24px, 2.4vw, 30px); margin-top: 48px; padding-top: 28px; border-top: 2px dotted var(--dotted); }
.legal h3 { font: 700 19px/1.3 var(--sans); margin-top: 26px; }
.legal p, .legal li { font-size: 18px; line-height: 1.6; }
.legal p { margin-top: 14px; }
.legal ul { margin: 14px 0 0; padding-left: 22px; }
.legal li + li { margin-top: 8px; }
.legal .summary { margin-top: 28px; padding: 22px 26px; background: var(--lavender-2); border-left: 6px solid var(--yellow); }
.legal .summary p { margin: 0; }
.legal .caps { text-transform: uppercase; font-size: 16px; letter-spacing: 0.01em; }
.legal a { color: var(--purple); font-weight: 600; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- legal pages inside the app (?app=1) */
/* The app shows these in its own sheet, with its own title bar, on its own background. */
html.in-app, html.in-app body { background: transparent; }
.in-app .sheet { padding: 0; }
.in-app .sheet > header, .in-app .sheet > footer, .in-app .legal .eyebrow, .in-app .legal h1 { display: none; }
.in-app article.piece { background: transparent; padding: 18px 20px 48px; }
.in-app .legal .updated { margin-top: 0; }
.in-app .legal .summary { background: #fff; }
.in-app .legal p, .in-app .legal li { font-size: 17px; }
.in-app .legal h2 { font-size: 24px; margin-top: 36px; padding-top: 22px; }
.in-app .legal h3 { font-size: 18px; }
@media (prefers-color-scheme: dark) {
  .in-app body { color: var(--light); }
  .in-app .legal .updated, .in-app .legal a { color: var(--lift); }
  .in-app .legal h2 { border-top-color: #454161; }
  .in-app .legal .summary { background: var(--plum-card); }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row .span-2 { grid-column: span 2; }
}
@media (max-width: 760px) {
  :root { --kerf: 8px; }
  .row, .row.two { grid-template-columns: minmax(0, 1fr); }
  .row .span-2 { grid-column: auto; }
  .nav ul { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-phone { width: min(300px, 78%); }
  .hero-phone .t1 { right: -12%; }
  .hero-phone .t2 { left: -12%; }
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .glyph-card svg { width: 60px; height: 46px; }
  .glyph-card b { font-size: 16px; }
  .glyph-card span { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
