/* imanotes front door (public-front-door, S-01).

   A three-page static site served by the server at /, /privacy and /terms —
   no build step, no script. The look is COPIED from the SPA rather than shared
   with it: the colour values below mirror the tokens in
   modules/client/css/style.css (:root and .dark), and the two faces are the
   same fontsource files the SPA self-hosts. Keep them in step by hand when the
   app's palette changes.

   Dark mode follows the OS (prefers-color-scheme) because there is no JS here
   to read the app's own ☀/☾ preference. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/site/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Fraunces Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("/site/fonts/fraunces-latin-wght-italic.woff2") format("woff2-variations");
}

:root {
  color-scheme: light dark;
  --radius: 0.875rem;
  --background: oklch(0.985 0.003 90);
  --foreground: oklch(0.18 0.01 260);
  --card: oklch(1 0 0);
  --secondary: oklch(0.96 0.005 90);
  --muted-foreground: oklch(0.5 0.01 260);
  --primary: oklch(0.35 0.04 250);
  --primary-foreground: oklch(0.985 0.003 90);
  --border: oklch(0.92 0.005 90);
  --font-sans: "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-note: "Fraunces Variable", "Fraunces", ui-serif, Georgia, serif;
  --shadow-card: 0 1px 2px oklch(0 0 0 / 0.04), 0 4px 12px oklch(0 0 0 / 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(0.16 0.006 260);
    --foreground: oklch(0.95 0.003 90);
    --card: oklch(0.2 0.006 260);
    --secondary: oklch(0.26 0.006 260);
    --muted-foreground: oklch(0.68 0.01 260);
    --primary: oklch(0.7 0.05 250);
    --primary-foreground: oklch(0.16 0.006 260);
    --border: oklch(0.3 0.006 260);
  }
}

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

html,
body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

main {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

a {
  color: var(--primary);
  text-underline-offset: 4px;
}

h1,
h2 {
  font-family: var(--font-note);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ── Beta notice ───────────────────────────────────────────────────────────── */

/* beta-feedback: the app's BetaBanner strip (bg-primary/10 over a border), on
   every page. No close button — nothing here could remember it. The plain
   --secondary background is the floor for a browser without color-mix(). */
.beta {
  border-bottom: 1px solid var(--border);
  background-color: var(--secondary);
  background-color: color-mix(in oklch, var(--primary) 10%, var(--background));
  padding: calc(0.5rem + env(safe-area-inset-top)) 1.5rem 0.5rem;
}

.beta p {
  max-width: 44rem;
  margin: 0 auto;
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
}

.beta a {
  color: var(--foreground);
  font-weight: 500;
  white-space: nowrap;
}

.beta a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Start page ──────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  max-width: 30rem;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.75rem;
}

.lede {
  margin: 1.25rem 0 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

/* open-signup: the one way in. The SPA's sign-in card carries the Drive and AI
   disclosure and the policy links, so this is a plain link to it, styled as the
   app's primary button. min-height 3rem keeps it a comfortable touch target. */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  margin-top: 1.75rem;
  padding: 0 2rem;
  border-radius: 999px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.cta:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* auto-fit + justify-content: one card sits centred, three share a row, six
   wrap — the count can change without touching this rule. */
.cards {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 20rem));
  justify-content: center;
  gap: 1.5rem 1.25rem;
}

.card {
  margin: 0;
  width: 100%;
  max-width: 20rem;
}

/* `--secondary` stays underneath as a floor: if an image fails to load the
   slot is a quiet panel, not a broken-image glyph. */
.card-frame {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  background: var(--secondary);
  box-shadow: var(--shadow-card);
}

.card-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card figcaption {
  margin-top: 0.625rem;
  padding: 0 0.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

/* ── Legal pages ─────────────────────────────────────────────────────────── */

.doc h1 {
  font-size: 2.25rem;
}

.doc h2 {
  font-size: 1.5rem;
  margin-top: 2.25rem;
}

.doc p,
.doc li {
  font-size: 1rem;
  line-height: 1.7;
}

.doc .meta {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Four links no longer fit one phone-width row; they wrap and stay centred. */
footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.5rem;
}

/* 44px touch targets on the footer links. */
footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
}
