/* alng marketing site.
   Tokens mirror StrideDesign/tokens.json in the app repo (AlngColor, AlngFont, AlngMetrics).
   Layout: one centred column on the cream ground. Mark, wordmark, one line, then the details. */

/* Fonts are served from this site (latin subset, from @fontsource 5.3.0; OFL, see /fonts/OFL.txt),
   so pages make no third-party requests. Apple devices use SF Pro and never load them. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 300; font-display: swap; src: url("/fonts/nunito-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/nunito-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/nunito-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;

  /* Color: light */
  --color-bg: #FFF9F1;
  --color-line: #EFE3D5;
  --color-ink: #171717;
  --color-ink-muted: #5C554E;
  --color-brand: #0E6F6C;            /* state-active */
  --color-on-state: #FFFFFF;
  --color-brand-highlight: #8F9310;  /* lime: the accent over the g and the dot on the ring, nothing else */

  /* Type: SF Pro and SF Pro Rounded on Apple devices, Inter and Nunito elsewhere */
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, system-ui, sans-serif;

  /* Type scale (rem, so it follows the visitor's text size) */
  --type-title-1: 600 1.875rem/2.25rem var(--font-rounded);     /* 30/36 */
  --type-title-2: 600 1.375rem/1.75rem var(--font-rounded);     /* 22/28 */
  --type-headline: 600 1.0625rem/1.375rem var(--font-rounded);  /* 17/22 */
  --type-body: 500 1.0625rem/1.5rem var(--font-text);           /* 17/24 */
  --type-callout: 500 1rem/1.3125rem var(--font-text);          /* 16/21 */
  --type-subhead: 500 0.9375rem/1.25rem var(--font-text);       /* 15/20 */
  --type-footnote: 500 0.8125rem/1.125rem var(--font-text);     /* 13/18 */

  /* Spacing (4pt base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --target-floor: 44px;
  --target-action: 60px;
}

/* Color: dark. Follows the OS unless the visitor picked a theme with the toggle.
   The page ground is the app's surface rather than OLED black, which reads better on a monitor. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg: #0D1015;
    --color-line: #272C36;
    --color-ink: #F4F6F8;
    --color-ink-muted: #AEB6C1;
    --color-brand: #0E9E9B;
    --color-on-state: #05090D;
    --color-brand-highlight: #B9BF26;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #0D1015;
  --color-line: #272C36;
  --color-ink: #F4F6F8;
  --color-ink-muted: #AEB6C1;
  --color-brand: #0E9E9B;
  --color-on-state: #05090D;
  --color-brand-highlight: #B9BF26;
}

/* Base */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-ink);
  font: var(--type-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ol, ul {
  margin: 0;
}

a {
  color: var(--color-brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: 4px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: var(--space-5);
  top: -100px;
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg);
  color: var(--color-ink);
  font: var(--type-headline);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  z-index: 10;
}

.skip-link:focus {
  top: var(--space-3);
}

main {
  flex: 1;
}

main.hero {
  display: flex;
}

/* Lockup: mark to the left, wordmark to the right. Mark is 1.6x the wordmark size, gap is half. */

.lockup {
  --wm-size: 2rem;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--wm-size) * 0.5);
  color: var(--color-ink);
  text-decoration: none;
}

.mark {
  width: calc(var(--wm-size) * 1.6);
  height: calc(var(--wm-size) * 1.6);
  flex: none;
  overflow: visible;
}

.mark-track { stroke: currentColor; opacity: 0.9; }
.mark-arc { stroke: var(--color-brand); }
.mark-dot { fill: var(--color-brand-highlight); transform-origin: 20px 50px; }

/* Wordmark: lowercase alng, rounded Light, tracked 0.18em, accent over the g.
   The accent is anchored to the g's baseline and lifted by the font's own x-height (1ex)
   plus 0.06em, so it holds its place at any size and in any fallback font. */

.wordmark {
  display: inline-block;
  font-family: var(--font-rounded);
  font-size: var(--wm-size);
  font-weight: 300;
  line-height: 1.2;
  color: var(--color-ink);
  white-space: nowrap;
}

.wordmark-aln {
  letter-spacing: 0.18em;
}

.wordmark-g {
  position: relative;
  display: inline-block;
}

.wordmark-baseline {
  display: inline-block;
  width: 0;
  height: 0;
  vertical-align: baseline;
}

.wordmark-baseline::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0.36em;
  height: max(2px, 0.045em);
  margin-left: -0.18em;
  margin-top: calc(-1ex - 0.06em - max(2px, 0.045em));
  border-radius: var(--radius-pill);
  background: var(--color-brand-highlight);
}

