/* Roblico shared stylesheet
   Used by index.html, privacy.html and terms.html.
   Tailwind (CDN) handles utilities; everything here is custom. */

/* ── Reset & base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Neutrals: warm off-white + blue-black ink */
  --c-bg: #F7F7F4;
  --c-fg: #0D0D12;
  --c-card: #FFFFFF;
  --c-card-fg: #0D0D12;
  --c-muted: #EFEFEA;
  --c-muted-fg: #5C5C66;
  --c-border: #E3E3DD;
  --c-border-strong: #C4C4BC;
  /* Brand: electric ultramarine. --c-brand fills buttons/logo in both themes;
     --c-primary is the accent used for text/lines, so it lightens in dark mode. */
  --c-brand: #1A2BFF;
  --c-brand-hover: #0D1BD9;
  --c-primary: #1A2BFF;
  --c-primary-tint: #ECEEFF;
  --c-primary-tint-border: #C9CEFF;
  --c-on-primary: #FFFFFF;
  --c-destructive: #DC2626;
  --c-ring: #1A2BFF;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Services bento */
  --c-bento: #EDEDE7;
  --c-art: #9C9CA6;
  --c-feature-bg: #0D0D12;
  --c-feature-fg: #F2F2EE;
  --c-feature-muted: #A3A3AD;
  --c-feature-line: rgba(242, 242, 238, 0.24);
  /* Work frames */
  --c-grid: rgba(13, 13, 18, 0.06);
  --c-widget: #FFFFFF;
  --c-widget-shadow: 0 1px 2px rgba(13, 13, 18, 0.06), 0 12px 32px -10px rgba(13, 13, 18, 0.16);
  --c-widget-shadow-hover: 0 1px 2px rgba(13, 13, 18, 0.06), 0 20px 40px -12px rgba(13, 13, 18, 0.24);
  --space-xs: 0.5rem;
  /* 8px */
  --space-sm: 1rem;
  /* 16px */
  --space-md: 1.5rem;
  /* 24px */
  --space-lg: 3rem;
  /* 48px */
  --space-xl: 5rem;
  /* 80px */
}

html.dark {
  color-scheme: dark;
  --c-bg: #0A0A0D;
  --c-fg: #EDEDEA;
  --c-card: #131318;
  --c-card-fg: #EDEDEA;
  --c-muted: #111116;
  --c-muted-fg: #9A9AA6;
  --c-border: #23232B;
  --c-border-strong: #3A3A45;
  --c-primary: #8C95FF;
  --c-primary-tint: rgba(140, 149, 255, 0.12);
  --c-primary-tint-border: rgba(140, 149, 255, 0.32);
  --c-ring: #8C95FF;
  /* Flagship card inverts to light in dark mode so it still stands out */
  --c-bento: #141419;
  --c-art: #4E4E5A;
  --c-feature-bg: #EDEDEA;
  --c-feature-fg: #0D0D12;
  --c-feature-muted: #55555F;
  --c-feature-line: rgba(13, 13, 18, 0.2);
  --c-grid: rgba(237, 237, 234, 0.05);
  --c-widget: #1C1C22;
  --c-widget-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -10px rgba(0, 0, 0, 0.6);
  --c-widget-shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.4), 0 20px 40px -12px rgba(0, 0, 0, 0.75);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-fg);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
  -webkit-font-smoothing: antialiased;
}

/* ── Scroll-reveal ── */
#home .sr {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

#home .sr.in {
  opacity: 1;
  transform: translateY(0);
}

/* Hero stagger: delay only */
.sr-d1 {
  transition-delay: 0.05s;
}

.sr-d2 {
  transition-delay: 0.1s;
}

.sr-d3 {
  transition-delay: 0.15s;
}

.sr-d4 {
  transition-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .sr {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Nav ── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: box-shadow 0.2s, background 0.2s;
}

#nav.scrolled,
#nav.menu-open {
  box-shadow: 0 1px 16px rgba(0, 0, 0, 0.06);
  background: rgba(247, 247, 244, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}

html.dark #nav.scrolled,
html.dark #nav.menu-open {
  background: rgba(10, 10, 13, 0.85);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-muted-fg);
  text-decoration: none;
  transition: color 0.15s;
  padding-bottom: 1px;
  border-bottom: 1.5px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--c-fg);
  border-bottom-color: var(--c-fg);
}

/* ── Logo: wordmark plus the signature dot ── */
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
}

.logo-word {
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--c-fg);
}

.logo-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--c-primary);
}

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

/* ── Hero: fills the first screen, content optically centered ── */
/* Always dark in both themes: the image carries the color, the chrome stays quiet */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  padding-bottom: 5rem;
  background: #060916;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}

