/* NetKit Subnet — site styles.
   The app's design system (design/ in this repo): the "Slate" palette, a blue-grey ground
   with a teal primary and an indigo secondary, Manrope ExtraBold headings over Figtree,
   pill buttons and over-rounded cards. The hex values are the app's own asset-catalog
   colors, converted from the design's OKLCH formulas, so the site and the app match.
   Light by default; dark follows the visitor's system setting. */

/* Self-hosted so no visitor IP reaches Google and the CSP can stay same-origin.
   Both are variable fonts subset to Latin and Latin Extended; OFL licenses in fonts/. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/manrope.woff2') format('woff2');
}

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/figtree.woff2') format('woff2');
}

:root {
  color-scheme: light dark;

  --ground:      #f7fbfe;  /* page */
  --surface:     #e8f2f9;  /* cards, bands */
  --surface-2:   #d3e0ea;
  --ink:         #0e1c26;
  --ink-soft:    #516676;  /* 5.7:1 on the ground */
  --rule:        #d6dfe7;
  --teal:        #008687;  /* fills and large text only (4.2:1) */
  --teal-text:   #006a6a;  /* links and small teal text (6.2:1) */
  --teal-soft:   #d3eeee;
  --teal-soft-ink: #004f4f;
  --indigo-soft: #e0e7ff;
  --indigo-ink:  #3a4277;
  --indigo:      #6d7ac2;
  --button:      #006a6a;  /* white on it: 6.4:1 */

  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(14, 28, 38, .12);
  --shadow-md: 0 4px 16px rgba(14, 28, 38, .12);

  --measure: 64ch;
  --gutter: clamp(1rem, 5vw, 4rem);

  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:      #091016;
    --surface:     #141e26;
    --surface-2:   #242f37;
    --ink:         #eef2f6;
    --ink-soft:    #93a0aa;
    --rule:        #282f34;
    --teal:        #289f9f;
    --teal-text:   #70c1c1;
    --teal-soft:   #093b3b;
    --teal-soft-ink: #acdcdb;
    --indigo-soft: #2b304f;
    --indigo-ink:  #bdc8f6;
    --indigo:      #7986cf;
    --button:      #007373;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .45);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--teal-text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
::selection { background: var(--teal-soft); color: var(--teal-soft-ink); }

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

.prose { max-width: var(--measure); }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 6.5vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; }

.lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
}

.small { font-size: 0.9rem; color: var(--ink-soft); }

b, strong { font-weight: 700; }

.eyebrow {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: 0.6rem;
}

.num { font-variant-numeric: tabular-nums; }

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

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.1rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.mark:hover { color: var(--ink); }
.mark img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-sm); }

.site-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
  padding-block: 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current='page'] { border-bottom-color: var(--teal); }

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

.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem); }

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.status {
  display: inline-block;
  background: var(--indigo-soft);
  color: var(--indigo-ink);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 1.3rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  background: var(--button);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
.btn:hover { color: #fff; filter: brightness(1.08); }
.btn:active { filter: brightness(0.92); }

.btn.ghost { background: var(--teal-soft); color: var(--teal-soft-ink); box-shadow: none; }
.btn.ghost:hover { color: var(--teal-soft-ink); }

/* The calculator card: a live-looking result in the app's "Workbench" layout. Static HTML. */
.calc {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow-md);
}
.calc .field {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  background: var(--ground);
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.calc .prefix { font-family: var(--font-display); font-weight: 800; color: var(--teal-text); font-size: 1.4rem; }
.calc .bar { height: 8px; border-radius: 999px; margin: 1.1rem 0 0.6rem; background: linear-gradient(to right, var(--teal) 0 81%, var(--surface-2) 81% 100%); }
.calc .meta { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.calc dl { margin: 1.2rem 0 0; }
.calc dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid var(--rule); }
.calc dt { color: var(--ink-soft); }
.calc dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.tag {
  display: inline-block;
  margin-top: 1rem;
  background: var(--indigo-soft);
  color: var(--indigo-ink);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ---------- Sections ---------- */

.band { padding-block: clamp(3rem, 7vw, 5rem); }
.band.tint { background: var(--surface); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.cards {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
/* Four cards: two by two, so none is left on its own row. */
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.cards li {
  background: var(--ground);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.cards .icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-soft-ink);
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 1rem;
}
.cards li:nth-child(even) .icon { background: var(--indigo-soft); color: var(--indigo-ink); }
.cards h3 { margin-bottom: 0.35em; }
.cards p { color: var(--ink-soft); margin: 0; }

.ticks { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.ticks li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.75rem;
  align-items: start;
}
.ticks li::before {
  content: '';
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-top: 0.45em;
  background: var(--teal);
}
.ticks li:nth-child(even)::before { background: var(--indigo); }

/* App screenshots, framed like the phone. */
.shots { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 2rem; }
.shots figure { margin: 0; flex: 1 1 220px; max-width: 300px; }
.shots img { border-radius: 28px; box-shadow: var(--shadow-md); border: 6px solid var(--ink); background: var(--ink); }
.shots figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.6rem; }

/* The privacy promise: the product's main difference from web-based calculators. */
.promise {
  background: var(--teal-soft);
  color: var(--teal-soft-ink);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.promise h2, .promise p, .promise li, .promise b { color: var(--teal-soft-ink); }
.promise .eyebrow { color: var(--teal-soft-ink); opacity: 0.8; }
.promise a { color: var(--teal-soft-ink); text-decoration: underline; }
.promise p:last-child { margin-bottom: 0; }

.facts { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.facts li { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; }
.facts b { min-width: 9rem; }

/* ---------- Text pages ---------- */

.page { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem); }
.page h2 { font-size: 1.5rem; margin-top: 2.4rem; }
.page h3 { margin-top: 1.8rem; }
.page ul:not(.facts) { padding-left: 1.2rem; }
.page li { margin-bottom: 0.5em; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.92em; background: var(--surface); border-radius: 6px; padding: 0.05em 0.35em; }

/* Drafted copy awaiting the owner's read. See README. */
mark.fill {
  background: #ffe7a3;
  border-bottom: 2px solid #b27a00;
  padding: 0 0.2em;
  color: #0e1c26;
}

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

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: baseline; }
.site-foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  transform: translateY(-130%);
  background: var(--button);
  color: #fff;
  padding: 0.7rem 1.1rem;
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Print ---------- */

@media print {
  .site-head, .site-foot, .skip, .actions, .shots { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.5; }
  .band, .page, .hero { padding-block: 0.6rem; }
  .band.tint, .promise, .cards li, .calc { background: none; box-shadow: none; }
  a { color: #000; text-decoration: underline; }
  .page a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  mark.fill { background: none; color: #000; border-bottom: 1px solid #999; }
  h1, h2, h3 { break-after: avoid; }
  li, p { break-inside: avoid; }
}
