/* ============================================================
   GIVREL — shared design system (v1.1)
   Warm near-black canvas · quiet grotesque type · one vermillion accent
   ============================================================ */

:root {
  --bg: #161310;
  --bg-raised: #1c1814;
  --bg-panel: #201b16;
  --line: rgba(243, 238, 229, 0.10);
  --line-soft: rgba(243, 238, 229, 0.06);
  --line-faint: rgba(243, 238, 229, 0.035);
  --text: #f3eee5;
  --text-2: rgba(243, 238, 229, 0.64);
  --text-3: rgba(243, 238, 229, 0.40);
  --accent: #e8512d;
  --accent-bright: color-mix(in oklab, var(--accent) 84%, white);
  --radius: 4px;
  --font: "Geist", "Avenir Next", Avenir, "Helvetica Neue", Helvetica, sans-serif;
  --font-mark: "Avenir Next", Avenir, "Geist", "Helvetica Neue", sans-serif;
  --container: 1360px; /* 1296px content + 2×32px gutters — matches cursor.com's 81rem column */
  --pad: clamp(20px, 4vw, 32px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: color-mix(in oklab, var(--accent) 35%, transparent); }

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Top navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.wordmark {
  font-family: var(--font-mark);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--text);
}

.wordmark span { color: var(--text-3); font-weight: 500; }

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: 8px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.15s ease;
}

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