/* Neutral scrim, darkest behind the text on the left; the right of the image stays vivid */
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 9, 22, 0.9) 0%, rgba(6, 9, 22, 0.74) 38%, rgba(6, 9, 22, 0.24) 68%, rgba(6, 9, 22, 0) 86%),
    linear-gradient(0deg, rgba(6, 9, 22, 0.55) 0%, rgba(6, 9, 22, 0) 32%);
}

@media (max-width: 767px) {
  .hero-scrim {
    background: linear-gradient(180deg, rgba(6, 9, 22, 0.25) 0%, rgba(6, 9, 22, 0.7) 45%, rgba(6, 9, 22, 0.9) 100%);
  }
}

.hero-title {
  font-weight: 500;
  font-size: clamp(2.75rem, 6.5vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #F2F2EE;
  max-width: 13ch;
  text-wrap: balance;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgba(242, 242, 238, 0.8);
  max-width: 40ch;
  margin-bottom: 2.5rem;
  text-wrap: pretty;
}

/* On the blue image a blue button would disappear: off-white primary, hairline secondary */
.btn-light,
.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.1s var(--ease);
}

.btn-light {
  background: #F2F2EE;
  color: #0D0D12;
}

.btn-light:hover {
  background: #FFFFFF;
}

.btn-ghost-light {
  color: #F2F2EE;
  border: 1px solid rgba(242, 242, 238, 0.32);
}

.btn-ghost-light:hover {
  border-color: #F2F2EE;
}

.btn-light:active,
.btn-ghost-light:active {
  transform: scale(0.98);
}

.btn-light:focus-visible,
.btn-ghost-light:focus-visible {
  outline: 2px solid #F2F2EE;
  outline-offset: 3px;
}

/* Nav while it floats over the dark hero (before scrolling / opening the menu) */
.nav--over-hero:not(.scrolled):not(.menu-open) .nav-link {
  color: rgba(242, 242, 238, 0.75);
}

.nav--over-hero:not(.scrolled):not(.menu-open) .nav-link:hover,
.nav--over-hero:not(.scrolled):not(.menu-open) .nav-link.active {
  color: #F2F2EE;
  border-bottom-color: #F2F2EE;
}

.nav--over-hero:not(.scrolled):not(.menu-open) .logo-word {
  color: #F2F2EE;
}

.nav--over-hero:not(.scrolled):not(.menu-open) .logo-dot {
  background: #8C95FF;
}

.nav--over-hero:not(.scrolled):not(.menu-open) #theme-btn {
  color: rgba(242, 242, 238, 0.75) !important;
}

.nav--over-hero:not(.scrolled):not(.menu-open) .btn-primary {
  background: #F2F2EE;
  color: #0D0D12;
}

.nav--over-hero:not(.scrolled):not(.menu-open) .bar {
  background: #F2F2EE;
}

/* ── Hamburger ── */
.bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--c-fg);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.bar+.bar {
  margin-top: 5px;
}

/* ── Mobile menu ── */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s var(--ease);
}

#mobile-menu.open {
  max-height: 360px;
  border-top: 1px solid var(--c-border);
}

/* ── Sections ── */
.section-pad {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.section-alt {
  background: var(--c-muted);
}

/* ── Services bento ── */
.bento-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "ai" "pa" "web" "strat";
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "ai ai" "pa web" "pa strat";
  }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: "pa web strat" "pa ai ai";
  }
}

.bento {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--c-bento);
  color: var(--c-fg);
  text-decoration: none;
}

.bento:focus-visible {
  outline: 2px solid var(--c-ring);
  outline-offset: 3px;
}

.bento-title {
  font-weight: 500;
  font-size: 1.375rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  padding-right: 2.5rem;
}

.bento-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 20px;
  height: 20px;
  transition: transform 0.2s var(--ease);
}

.bento:hover .bento-arrow {
  transform: translate(2px, -2px);
}

.bento-art {
  color: var(--c-art);
}

.bento-art svg {
  display: block;
  width: 100%;
  height: auto;
}

.bento-art--center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 1rem;
}

.bento-art--bleed {
  margin-right: -1.5rem;
}

.bento-foot {
  margin-top: auto;
}

.bento-desc {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--c-muted-fg);
  max-width: 38ch;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--c-border-strong);
  border-radius: 999px;
  white-space: nowrap;
}

.art-accent-fill {
  fill: var(--c-brand);
}

.art-accent-stroke {
  stroke: var(--c-brand);
}

/* Emphasis inside quiet illustrations: ink, not the accent */
.art-ink-fill {
  fill: var(--c-fg);
}

.art-ink-stroke {
  stroke: var(--c-fg);
}

/* Fills a shape with the card colour so lines behind it are hidden */
.art-knock {
  fill: var(--c-bento);
}

.svc-node text {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-anchor: middle;
  fill: currentColor;
}

/* Flagship card */
.bento--feature {
  background: var(--c-feature-bg);
  color: var(--c-feature-fg);
}

