/*
 * Engift — temporary landing page styles.
 *
 * Design tokens are copied verbatim from packages/tokens/tokens.css (the
 * production single source of truth) so this temp site reads identically to the
 * real product. When tokens.css changes, mirror it here. The component layer
 * below re-creates, by hand, the handful of shadcn/Tailwind classes the
 * production marketing pages actually use (buttons, cards, badges, nav, footer).
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700&display=swap');

/* ----------------------------------------------------------------------------
 * Design tokens (verbatim from @engift/tokens) — light is the default.
 * ------------------------------------------------------------------------- */
:root {
  --radius: 0.875rem;

  --background: oklch(0.992 0.004 95);
  --foreground: oklch(0.18 0.02 25);

  --card: oklch(1 0 0);
  --card-foreground: oklch(0.18 0.02 25);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.18 0.02 25);

  --primary: oklch(0.49 0.19 29.8);
  --primary-foreground: oklch(0.985 0.01 95);

  --secondary: oklch(0.955 0.012 60);
  --secondary-foreground: oklch(0.25 0.02 25);
  --muted: oklch(0.96 0.008 80);
  --muted-foreground: oklch(0.52 0.02 30);
  --accent: oklch(0.93 0.04 55);
  --accent-foreground: oklch(0.25 0.03 25);

  --destructive: oklch(0.55 0.21 27);

  --border: oklch(0.9 0.01 60);
  --input: oklch(0.9 0.01 60);
  --ring: oklch(0.49 0.19 29.8);

  --sidebar: oklch(0.97 0.008 70);

  /* Radius scale — mirrors globals.css @theme inline. */
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-2xl: calc(var(--radius) * 1.8);

  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Inter', ui-sans-serif, sans-serif;

  --container: 72rem; /* Tailwind max-w-6xl = 1152px */
  --container-narrow: 48rem; /* max-w-3xl */
}

/* Respect the OS theme — production ships a dark theme with these exact values. */
@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(0.18 0.015 25);
    --foreground: oklch(0.97 0.008 90);

    --card: oklch(0.22 0.018 25);
    --card-foreground: oklch(0.97 0.008 90);
    --popover: oklch(0.22 0.018 25);
    --popover-foreground: oklch(0.97 0.008 90);

    --primary: oklch(0.57 0.19 29.8);
    --primary-foreground: oklch(0.985 0.01 80);

    --secondary: oklch(0.29 0.02 30);
    --secondary-foreground: oklch(0.97 0.008 90);
    --muted: oklch(0.29 0.02 30);
    --muted-foreground: oklch(0.72 0.02 60);
    --accent: oklch(0.37 0.05 35);
    --accent-foreground: oklch(0.97 0.008 90);

    --destructive: oklch(0.7 0.19 22);

    --border: oklch(1 0 0 / 12%);
    --input: oklch(1 0 0 / 16%);
    --ring: oklch(0.57 0.19 29.8);

    --sidebar: oklch(0.16 0.015 25);
  }
}

/* ----------------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}
* {
  margin: 0;
}
html {
  font-family: var(--font-sans);
  font-size: 17px; /* larger-than-standard base type, per DEVELOPMENT_PLAN §3 */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
}
:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--ring) 50%, transparent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------------------------
 * Layout primitives
 * ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.section {
  padding-block: 4rem;
}
@media (min-width: 768px) {
  .section {
    padding-block: 6rem;
  }
}
.narrow {
  max-width: var(--container-narrow);
}
.muted {
  color: var(--muted-foreground);
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ----------------------------------------------------------------------------
 * Header / nav
 * ------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--background) 88%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
}
.site-header .container {
  display: flex;
  height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
}
.brand img {
  width: 30px;
  height: 30px;
}
.brand .wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-size: 1.25rem;
}
.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

/* Burger menu — pure CSS via <details>, no JS dependency. */
.nav-mobile {
  position: relative;
}
@media (min-width: 768px) {
  .nav-mobile {
    display: none;
  }
}
.nav-mobile > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.nav-mobile > summary::-webkit-details-marker {
  display: none;
}
.nav-mobile[open] > summary {
  background: var(--muted);
}
.nav-mobile-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.25);
}
.nav-mobile-panel a {
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-md);
  font-weight: 500;
}
.nav-mobile-panel a:hover {
  background: var(--muted);
}