/* Home: the first screen is the splash */

.hero {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 5vh, 44px);
  padding: clamp(48px, 10vh, 96px) var(--space-5);
  text-align: center;
}

.hero .lockup {
  --wm-size: clamp(2.625rem, 7.4vw, 4.625rem);
}

.tagline {
  font-family: var(--font-rounded);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1.25;
  max-width: 16ch;
  margin: 0 auto;
  text-wrap: balance;
}

.sub {
  font-size: clamp(0.9375rem, 1.8vw, 1.0625rem);
  color: var(--color-ink-muted);
  max-width: 40ch;
  margin: var(--space-4) auto 0;
  text-wrap: pretty;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  background: var(--color-brand);
  color: var(--color-on-state);
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: 1rem;
}

/* The quiet line under the action */

.quiet {
  font: var(--type-footnote);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--color-ink-muted);
  max-width: 44ch;
  text-wrap: pretty;
}

.quiet a {
  color: inherit;
}

.quiet a:hover {
  color: var(--color-ink);
}

/* Subpages: privacy, support */

.site-header {
  display: flex;
  justify-content: center;
  padding: var(--space-8) var(--space-5) 0;
}

.site-header .lockup {
  --wm-size: 1.5rem;
  border-radius: var(--radius-pill);
}

.page {
  width: 100%;
  max-width: calc(38rem + 2 * var(--space-5));
  margin: 0 auto;
  padding: clamp(40px, 8vh, 72px) var(--space-5) clamp(56px, 10vh, 96px);
}

.page-head {
  text-align: center;
  margin-bottom: clamp(40px, 7vh, 64px);
}

.page h1 {
  font-family: var(--font-rounded);
  font-weight: 500;
  font-size: clamp(1.75rem, 3.4vw, 2rem);
  line-height: 1.25;
  margin-bottom: var(--space-3);
}

.page-head p {
  color: var(--color-ink-muted);
  font: var(--type-callout);
}

.page h2 {
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.3;
  margin: var(--space-10) 0 var(--space-2);
}

.page p + p,
.page p + ul,
.page ul + p {
  margin-top: var(--space-3);
}

.page ul {
  padding-left: 1.25em;
}

.page li + li {
  margin-top: var(--space-2);
}

.page .lead {
  font-size: 1.125rem;
  line-height: 1.6;
}

.page .muted {
  color: var(--color-ink-muted);
}

.contact {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  text-align: center;
  padding-bottom: clamp(40px, 7vh, 64px);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-line);
}

.contact .pill {
  text-decoration: none;
}

.contact p {
  font: var(--type-callout);
  color: var(--color-ink-muted);
  max-width: 34ch;
}

.faq h2 {
  margin-top: var(--space-8);
}

.faq p {
  color: var(--color-ink-muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-line);
  padding: var(--space-5);
  font: var(--type-footnote);
  color: var(--color-ink-muted);
  text-align: center;
}

.footrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  align-items: center;
  justify-content: center;
}

.footrow a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-floor);
  padding: 0 var(--space-1);
  color: inherit;
  text-decoration: none;
}

.footrow a:hover,
.footrow a[aria-current="page"] {
  color: var(--color-ink);
}

.disclaimer {
  margin-top: var(--space-1);
}

.theme-toggle {
  width: var(--target-floor);
  height: var(--target-floor);
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-line);
  background: transparent;
  color: var(--color-ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--color-ink);
  border-color: var(--color-ink-muted);
}

.theme-toggle:focus-visible {
  border-radius: var(--radius-pill);
}

/* Motion: the ring draws once on load, then rests */

@media (prefers-reduced-motion: no-preference) {
  .intro .mark-arc {
    stroke-dasharray: 142;
    stroke-dashoffset: 142;
    animation: draw 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s forwards;
  }

  .intro .mark-dot {
    opacity: 0;
    animation: pop 0.35s cubic-bezier(0.34, 1.3, 0.64, 1) 0.75s forwards;
  }

  .intro .fade {
    opacity: 0;
    animation: rise 0.5s ease-out 0.5s forwards;
  }

  .intro .fade.two { animation-delay: 0.68s; }
  .intro .fade.three { animation-delay: 0.84s; }

  .theme-toggle {
    transition: color 0.2s ease-out, border-color 0.2s ease-out;
  }
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Let the hidden attribute win over display rules like .pill's inline-flex. */
[hidden] {
  display: none !important;
}