.bento--feature .bento-art {
  color: var(--c-feature-fg);
}

.bento--feature .art-knock {
  fill: var(--c-feature-bg);
}

.bento--feature .bento-desc {
  color: var(--c-feature-muted);
}

.bento--feature .chips li {
  border-color: var(--c-feature-line);
}

@media (min-width: 768px) {
  .bento--feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-rows: auto 1fr;
    column-gap: 2rem;
  }

  .bento--feature .bento-art {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    padding-top: 1.5rem;
  }

  .bento--feature .bento-foot {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
  }
}

.flow {
  stroke-dasharray: 4 4;
}

/* ── About ── */
.about-chip {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #0D0D12;
  background: rgba(247, 247, 244, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.about-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--c-brand);
}

/* ── Process ── */
.process-list {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

/* Hairline that fills with the accent when the step scrolls into view
   (.in is added by the existing scroll-reveal observer) */
.step-rule {
  position: relative;
  height: 1px;
  background: var(--c-border-strong);
  overflow: hidden;
}

.step-rule::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c-fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease) 0.15s;
}

.process-row.in .step-rule::after {
  transform: scaleX(1);
}

.step-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
}

.step-num {
  color: var(--c-muted-fg);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.step-num::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--c-border-strong);
  transition: background-color 0.3s var(--ease) 0.6s;
}

.process-row.in .step-num::before {
  background: var(--c-primary);
}

.step-meta {
  color: var(--c-muted-fg);
}

.step-title {
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-fg);
  margin-bottom: 0.75rem;
}

.step-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--c-muted-fg);
  max-width: 52ch;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-fg);
  text-decoration: none;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--c-fg);
}

.link-arrow svg {
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

/* ── Work ── */
.work-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: var(--c-bento);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.work-shot,
.work-widget {
  position: relative;
  box-shadow: var(--c-widget-shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.work-shot {
  position: absolute;
  left: 10%;
  top: 12%;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.work-item:hover .work-shot,
.work-item:hover .work-widget {
  transform: translateY(-2px);
  box-shadow: var(--c-widget-shadow-hover);
}

.work-widget {
  background: var(--c-widget);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 1.25rem;
  color: var(--c-fg);
}

.ww-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.ww-meta {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--c-muted-fg);
}

/* Logistics: one order moving through its steps */
.ww-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.ww-step {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  font-size: 0.8125rem;
  color: var(--c-fg);
}

.ww-step.is-pending {
  color: var(--c-muted-fg);
}

.ww-mark {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted-fg);
}

.ww-mark svg {
  width: 16px;
  height: 16px;
}

.ww-by {
  margin-left: auto;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--c-muted-fg);
}

/* The signature dot: a process running on its own */
.run-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--c-primary);
}

.ww-pending-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: 1px solid var(--c-border-strong);
}

/* AI support: one ticket, answered by the agent */
.ww-msg {
  max-width: 92%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.ww-msg--in {
  background: var(--c-muted);
  color: var(--c-fg);
  border-top-left-radius: 4px;
}

.ww-msg--out {
  margin: 8px 0 0 auto;
  background: var(--c-fg);
  color: var(--c-bg);
  border-top-right-radius: 4px;
}

.ww-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
  font-size: 0.75rem;
  color: var(--c-muted-fg);
}

.work-cat {
  font-size: 0.75rem;
  color: var(--c-muted-fg);
  margin-bottom: 0.5rem;
}

.work-title {
  font-weight: 500;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--c-fg);
  margin-bottom: 0.5rem;
}

.work-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--c-muted-fg);
}

/* ── FAQ ── */
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}

.faq-body.open {
  max-height: 320px;
}

.faq-item {
  border-top: 1px solid var(--c-border-strong);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--c-border-strong);
}

.faq-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  text-align: left;
  cursor: pointer;
}

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

.faq-q {
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.35;
  color: var(--c-fg);
}

.faq-a {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--c-muted-fg);
  max-width: 60ch;
  padding: 0 3rem 1.5rem 0;
}

/* Plus that turns into × when open (class name kept for the JS) */
.faq-chevron {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--c-border-strong);
  color: var(--c-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.faq-chevron svg {
  width: 14px;
  height: 14px;
}

.faq-btn:hover .faq-chevron {
  border-color: var(--c-fg);
}

.faq-chevron.open {
  transform: rotate(45deg);
  background: var(--c-fg);
  border-color: var(--c-fg);
  color: var(--c-bg);
}

/* ── Contact ── */
.contact-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--c-border-strong);
}

.contact-row dt {
  font-size: 0.75rem;
  color: var(--c-muted-fg);
}

.contact-row dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-fg);
  text-align: right;
}

.contact-row a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.contact-row a:hover {
  color: var(--c-muted-fg);
}