.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary { background: var(--text); color: #14110e; }
.btn-primary:hover { background: #fffdf8; }

.btn-ghost { border-color: var(--line); color: var(--text-2); background: transparent; }
.btn-ghost:hover { color: var(--text); border-color: rgba(243, 238, 229, 0.25); }

.btn-sm { padding: 9px 16px; font-size: 13px; }

.link-accent {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.link-accent:hover { color: var(--accent-bright); }

.link-accent .arr { display: inline-block; transition: transform 0.18s ease; }
.link-accent:hover .arr { transform: translateX(3px); }

/* ---------- Type ---------- */

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; text-wrap: pretty; }

.display {
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 21ch;
}

.title {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

.lede {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--text-2);
  max-width: 56ch;
  text-wrap: pretty;
}

.body-2 { font-size: 15px; color: var(--text-2); text-wrap: pretty; }

/* ---------- Sections ---------- */

.section { padding-top: clamp(64px, 9vw, 120px); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.hr { border: 0; border-top: 1px solid var(--line-soft); }

/* ---------- Framed imagery ---------- */

.frame {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised);
}

image-slot { display: block; width: 100%; }

/* ---------- Cards ---------- */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease;
}

.card:hover { border-color: var(--line); }

.card-body {
  padding: 26px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-kicker {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.card h3 { font-size: 21px; }

.tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.card .link-accent { margin-top: auto; padding-top: 14px; }

/* ---------- Footer ---------- */

.footer {
  margin-top: clamp(72px, 10vw, 130px);
  background: #1c1813;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 36px;
  padding: clamp(48px, 6vw, 72px) 0 56px;
}

.footer h4 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}

.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer ul a { font-size: 14px; color: var(--text-2); transition: color 0.15s ease; }
.footer ul a:hover { color: var(--text); }

.footer-brand p {
  font-size: 13px;
  color: var(--text-3);
  max-width: 30ch;
  margin-top: 14px;
  text-wrap: pretty;
}

.footer-legal {
  border-top: 1px solid var(--line-soft);
  padding: 22px 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-3);
}

.legal-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--text-2);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.lang-pill:hover { color: var(--text); border-color: rgba(243, 238, 229, 0.25); }
.lang-pill > svg { width: 14px; height: 14px; flex: none; }
.lang-pill .chev { width: 11px; height: 11px; margin-left: -2px; pointer-events: none; }
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  padding: 0;
}
.lang-select option { color: #1a1714; background: #f3eee5; }

/* ---------- Legal documents ---------- */

.legal-doc {
  padding-top: clamp(40px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 44px);
}
.legal-doc section { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.legal-doc h2 { font-size: 18px; }
.legal-doc p, .legal-doc li { font-size: 15px; color: var(--text-2); text-wrap: pretty; }
.legal-doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.legal-doc a { color: var(--accent); }
.legal-doc a:hover { color: var(--accent-bright); }
.doc-updated { font-size: 13px; color: var(--text-3); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 13px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 420px) {
  .nav-inner { gap: 18px; }
}

/* ---------- Footer socials ---------- */

.socials { display: flex; align-items: center; gap: 18px; }
.socials a { color: var(--text-3); display: inline-flex; transition: color 0.15s ease; }
.socials a:hover { color: var(--text); }
.socials svg { width: 16px; height: 16px; }

/* ============================================================
   v1.1 — nav dropdown & shared page patterns
   ============================================================ */

/* ---------- Nav dropdown ---------- */

.nav-drop { position: relative; align-self: stretch; display: flex; align-items: center; }

.nav-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  color: var(--text-2);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.nav-drop-btn svg { width: 11px; height: 11px; margin-top: 1px; transition: transform 0.18s ease; }

.nav-drop:hover .nav-drop-btn,
.nav-drop:focus-within .nav-drop-btn,
.nav-drop[data-current] .nav-drop-btn { color: var(--text); }

.nav-drop:hover .nav-drop-btn svg,
.nav-drop:focus-within .nav-drop-btn svg { transform: rotate(180deg); }

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: -14px;
  min-width: 132px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu { opacity: 1; visibility: visible; transform: none; }

.nav-drop-menu::before {
  content: "";
  position: absolute;
  top: -18px;
  left: -20px;
  right: -20px;
  height: 18px;
}

.nav-drop-menu a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: var(--text-2);
  padding: 9px 12px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-drop-menu a:hover,
.nav-drop-menu a[aria-current="page"] { color: var(--text); background: rgba(243, 238, 229, 0.05); }

/* ---------- Page patterns ---------- */

.page-head { padding-top: clamp(56px, 8vw, 96px); display: flex; flex-direction: column; gap: 16px; }

.page-hero { padding-top: clamp(28px, 4vw, 44px); }
.page-hero image-slot { aspect-ratio: 21 / 9; height: auto; }

.intro-grid {
  padding-top: clamp(48px, 7vw, 80px);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 5vw, 72px);
}
.intro-grid .left { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.intro-grid h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.03em; line-height: 1.08; }

.facts { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.fact {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.fact dt { color: var(--text-3); }
.fact dd { color: var(--text-2); }

.feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
}
.feature.flip { grid-template-columns: 1fr 1.15fr; }
.feature.flip .feature-media { order: 2; }
.feature-media image-slot { aspect-ratio: 4 / 3; height: auto; }
.feature-copy { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.feature-copy h2 { font-size: clamp(24px, 2.8vw, 32px); }
.feature-copy .links { display: flex; gap: 24px; margin-top: 8px; flex-wrap: wrap; }

.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 28px);
  margin-top: clamp(28px, 4vw, 40px);
}
.area { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.area h3 { font-size: 16px; }
.area p { font-size: 14px; color: var(--text-2); text-wrap: pretty; }

.prose { max-width: 720px; display: flex; flex-direction: column; gap: 20px; }
.prose p { color: var(--text-2); font-size: 16px; }
.prose p strong { color: var(--text); font-weight: 500; }

@media (max-width: 820px) {
  .intro-grid { grid-template-columns: 1fr; }
  .feature, .feature.flip { grid-template-columns: 1fr; }
  .feature.flip .feature-media { order: 0; }
  .areas-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { gap: 16px; }
  .nav-drop-btn { font-size: 13px; }
}

@media (max-width: 720px) {
  .nav-cta .btn-ghost { display: none; }
}

@media (max-width: 600px) {
  .nav-cta { display: none; }
}

@media (max-width: 520px) {
  .areas-grid { grid-template-columns: 1fr; }
}

/* ---------- Banner cards (stage cards, Cursor-style) ---------- */

.banner-stack { display: flex; flex-direction: column; gap: clamp(56px, 8vw, 104px); }

.banner {
  display: grid;
  grid-template-columns: 2.125fr 1fr;
  aspect-ratio: var(--banner-ar, 1.58 / 1);
  background: var(--bg-raised);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius);
  overflow: hidden;
}

.banner.banner-wide { aspect-ratio: 1.8 / 1; }

.banner.flip { grid-template-columns: 1fr 2.125fr; }
.banner.flip .banner-media { order: 2; }

.banner-media { padding: clamp(12px, 1.5vw, 16px); min-height: 0; }
.banner-media .frame { width: 100%; height: 100%; background: var(--bg-panel); border: 0; border-radius: 2px; }
.banner-media image-slot { width: 100%; height: 100%; }

.banner-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  padding: clamp(24px, 3vw, 40px);
  min-width: 0;
}

.banner-index { font-size: 12px; color: var(--text-3); letter-spacing: 0.08em; margin-bottom: 10px; }
.banner-copy .tag { margin-bottom: 10px; }
.banner-copy h3,
.banner-copy p { font-size: clamp(16px, 1.75vw, 20px); line-height: 1.5; font-weight: 400; letter-spacing: -0.012em; }
.banner-copy h3 { color: var(--text); font-weight: 500; }
.banner-copy p { color: var(--text-2); text-wrap: pretty; }
.banner-copy .links { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; }

@media (max-width: 820px) {
  .banner, .banner.flip, .banner.banner-wide { grid-template-columns: 1fr; aspect-ratio: auto; }
  .banner.flip .banner-media { order: 0; }
  .banner-media { padding-bottom: 0; }
  .banner-media image-slot { aspect-ratio: 4 / 3; height: auto; }
  .banner-copy { padding: 22px 24px 28px; }
}
