/* ============================================================
   PageSage static site — shared stylesheet
   Calibrated Instrument visual system (matches extension main.css).
   Used by index.html, privacy.html, terms.html.
   Tokens kept verbatim with the extension @theme so the two ends
   stay visually identical.
   ============================================================ */

:root {
  --color-bg: #F2F3F0;
  --color-surface: #FAFBF9;
  --color-fg: #191C1E;
  --color-fg-soft: #5D6468;
  --color-border: #D6D9D3;
  --color-border-strong: #9CA29C;
  --color-accent: #E25303;
  --color-accent-deep: #B84400;

  --font-display: "Archivo", "Helvetica Neue", system-ui, sans-serif;
  --font-body:    "Instrument Sans", "Helvetica Neue", system-ui, sans-serif;
  --font-mono:    "Martian Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}

/* ============================================================
   Reset & global
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

::selection {
  background: var(--color-fg);
  color: var(--color-bg);
}

/* ============================================================
   Layout
   ============================================================ */
.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem clamp(1.25rem, 5vw, 2rem) 2rem;
}

/* ============================================================
   Masthead
   ============================================================ */
.masthead {
  padding-bottom: 1.2rem;
  margin-bottom: 1rem;
}

.masthead-title {
  display: flex;
  align-items: center;
  gap: 0;
}

.masthead-dingbat {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  flex-shrink: 0;
  margin-top: .3em;
  margin-right: .55em;
}

.masthead-name {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.8vw, 1.35rem);
  letter-spacing: .03em;
  line-height: 1.1;
  text-transform: uppercase;
}

.masthead-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--color-fg-soft);
  text-transform: lowercase;
  margin-top: .3rem;
}

/* Caliper tick band — global divider memory point.
   Two-layer gradient: short ticks every 8px, tall ticks every 40px. */
.ticks {
  height: 12px;
  border-top: 1px solid var(--color-border);
  background-image:
    repeating-linear-gradient(90deg, var(--color-border-strong) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, var(--color-border-strong) 0 1px, transparent 1px 40px);
  background-size: 8px 5px, 40px 11px;
  background-repeat: repeat-x, repeat-x;
  background-position: 0 0, 0 0;
  margin-bottom: 2.8rem;
}

/* ============================================================
   Hero (index)
   ============================================================ */
.hero {
  margin-bottom: 4rem;
}

.hero-h1 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: .015em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}

.lede {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2vw, 1.15rem);
  line-height: 1.55;
  color: var(--color-fg);
  max-width: 38rem;
}

/* ============================================================
   CTA — primary "Add to Chrome": solid fg, the main power switch.
   Other CTAs on the page keep the outlined "instrument key" voice.
   ============================================================ */
.cta-wrap {
  margin-top: 1.8rem;
}

.cta-btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-bg);
  background: var(--color-fg);
  border: 1px solid var(--color-fg);
  border-radius: 2px;
  padding: 12px 18px;
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  line-height: 1;
  transition: filter 120ms ease-out;
}
.cta-btn:hover {
  filter: brightness(1.15);
}
.cta-btn .arrow {
  color: var(--color-accent);
  font-weight: 600;
}

.cta-coming {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
}

.cta-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-fg-soft);
  margin-top: .75rem;
}

/* ============================================================
   Sellpoints — three numbered "instrument panel" cells (index)
   ============================================================ */
.sellpoints-section {
  border-top: 1px solid var(--color-border);
  padding-top: 2.4rem;
  margin-bottom: 3rem;
}

.sellpoints-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Kicker: leading tick + mono number — calibration label voice.
   Reused by legal-page section numbers. */
.sell-kicker {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-accent-deep);
  display: flex;
  align-items: center;
  gap: .55em;
  margin-bottom: .6rem;
}

.sell-kicker::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--color-border-strong);
  flex-shrink: 0;
}

.sell-title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: .5rem;
  line-height: 1.2;
}

.sell-body {
  font-family: var(--font-body);
  font-size: .98rem;
  line-height: 1.55;
  color: var(--color-fg);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 1.4rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .8rem;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--color-fg-soft);
}

.footer-links {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-fg-soft);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-border);
  transition: color 120ms ease-out, border-bottom-color 120ms ease-out, border-bottom-style 120ms ease-out;
}

.footer-links a:hover {
  color: var(--color-accent-deep);
  border-bottom-style: solid;
  border-bottom-color: var(--color-accent-deep);
}

/* ============================================================
   Legal pages — long-form reading (privacy.html, terms.html)
   ============================================================ */
.legal-main {
  max-width: 44rem;
}

.back-home {
  display: inline-block;
  margin-top: .55rem;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-fg-soft);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-border);
  transition: color 120ms ease-out, border-bottom-color 120ms ease-out, border-bottom-style 120ms ease-out;
}
.back-home:hover {
  color: var(--color-accent-deep);
  border-bottom-style: solid;
  border-bottom-color: var(--color-accent-deep);
}

.legal-h1 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: clamp(1.8rem, 4.5vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

.doc-updated {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-fg-soft);
  margin-bottom: 2.6rem;
}

.legal-intro {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--color-fg);
  margin-bottom: 2.6rem;
}

.legal-section {
  margin-bottom: 2.4rem;
}

.legal-section > h2 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: .5rem 0 .8rem;
}

.legal-section p,
.legal-section li {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-fg);
}

.legal-section p {
  margin-bottom: .95rem;
}

.legal-section ul {
  list-style: none;
  margin: 0 0 .95rem;
  padding: 0;
}

.legal-section li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .5rem;
}

/* Calibration tick bullet — replaces editorial em-dash */
.legal-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: 12px;
  height: 1.5px;
  background: var(--color-border-strong);
}

.legal-section a {
  color: var(--color-accent-deep);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-accent-deep);
  transition: border-bottom-style 120ms ease-out;
}
.legal-section a:hover {
  border-bottom-style: solid;
}

.legal-section strong {
  font-weight: 600;
}

/* ============================================================
   Accessibility — focus-visible
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ============================================================
   Responsive — sellpoints 3-col at ≥720px (hairline separators)
   ============================================================ */
@media (min-width: 720px) {
  .sellpoints-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.2rem;
  }
  .sell-item {
    position: relative;
  }
  .sell-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -1.1rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--color-border);
  }
}

/* ============================================================
   Entry animations — quiet staggered reveal
   ============================================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.masthead                    { animation: fadeUp .5s .1s ease-out both; }
.ticks                       { animation: fadeUp .5s .18s ease-out both; }
.hero-h1                     { animation: fadeUp .5s .26s ease-out both; }
.lede                        { animation: fadeUp .5s .34s ease-out both; }
.cta-wrap                    { animation: fadeUp .5s .42s ease-out both; }
.sellpoints-section .sell-item:nth-child(1) { animation: fadeUp .5s .50s ease-out both; }
.sellpoints-section .sell-item:nth-child(2) { animation: fadeUp .5s .58s ease-out both; }
.sellpoints-section .sell-item:nth-child(3) { animation: fadeUp .5s .66s ease-out both; }

/* Legal pages: one quiet fade for the body */
.legal-main { animation: fadeUp .5s .2s ease-out both; }

/* ============================================================
   prefers-reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