.form-panel {
  background: var(--c-bento);
  border-radius: 16px;
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .form-panel {
    padding: 2.25rem;
  }
}

.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--c-fg);
}

/* ── Form ── */
.field {
  width: 100%;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  background: var(--c-widget);
  color: var(--c-fg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field::placeholder {
  color: var(--c-muted-fg);
}

.field:focus {
  outline: none;
  border-color: var(--c-ring);
  box-shadow: 0 0 0 3px var(--c-primary-tint);
}

.field[aria-invalid="true"] {
  border-color: var(--c-destructive);
}

.field[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.field-error {
  display: none;
  font-size: 0.75rem;
  color: var(--c-destructive);
  margin-top: 0.25rem;
}

.field-error.show {
  display: block;
}

/* ── Btn ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--c-brand);
  color: var(--c-on-primary);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--c-brand-hover);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--c-fg);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.btn-ghost:hover {
  border-color: var(--c-fg);
}

/* ── Back to top ── */
#btt {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  width: 40px;
  height: 40px;
  background: var(--c-brand);
  color: var(--c-on-primary);
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, background 0.15s;
}

#btt.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#btt:hover {
  background: var(--c-brand-hover);
}

/* ── Footer ── */
footer {
  background: #0A0A0D;
  color: #8A8A94;
  border-top: 1px solid #1F1F26;
  overflow: hidden;
}

.footer-cta {
  font-weight: 500;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #F2F2EE;
  max-width: 16ch;
  text-wrap: balance;
}

.footer-head {
  font-size: 0.75rem;
  font-weight: 400;
  color: #7A7A85;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #C9C9CF;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1F1F26;
  font-size: 0.75rem;
  color: #7A7A85;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-bottom a:hover {
  color: #fff;
}

/* ── Theme toggle ── */
#theme-btn {
  cursor: pointer;
}

/* ═══════════════════════ LEGAL PAGES ═══════════════════════ */
.legal-hero {
  padding-top: 9rem;
  padding-bottom: 3rem;
}

.legal-label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--c-muted-fg);
}

.legal-title {
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--c-fg);
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--c-muted-fg);
}

/* Privacy | Terms switcher */
.legal-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--c-border-strong);
  border-radius: 999px;
}

.legal-tabs a {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-muted-fg);
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}

.legal-tabs a:hover {
  color: var(--c-fg);
}

.legal-tabs a[aria-current="page"] {
  background: var(--c-fg);
  color: var(--c-bg);
}

/* "In plain words" summary */
.legal-summary {
  background: var(--c-bento);
  border-radius: 16px;
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .legal-summary {
    padding: 2rem 2.25rem;
  }
}

.legal-summary ul {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.legal-summary li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--c-fg);
}

.legal-summary li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.625rem;
  height: 1px;
  background: var(--c-fg);
}

/* Layout: sticky table of contents + content */
.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .legal-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 4rem;
  }
}

.legal-toc {
  align-self: start;
}

@media (min-width: 1024px) {
  .legal-toc {
    position: sticky;
    top: 6.5rem;
  }
}

.legal-toc ol {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.125rem;
  border-left: 1px solid var(--c-border);
}

.legal-toc a {
  display: block;
  margin-left: -1px;
  padding: 0.375rem 0 0.375rem 1rem;
  border-left: 1px solid transparent;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--c-muted-fg);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.legal-toc a:hover {
  color: var(--c-fg);
}

.legal-toc a.active {
  color: var(--c-fg);
  border-left-color: var(--c-fg);
}

.legal-content {
  max-width: 68ch;
}

.legal-content section {
  border-top: 1px solid var(--c-border-strong);
  padding-top: 1.75rem;
  margin-bottom: 3rem;
  scroll-margin-top: 6.5rem;
}

.legal-content .num {
  display: block;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--c-muted-fg);
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.legal-content h2 {
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--c-fg);
  margin-bottom: 1rem;
}

.legal-content h3 {
  font-weight: 500;
  font-size: 1rem;
  color: var(--c-fg);
  margin: 1.5rem 0 0.5rem;
}

.legal-content p,
.legal-content li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-muted-fg);
}

.legal-content p + p {
  margin-top: 1rem;
}

.legal-content ul {
  list-style: none;
  margin: 0.75rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.legal-content ul li {
  position: relative;
  padding-left: 1.25rem;
}

.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 0.5rem;
  height: 1px;
  background: var(--c-border-strong);
}

.legal-content strong {
  font-weight: 500;
  color: var(--c-fg);
}

.legal-content a {
  color: var(--c-fg);
  text-decoration: underline;
  text-decoration-color: var(--c-border-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}

.legal-content a:hover {
  text-decoration-color: var(--c-fg);
}

.legal-note {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--c-muted-fg);
  border-left: 2px solid var(--c-border-strong);
  padding-left: 1rem;
}