/* ----------------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1;
  height: 2.5rem;
  padding-inline: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.05s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-lg {
  height: 3rem;
  padding-inline: 1.5rem;
  font-size: 1rem;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover {
  background: color-mix(in oklch, var(--primary) 90%, black);
}
.btn-outline {
  background: var(--background);
  border-color: var(--border);
  color: var(--foreground);
}
.btn-outline:hover {
  background: var(--muted);
}
.btn-ghost {
  background: transparent;
  color: var(--foreground);
}
.btn-ghost:hover {
  background: var(--muted);
}
.btn-block {
  width: 100%;
}

/* ----------------------------------------------------------------------------
 * Cards
 * ------------------------------------------------------------------------- */
.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}
.card-interactive {
  display: block;
  height: 100%;
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}
.card-interactive:hover {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  border-color: var(--ring);
  transform: translateY(-1px);
}
.card h3 {
  font-size: 1.1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--secondary-foreground);
}
.badge-soft {
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  color: var(--primary);
}

/* ----------------------------------------------------------------------------
 * Grids
 * ------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ----------------------------------------------------------------------------
 * Hero + finder (early-access) box
 * ------------------------------------------------------------------------- */
.hero {
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
}
.hero p.lead {
  margin-inline: auto;
  margin-top: 1.25rem;
  max-width: 42rem;
  font-size: 1.15rem;
  color: var(--muted-foreground);
}
.finder {
  margin-top: 2.5rem;
  margin-inline: auto;
  max-width: 38rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 1.25rem;
  box-shadow: 0 20px 50px -30px rgb(0 0 0 / 0.35);
}
.finder form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
@media (min-width: 560px) {
  .finder form {
    flex-direction: row;
  }
}
.finder input[type='email'],
.finder input[type='text'] {
  flex: 1;
  height: 3rem;
  padding-inline: 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--input);
  border-radius: var(--radius-lg);
}
.finder input::placeholder {
  color: var(--muted-foreground);
}
.finder .hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}
.chips {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}
.chip {
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
}

/* ----------------------------------------------------------------------------
 * Surfaces / utility sections
 * ------------------------------------------------------------------------- */
.surface {
  background: var(--sidebar);
  border-block: 1px solid var(--border);
}
.cta-card {
  background: color-mix(in oklch, var(--primary) 5%, var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 768px) {
  .cta-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.checklist {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.checklist li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.checklist svg {
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--primary);
}

/* ----------------------------------------------------------------------------
 * Prose (legal + guide articles)
 * ------------------------------------------------------------------------- */
.prose {
  max-width: var(--container-narrow);
  margin-inline: auto;
}
.prose h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}
.prose h2 {
  font-size: 1.35rem;
  margin-top: 2.25rem;
}
.prose h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
}
.prose p,
.prose ul,
.prose ol {
  margin-top: 0.9rem;
  color: var(--muted-foreground);
}
.prose ul,
.prose ol {
  padding-left: 1.25rem;
}
.prose li {
  margin-top: 0.4rem;
}
.prose strong {
  color: var(--foreground);
  font-weight: 600;
}
.prose a:not(.btn) {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.updated {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

/* ----------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--sidebar);
}
.footer-grid {
  display: grid;
  gap: 2rem;
  padding-block: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}
.footer-col nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col a {
  color: var(--muted-foreground);
  font-size: 0.95rem;
}
.footer-col a:hover {
  color: var(--foreground);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
/* Subtle affiliate disclosure — present but not loud (reusable for any network). */
.disclosure {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}
.disclosure a {
  color: var(--muted-foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-fineprint {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

/* ----------------------------------------------------------------------------
 * Blog / editorial
 * ------------------------------------------------------------------------- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.post-row {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  padding: 1.5rem;
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}
.post-row:hover {
  border-color: var(--ring);
  transform: translateY(-1px);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.post-row h2,
.post-row h3 {
  font-size: 1.3rem;
  margin-top: 0.5rem;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}
.post-meta time {
  white-space: nowrap;
}
.article-head {
  max-width: var(--container-narrow);
  margin-inline: auto;
}
.article-head h1 {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
}
.read-next {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* Offset anchor jumps so the sticky header never covers the target. */
#waitlist {
  scroll-margin-top: 5.5rem;
}

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }
.flex-wrap-gap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
