/* ============================================================
   FieldReg — aphelionengineering.com.au/fieldreg/
   The studio's field instrument. Dark, technical, precise —
   the same language as the main Aphelion site, tuned to the
   app's own token law:
     canvas  #0A0C10   surface #12151B   raised #15181E (icon bg)
     amber   #FF9500 (iOS systemOrange — the app's accent)
     grid    #5A6470 (icon lattice grey)
   Geist for type, Geist Mono for the numbers and labels.
   Self-hosted fonts (/fonts/*) — no external requests, so the
   site's global CSP needs no /fieldreg override.
   ============================================================ */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/fonts/geist.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/geist-mono.woff2') format('woff2');
}

:root {
  --bg: #0A0C10;
  --surface: #12151B;
  --surface-2: #15181E;   /* the app-icon background */
  --raised: #1A1E26;
  --border-mid: #232932;
  --border-hair: rgba(236, 237, 238, 0.07);

  --text: #ECEDEE;
  --text-mid: #B4B8C0;
  --text-muted: #868C96;
  --text-faint: #5A6470;   /* the icon's lattice grey */

  --amber: #FF9500;        /* FieldReg / iOS systemOrange */
  --accent: var(--amber);  /* alias consumed by the shared /chrome/chrome.css */
  --amber-soft: #FFB347;
  --amber-deep: #E07B00;
  --on-amber: #1A1205;

  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 76rem;
  --measure: 40rem;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 40px 90px -32px rgba(0, 0, 0, 0.78);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* blueprint lattice — barely-there grid behind everything, echoing
   the app's register backplate and the icon's tile motif */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(90, 100, 112, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 100, 112, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 80%);
          mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 80%);
}

main, header.site, footer.site { position: relative; z-index: 1; }
/* Reserve space for the shared fixed chrome header (/chrome/chrome.css) so
   content clears it without overriding each section's own top padding. */
body.has-fixed-chrome { padding-top: 3rem; }

::selection { background: rgba(255, 149, 0, 0.26); color: #fff; }

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: 0.92em; color: var(--text); }

.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;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.75rem); }

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
  color: var(--text);
}
strong { color: var(--text); font-weight: 500; }

/* mono eyebrow — the studio's signature label */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--amber); opacity: 0.7;
}

/* ---------------- header ---------------- */

header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
header.site.scrolled { border-bottom-color: var(--border-mid); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 0; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--text);
  font-weight: 500; font-size: 1.18rem; letter-spacing: -0.01em;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border-mid); }
.brand .by {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-faint); margin-left: 0.1rem;
}
.nav-links { display: flex; gap: 0.4rem; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--text-muted);
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.5rem 0.7rem; border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--amber); }

/* ---------------- hero ---------------- */

.hero { padding: clamp(3rem, 8vh, 6rem) 0 clamp(2.4rem, 5vh, 3.6rem); }
.hero .eyebrow { margin-bottom: 1.4rem; }
.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  margin-bottom: 1.5rem;
  max-width: 16ch;
}
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lede {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  color: var(--text-mid); max-width: var(--measure);
  margin-bottom: 2rem;
}
.hero .lede strong { color: var(--text); }

/* spec strip — mono badges, like a nameplate */
.spec {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
}
.spec span {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mid);
  border: 1px solid var(--border-mid); border-radius: 999px;
  padding: 0.4rem 0.85rem; background: var(--surface);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.spec span::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px;
  background: var(--amber); box-shadow: 0 0 8px rgba(255, 149, 0, 0.7);
}

/* ---------------- gallery (the marketing screenshots) ---------------- */

.gallery-sec { padding: clamp(1.5rem, 4vh, 3rem) 0 clamp(2.5rem, 6vh, 4rem); }
.gallery {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(232px, 64vw, 288px);
  gap: clamp(1rem, 2.2vw, 1.6rem);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 0.5rem clamp(1.25rem, 4vw, 2.75rem) 1.4rem;
  margin: 0 auto; max-width: var(--max);
  scrollbar-width: thin; scrollbar-color: var(--border-mid) transparent;
}
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 999px; }
.gallery figure { scroll-snap-align: center; margin: 0; }
.gallery img {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--border-mid);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}
.gallery figcaption {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-faint);
  text-align: center; margin-top: 0.9rem;
}
.gallery-hint {
  text-align: center; font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint);
  margin-top: 0.2rem;
}

/* ---------------- feature grid (the five tabs) ---------------- */

section { padding: clamp(3rem, 8vh, 5.5rem) 0; }
.sec-head { max-width: 44rem; margin-bottom: clamp(2rem, 5vh, 3rem); }
.sec-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 1rem 0 0.9rem; }
.sec-head p { color: var(--text-muted); font-size: 1.1rem; max-width: var(--measure); }

