/* Conrad public site. The look is the Conrad app's, read from its code:
   - tokens: conrad-demo/src/app/globals.css (brand-1..5, foreground,
     muted-foreground, radius) and the Tailwind v4 zinc and amber scales the
     primitives use (conrad-demo/node_modules/tailwindcss/theme.css);
   - wordmark: conrad-demo/src/components/shell/pre-auth-page.tsx
     (text-xl font-bold uppercase text-brand-1);
   - button: conrad-demo/src/components/ui/button.tsx (primary, default size);
   - card: conrad-demo/src/components/ui/card.tsx (tinted, rounded-2xl, no border);
   - field, label, hint: conrad-demo/src/components/ui/input.tsx;
   - callout: conrad-demo/src/components/ui/callout.tsx and chip.tsx tones;
   - type scale: conrad-demo/docs/ui-conventions.md, Typography;
   - gutter: CONTENT_GUTTER_PX (28px) in conrad-demo/src/lib/layout-constants.ts.
   Light only, like the app's sign-in page. */

@font-face {
  /* Geist, the app's typeface (next/font Geist in conrad-demo/src/app/layout.tsx).
     Variable weights 100 to 900, SIL Open Font License: see fonts/OFL.txt. */
  font-family: "Geist";
  src: url("/static/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* globals.css */
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --muted-foreground: oklch(0.442 0.017 285.786); /* zinc-600 */
  --brand-1: #000080;
  --brand-2: #f0f0ff;
  --brand-3: #e0e0ff;
  --radius: 0.625rem;
  --radius-lg: var(--radius); /* rounded-lg: buttons, fields */
  --radius-xl: calc(var(--radius) * 1.4); /* rounded-xl: callouts */
  --radius-2xl: calc(var(--radius) * 1.8); /* rounded-2xl: cards */

  /* Tailwind v4 scales the primitives use */
  --zinc-50: oklch(98.5% 0 0);
  --zinc-100: oklch(96.7% 0.001 286.375);
  --zinc-200: oklch(92% 0.004 286.32);
  --zinc-300: oklch(87.1% 0.006 286.286);
  --zinc-400: oklch(70.5% 0.015 286.067);
  --zinc-500: oklch(55.2% 0.016 285.938);
  --zinc-700: oklch(37% 0.013 285.805);
  --amber-50: oklch(98.7% 0.022 95.277);
  --amber-800: oklch(47.3% 0.137 46.201);

  /* Derived */
  --ring: rgb(0 0 128 / 0.3); /* focus-visible:ring-brand-1/30 */

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 1rem;
  --content-width: 44rem;
}

@media (min-width: 48rem) {
  :root {
    --gutter: 28px;
  }
}

/* ---------------------------------------------------------------------- */
/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased; /* the app's html is "antialiased" */
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.9375rem; /* Reading 15 */
  line-height: 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

main {
  flex: 1;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

/* Display 28 */
h1 {
  font-size: 1.75rem;
  line-height: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
}

/* Heading 20 */
h2 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

/* Heading 16: a sub-heading inside a section (the Terms' section 9). */
h3 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

section {
  margin-top: 2rem; /* sections are 32px apart (gap-8) */
}

p,
ul,
ol,
blockquote,
figure {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  padding-left: 0.25rem;
}

li + li {
  margin-top: 0.375rem;
}

li::marker {
  color: var(--zinc-400);
}

strong {
  font-weight: 600;
}

/* Links: brand navy, like the app's link button. In running text they keep a
   light underline so they do not rely on color alone. */
a {
  color: var(--brand-1);
  text-decoration: underline;
  text-decoration-color: rgb(0 0 128 / 0.3);
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-color: currentColor;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--zinc-100);
  border-radius: 4px;
  padding: 0.125rem 0.25rem;
}

/* Callout, neutral tone (bg-zinc-50 text-zinc-700, rounded-xl p-4 text-sm). */
blockquote {
  background: var(--zinc-50);
  color: var(--zinc-700);
  border-radius: var(--radius-xl);
  padding: 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

blockquote p {
  margin: 0;
}

/* Callout, warning tone (bg-amber-50 text-amber-800). */
.draft-banner {
  background: var(--amber-50);
  color: var(--amber-800);
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* ---------------------------------------------------------------------- */
/* Header: the wordmark exactly as the app's sign-in page shows it, at the
   top of each page's content column (inside main), with no bar or line. */

.site-header {
  margin: 0 0 2.5rem;
}

.wordmark {
  color: var(--brand-1);
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}

.wordmark:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------------- */
/* Footer: the two policy links, Body 14, centered at the bottom of the
   page on the page's own background (main grows to push it down). */

.site-footer {
  font-size: 0.875rem;
  line-height: 1.25rem;
  padding: 1.5rem 0 2rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

.site-footer li {
  padding: 0;
}

.site-footer li + li {
  margin-top: 0;
}

/* Much lighter than the body text so they do not pop: zinc-400. The founder
   chose this on purpose (CON-585), below 4.5 to 1; on hover or keyboard
   focus they darken to the muted text color and underline. */
.site-footer a {
  color: var(--zinc-400);
  font-weight: 400;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--muted-foreground);
  text-decoration: underline;
  text-decoration-color: currentColor;
}

/* ---------------------------------------------------------------------- */
/* Home page: the wordmark, heading and three paragraphs, left-aligned in the
   page's centered reading column, a little above the middle of the window. */

.page-home main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4rem;
  padding-bottom: 6rem;
}

.page-home .site-header {
  margin-bottom: 2rem;
}

.page-home main > h1 {
  font-size: 2.25rem;
  line-height: 2.75rem;
  max-width: 40rem;
  margin-bottom: 1.25rem;
}

.page-home main > p {
  font-size: 1rem;
  line-height: 1.5rem;
  color: var(--muted-foreground);
  max-width: 40rem;
}

.page-home main > p:last-child {
  margin-bottom: 0;
}

@media (max-width: 47.99rem) {
  .page-home main {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
  }

  .page-home main > h1 {
    font-size: 1.75rem;
    line-height: 2.25rem;
  }
}

/* ---------------------------------------------------------------------- */
/* The documents: Terms, Privacy. Reading 15 text in a 44rem column, Heading
   20 sections. */

:is(.page-terms, .page-privacy) main > h1 + p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.25rem;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

/* The arbitration notice: the bold paragraph before the first section of the
   Terms, set as a warning Callout. */
.page-terms main > p:has(> strong:first-child) {
  background: var(--amber-50);
  color: var(--amber-800);
  border-radius: var(--radius-xl);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

/* ---------------------------------------------------------------------- */
/* Opt-in page. The form wording is drawn as the app draws a form on its
   sign-in card: a neutral Card (p-8, 400px) holding a Label, an empty Input,
   hint text, an unticked checkbox and a full-width primary Button. The small
   navy lines are the wording file's own notes on what each part is.

   The build gives each part a class from the bold note above it in
   content/sms-copy.md (markFormParts in site/build.mjs): form-note,
   form-label, form-hint, form-checkbox, form-links, form-button. */

.form-wording {
  max-width: 400px;
  background: var(--zinc-50);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.form-wording p {
  margin: 0;
}

/* The wording file's notes ("Field label", "Button label"...): Caption 12 in
   navy at 60%, the app's sub-label color. */
.form-wording .form-note {
  font-size: 0.75rem;
  line-height: 1rem;
  color: rgb(0 0 128 / 0.6);
  margin: 1.25rem 0 0.375rem;
}

.form-wording .form-note:first-child {
  margin-top: 0;
}

.form-wording .form-note strong {
  font-weight: 500;
}

/* Hint text under a field (FieldHint). */
.form-wording .form-hint {
  color: var(--muted-foreground);
}

/* Label + empty Input (h-9, rounded-lg, zinc-200 border, white). */
.form-wording .form-label {
  color: var(--foreground);
  font-weight: 500;
}

.form-wording .form-label::after {
  content: "";
  display: block;
  height: 2.25rem;
  margin-top: 0.375rem;
  background: #fff;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-lg);
}

/* Checkbox line: the box character is drawn on screen as an unticked
   checkbox (size-4, rounded, white); the text stays as written. */
.form-wording .form-checkbox {
  position: relative;
  padding-left: 1.5rem;
  color: var(--foreground);
}

.form-wording .form-box {
  position: absolute;
  left: 0;
  top: 0.125rem;
  width: 1rem;
  height: 1rem;
  font-size: 0;
  background: #fff;
  border: 1px solid var(--zinc-500);
  border-radius: 4px;
}

/* Links line: navy, like the app's links. */
.form-wording .form-links {
  color: var(--brand-1);
}

/* Button label: a full-width primary Button. */
.form-wording .form-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  border-radius: var(--radius-lg);
  background: var(--brand-1);
  color: #fff;
  font-weight: 500;
}

.screenshot img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-2xl);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); /* shadow-sm */
}

.screenshot figcaption {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.25rem;
  margin-top: 0.5rem;
}

.placeholder {
  border: 2px dashed var(--zinc-200);
  border-radius: var(--radius-2xl);
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

@media (max-width: 47.99rem) {
  .form-wording {
    padding: 1.5rem;
  }
}

/* ---------------------------------------------------------------------- */
/* 404: the app's pre-auth card (Card p-8, 400px, 20px heading, muted line). */

.page-404 main {
  flex: 0 0 auto;
  max-width: 400px;
  margin: auto;
  width: calc(100% - 2 * var(--gutter));
  padding: 2rem;
  background: var(--zinc-50);
  border-radius: var(--radius-2xl);
}

.page-404 .site-header {
  margin-bottom: 1.5rem;
}

.page-404 main h1 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  letter-spacing: 0;
  margin-bottom: 0.25rem;
}

.page-404 main p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
}
