/* -------------------------------------------------------------------------
 * veilpass placeholder — hand-written CSS, no framework.
 *
 * Design intent:
 *   - Colors: near-black + off-white + one accent (teal). Sober, not
 *     showy — this is a security product.
 *   - Typography: Space Grotesk (geometric humanist sans) for text,
 *     JetBrains Mono for the metadata / accent bits so it reads
 *     "engineered". Both self-served for now via Google Fonts;
 *     bundle-and-self-host once the marketing site graduates from
 *     placeholder.
 *   - Layout: single column, generous whitespace, everything fits on
 *     a phone without JS.
 *   - Themes: light by default, dark via prefers-color-scheme. Both
 *     use the same `currentColor` SVG mark unchanged.
 * ------------------------------------------------------------------------- */

:root {
  --bg: #fafafa;
  --fg: #0a0a0a;
  --muted: #64748b;
  --accent: #14b8a6;
  --border: rgba(10, 10, 10, 0.08);
  --card: rgba(10, 10, 10, 0.02);

  --font-sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
    Menlo, Consolas, monospace;

  --content-width: 68rem;
  --hero-width: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --fg: #fafafa;
    --muted: #94a3b8;
    --accent: #2dd4bf;
    --border: rgba(250, 250, 250, 0.1);
    --card: rgba(250, 250, 250, 0.03);
  }
}

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

html {
  color: var(--fg);
  background: var(--bg);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ------------- selection ---------------------------------------------- */

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

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

header {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--content-width);
  width: 100%;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--fg);
}

.brand-wordmark {
  display: inline-block;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: color 0.15s ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--accent);
  outline: none;
}

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

main {
  flex: 1;
  max-width: var(--content-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
}

.hero {
  text-align: center;
  padding: 3rem 0 5rem;
  max-width: var(--hero-width);
  margin: 0 auto;
}

.hero-mark {
  width: 128px;
  height: 128px;
  color: var(--fg);
  display: block;
  margin: 0 auto 2.5rem;
  /* Subtle drift-in the first time the page loads. Respects
     prefers-reduced-motion via the media query below. */
  animation: mark-in 700ms ease-out both;
}

@keyframes mark-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mark {
    animation: none;
  }
}

.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  max-width: 22ch;
  margin: 0 auto 1.5rem;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--muted);
  max-width: 44ch;
  margin: 0 auto 2.5rem;
  text-wrap: pretty;
}

/* ------------- waitlist ----------------------------------------------- */

.waitlist {
  display: flex;
  gap: 0.5rem;
  max-width: 28rem;
  margin: 0 auto 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.waitlist input[type="email"] {
  flex: 1;
  min-width: 12rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.waitlist input[type="email"]:hover {
  border-color: var(--muted);
}

.waitlist input[type="email"]:focus-visible {
  border-color: var(--accent);
  background: var(--bg);
}

.waitlist button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--bg);
  background: var(--fg);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.15s ease;
}

.waitlist button:hover {
  opacity: 0.9;
}

.waitlist button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.waitlist button:active {
  transform: scale(0.98);
}

.assurance {
  color: var(--muted);
  font-size: 0.875rem;
  max-width: 42ch;
  margin: 0 auto;
  text-wrap: pretty;
}

/* ------------- pillars ------------------------------------------------ */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem 3rem;
  padding-top: 4rem;
  border-top: 1px solid var(--border);
}

.pillars article {
  padding: 1.5rem 0;
}

.pillars h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

.pillars p {
  color: var(--fg);
  font-size: 1rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.pillars a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.pillars a:hover,
.pillars a:focus-visible {
  color: var(--accent);
  outline: none;
}

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

footer {
  padding: 2rem;
  max-width: var(--content-width);
  width: 100%;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

footer a:hover,
footer a:focus-visible {
  color: var(--accent);
  outline: none;
}

.build-marker {
  opacity: 0.7;
}

/* ------------- utilities ---------------------------------------------- */

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* ------------- narrow viewport tweaks --------------------------------- */

@media (max-width: 640px) {
  header {
    padding: 1.25rem 1.25rem;
  }
  main {
    padding: 1.5rem 1.25rem 4rem;
  }
  .hero {
    padding-top: 1.5rem;
  }
  .hero-mark {
    width: 96px;
    height: 96px;
    margin-bottom: 1.75rem;
  }
  .pillars {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-top: 2.5rem;
  }
  footer {
    padding: 1.5rem 1.25rem;
    justify-content: flex-start;
  }
}