.features {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.feature {
  background: var(--surface); border: 1px solid var(--border-mid);
  border-radius: var(--radius); padding: 1.4rem 1.4rem 1.5rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.feature:hover { border-color: var(--amber-deep); transform: translateY(-3px); }
.feature .tag {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber);
}
.feature h3 { font-size: 1.3rem; margin: 0.7rem 0 0.5rem; font-weight: 400; }
.feature p { color: var(--text-muted); font-size: 0.97rem; }

/* ---------------- the free/pro line ---------------- */

.tiers {
  display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.tier {
  background: var(--surface); border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg); padding: 1.7rem 1.6rem;
}
.tier.pro { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-color: var(--amber-deep); }
.tier .name {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-muted);
}
.tier.pro .name { color: var(--amber); }
.tier .price { font-size: 2rem; font-weight: 300; letter-spacing: -0.02em; margin: 0.5rem 0 0.1rem; }
.tier .price small { font-size: 0.92rem; color: var(--text-muted); font-family: var(--mono); letter-spacing: 0; }
.tier ul { list-style: none; margin: 1rem 0 0; }
.tier li {
  position: relative; padding-left: 1.5rem; margin: 0.5rem 0;
  color: var(--text-mid); font-size: 0.96rem;
}
.tier li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--amber);
}

/* ---------------- document body (support / privacy) ---------------- */

.doc { padding: clamp(2.6rem, 7vh, 4.5rem) 0 clamp(3rem, 8vh, 5rem); }
.doc-head { margin-bottom: 2.4rem; }
.doc-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0.9rem 0; }
.doc-head .meta {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em;
  color: var(--text-muted);
}
.doc article { max-width: var(--measure); }
.doc h2 { font-size: 1.4rem; font-weight: 400; margin: 2.6rem 0 0.8rem; }
.doc h3 { font-size: 1.1rem; font-weight: 400; margin: 1.8rem 0 0.5rem; }
.doc p, .doc li { color: var(--text-mid); }
.doc ul { padding-left: 1.2rem; margin: 0.7rem 0 1rem; }
.doc li { margin: 0.4rem 0; }
.doc li::marker { color: var(--amber); }
.doc a {
  color: var(--amber); text-decoration: underline;
  text-decoration-color: rgba(255, 149, 0, 0.4);
  text-decoration-thickness: 1.5px; text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.doc a:hover { text-decoration-color: var(--amber); }
.doc hr { border: 0; border-top: 1px solid var(--border-mid); margin: 2.4rem 0; }

.callout {
  background: var(--surface); border: 1px solid var(--border-mid);
  border-left: 3px solid var(--amber);
  border-radius: 14px; padding: 1.1rem 1.3rem; margin: 1.5rem 0;
  color: var(--text-mid);
}
.callout strong { color: var(--text); }

.faq { margin-top: 0.5rem; }
.faq dt { font-weight: 500; color: var(--text); font-size: 1.08rem; margin-top: 1.9rem; }
.faq dd { margin: 0.45rem 0 0; color: var(--text-mid); }

table {
  border-collapse: collapse; width: 100%; margin: 1.3rem 0; font-size: 0.95rem;
}
th, td {
  text-align: left; padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-mid); vertical-align: top;
}
th {
  font-family: var(--mono); font-weight: 500; font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted);
}
td { color: var(--text-mid); }

/* ---------------- CTA band ---------------- */

.band {
  border-top: 1px solid var(--border-mid); border-bottom: 1px solid var(--border-mid);
  background: var(--surface-2);
}
.band .inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem;
  align-items: center; justify-content: space-between;
}
.band h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.band p { color: var(--text-muted); margin-top: 0.5rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem; white-space: nowrap;
  background: var(--amber); color: var(--on-amber);
  font-family: var(--mono); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.95rem 1.6rem; border-radius: 999px; text-decoration: none;
  box-shadow: 0 14px 34px -16px rgba(255, 149, 0, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -16px rgba(255, 149, 0, 0.7); }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-mid); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--amber); transform: translateY(-2px); }

/* ---------------- footer ---------------- */

footer.site { padding: 3rem 0 3.4rem; border-top: 1px solid var(--border-mid); }
.foot { display: flex; justify-content: space-between; gap: 1.6rem; flex-wrap: wrap; align-items: center; }
.foot .brand { font-size: 1.05rem; }
.foot nav { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.foot nav a {
  color: var(--text-muted); text-decoration: none;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.4rem 0.6rem; border-radius: 8px;
}
.foot nav a:hover { color: var(--text); background: var(--surface); }
.foot .legal {
  width: 100%; margin-top: 0.4rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--text-faint);
}

/* ---------------- reveal ---------------- */

.reveal { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.18s; }
.reveal.d3 { animation-delay: 0.3s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------------- responsive ---------------- */

@media (max-width: 860px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiers { grid-template-columns: 1fr; }
  .band .inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 540px) {
  .features { grid-template-columns: 1fr; }
  .nav-links a { padding: 0.5rem 0.5rem; }
  .brand .by { display: none; }
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .feature, .btn { transition: none; }
}
