/* WERKS design tokens. Single locked theme: cold dark luxury, no light variant. */

:root {
  --bg: #0a0a0c;
  --bg-elevated: #131217;
  --bg-elevated-2: #1b1a20;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text-primary: #f4f2ec;
  --text-secondary: #a9a6a0;
  --text-muted: #716e6a;

  --accent: #c33f3f;
  --accent-strong: #e2726c;
  --accent-dim: rgba(195, 63, 63, 0.14);

  --radius-lg: 24px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-base: 320ms;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
  --space-7: 140px;

  --container: 1180px;
}

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

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

h1, h2, h3, p { margin: 0; }

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

/* ---------- focus & a11y ---------- */
:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* Icons (bold, filled) */
.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: currentColor;
  stroke: none;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.brand-logo-sm { width: 30px; height: 30px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.btn:hover { transform: translateY(-3px) scale(1.045); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--accent-strong); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
  padding: 12px 22px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

.btn-lg { padding: 17px 32px; font-size: 1.02rem; }

/* Section rhythm */
section { position: relative; z-index: 1; }

.section {
  padding-block: var(--space-6);
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-4);
}

.section-head h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.section-head p {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: 1.02rem;
  max-width: 52ch;
}

/* Hero */
.hero {
  padding-top: clamp(32px, 6vw, 96px);
  padding-bottom: var(--space-6);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: var(--space-5);
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.hero-copy .accent-word { color: var(--accent-strong); font-style: italic; padding-bottom: 2px; display: inline-block; line-height: 1.15; }

.hero-copy p {
  margin-top: var(--space-2);
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 46ch;
}

.hero-actions {
  margin-top: var(--space-3);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1038 / 973;
  background: #050506;
  border: 1px solid var(--border);
}

.hero-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(1) brightness(0.82) contrast(1.05);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(5,5,6,0.6) 100%);
  pointer-events: none;
}

/* Trust bento */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(160px, auto);
  gap: var(--space-2);
}

.trust-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 340px 220px at 100% 0%, rgba(195, 63, 63, 0.20), transparent 65%),
    var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}

.trust-card:hover {
  transform: translateY(-12px) scale(1.035);
  border-color: var(--border-strong);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.45);
}

.trust-card.is-featured {
  grid-column: span 2;
  grid-row: span 2;
  justify-content: space-between;
}

.trust-card .trust-content { position: relative; z-index: 1; max-width: 60%; }

.trust-avatar {
  position: absolute;
  right: 4%;
  bottom: 0;
  height: 94%;
  width: auto;
  max-width: 40%;
  object-fit: contain;
  object-position: bottom center;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.5));
}
.trust-card.is-featured .trust-avatar { max-width: 34%; }

.trust-card h3 { font-size: 1.05rem; font-weight: 700; }
.trust-card.is-featured h3 { font-size: 1.3rem; }
.trust-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Process */
.process-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  counter-reset: step;
}

.process-step {
  position: relative;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-strong);
}

.process-step .step-index {
  font-family: "JetBrains Mono", monospace;
  color: var(--accent-strong);
  font-size: 0.85rem;
}

.process-step h3 {
  margin-top: 10px;
  font-size: 1.15rem;
  font-weight: 700;
}

.process-step p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  max-width: 38ch;
}

/* Final CTA */
.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 700px 340px at 50% -30%, rgba(195, 63, 63, 0.18), transparent 65%),
    var(--bg-elevated);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  max-width: 52%;
}

.cta-panel h2 {
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 20ch;
}

.cta-panel p {
  color: var(--text-secondary);
  max-width: 46ch;
}

.cta-avatar {
  position: absolute;
  bottom: 0;
  height: 94%;
  width: auto;
  max-width: 23%;
  object-fit: contain;
  object-position: bottom;
  pointer-events: none;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.5));
}

.cta-avatar-right { right: 2%; }
.cta-avatar-left { left: 2%; }

/* Footer */
.footer {
  position: relative;
  padding-block: var(--space-4);
  border-top: 1px solid var(--border);
  background: radial-gradient(ellipse 900px 420px at 50% 140%, rgba(195, 63, 63, 0.32), transparent 65%);
}

.footer .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.footer-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 46ch;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: color var(--dur-fast) var(--ease);
}
.footer-link:hover { color: var(--accent-strong); }

/* Reveal-on-scroll (transform/opacity only) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .trust-card { transition: none; }
  .btn:active, .btn:hover, .trust-card:hover { transform: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; gap: var(--space-4); }
  .hero-visual { max-width: 360px; margin-inline: auto; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-card.is-featured { grid-column: span 2; grid-row: span 1; }
  .process-track { grid-template-columns: 1fr; gap: var(--space-3); }
  .cta-avatar { max-width: 20%; height: 90%; }
  .cta-content { max-width: 70%; }
}

/* Tablet only: image can lead since there's headroom above the fold */
@media (min-width: 641px) and (max-width: 960px) {
  .hero-visual { order: -1; }
}

/* Phones: text and CTA must clear the fold first, image follows */
@media (max-width: 640px) {
  .section { padding-block: var(--space-5); }
  .hero { padding-top: 20px; }
  .hero-visual { display: none; }
  .nav .btn { display: none; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-card.is-featured { grid-column: span 1; }
  .trust-card .trust-content { max-width: 64%; }
  .trust-avatar { max-width: 36%; }
  .hero-actions .btn { width: 100%; }
  .cta-panel { padding: var(--space-5) var(--space-3); }
  .cta-avatar { display: none; }
  .cta-content { max-width: 100%; }
  .footer-link { padding: 12px 6px; margin: -12px -6px; }
}

/* Very narrow phones: logo wordmark needs to shrink to avoid horizontal scroll */
@media (max-width: 360px) {
  .nav .container { gap: 10px; }
  .brand span { display: none; }
}
