/* Sufler landing. Brand tokens mirror the app (docs/brand.md in voxford-sufler).
   This site is a separate Cloudflare Pages deploy with its own lifecycle: it
   does not import from the app. When the brand changes, update both. */

/* Self-hosted OFL fonts (no Google CDN), same faces as the app. */
@font-face {
  font-family: "Spectral";
  src: url("assets/fonts/Spectral-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Spectral";
  src: url("assets/fonts/Spectral-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/SourceSans3-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #ffffff;
  --surface: #ffffff;
  --surface-border: #e4e4e7;
  --foreground: #1a1523;
  --muted: #52525b;

  --brand-50: #f5effc;
  --brand-100: #e9daf9;
  --brand-200: #d3b6f1;
  --brand-300: #b98fe6;
  --brand-400: #9a63d6;
  --brand-500: #7b3fc4;
  --brand-600: #6027b0;
  --brand-700: #4c1f8c;
  --brand-800: #391767;
  --brand-900: #281047;
  --brand-dark: #b79aef;

  --accent: var(--brand-600);
  --accent-hover: var(--brand-500);
  --accent-active: var(--brand-700);
  --hairline: var(--surface-border);

  /* "Stage" register (docs/brand.md): the landing gets the deeper violet
     "svjetlo pozornice" (stage-light) glow the app deliberately withholds.
     Two layers: a brighter core cone + a wide wash. */
  --stage-core: color-mix(in oklab, var(--brand-400) 55%, transparent);
  --stage-wash: color-mix(in oklab, var(--brand-200) 45%, transparent);

  --font-brand: "Spectral", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;

  /* One radius scale: interactive = 10px, panels = 14px. Nothing else rounds. */
  --radius-interactive: 10px;
  --radius-panel: 14px;

  --page: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #141019;
    --surface: #1e1826;
    --surface-border: #2e2838;
    --foreground: #ede7f5;
    --muted: #a1a1aa;
    --accent: var(--brand-dark);
    --hairline: #2e2838;
    /* Deep-violet stage light (brand-700..900) glowing out of near-black. */
    --stage-core: color-mix(in oklab, var(--brand-700) 88%, transparent);
    --stage-wash: color-mix(in oklab, var(--brand-900) 72%, transparent);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

.shell {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--accent);
  text-decoration: none;
}

.wordmark svg {
  width: 1.55rem;
  height: auto;
  color: var(--accent);
}

/* Buttons: one shape (pill-ish 10px), full state cycle. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-interactive);
  padding: 0.7rem 1.15rem;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand-600);
  color: #ffffff;
  border: 1px solid var(--brand-600);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-primary:active {
  background: var(--accent-active);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--hairline);
}

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

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklab, var(--background) 82%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* --- Hero (asymmetric split) --- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  /* Stage light: a brighter cone over the mark (upper right) plus a wide wash. */
  background:
    radial-gradient(38% 42% at 79% 20%, var(--stage-core), transparent 62%),
    radial-gradient(72% 82% at 72% 4%, var(--stage-wash), transparent 76%);
}

.hero .shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

.hero h1 {
  font-family: var(--font-brand);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 6vw, 4.25rem);
  line-height: 1.02;
  margin: 0;
  color: var(--foreground);
  text-wrap: balance;
}

.hero .lede {
  margin: 1.5rem 0 0;
  max-width: 34ch;
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  color: var(--muted);
}

.hero .actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-art {
  justify-self: center;
  width: min(100%, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius-panel);
}

.hero-art svg {
  width: 62%;
  height: auto;
  color: var(--accent);
  filter: drop-shadow(0 12px 40px color-mix(in oklab, var(--brand-600) 22%, transparent));
}

/* --- Section rhythm --- */
.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.section-head {
  font-family: var(--font-brand);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 2.5rem;
  max-width: 20ch;
  text-wrap: balance;
}

/* Capabilities: editorial hairline rows, not equal cards. */
.rows {
  border-top: 1px solid var(--hairline);
}

.row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(1.5rem, 3.5vw, 2.25rem);
  border-bottom: 1px solid var(--hairline);
}

.row h3 {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.15;
  margin: 0;
  color: var(--foreground);
}

.row p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 46ch;
}

/* How it works: two entry points converging. */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 1.5rem);
}

.entry {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-panel);
  padding: clamp(1.5rem, 3vw, 2rem);
  background: color-mix(in oklab, var(--surface) 60%, transparent);
}

.entry h3 {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0 0 0.6rem;
  color: var(--accent);
}

.entry p {
  margin: 0;
  color: var(--muted);
}

.pair-note {
  margin: 1.75rem 0 0;
  font-size: 1.1rem;
  color: var(--foreground);
  max-width: 52ch;
}

/* Closing CTA band. */
.cta {
  text-align: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  /* Same stage light, rising from below to close the page. */
  background:
    radial-gradient(34% 60% at 50% 128%, var(--stage-core), transparent 60%),
    radial-gradient(70% 96% at 50% 130%, var(--stage-wash), transparent 74%);
}

.cta h2 {
  font-family: var(--font-brand);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  margin: 0 auto;
  max-width: 16ch;
  text-wrap: balance;
}

.cta p {
  margin: 1.1rem auto 0;
  max-width: 42ch;
  color: var(--muted);
}

.cta .actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.cta .contact-line {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.cta .contact-line a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
}

.cta .contact-line a:hover {
  border-color: var(--accent);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 2.5rem;
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* --- Motion: calm reveal on scroll. Content is visible by default; the reveal
   only applies where supported and motion is welcome, so nothing hides on
   unsupported browsers or under reduced-motion. --- */
@media (prefers-reduced-motion: no-preference) {
  .hero .shell > * {
    animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero-art {
    animation-delay: 0.08s;
  }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 22%;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .hero .shell {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-art {
    grid-row: 1;
    width: min(70%, 260px);
  }
  .row {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .pair {
    grid-template-columns: 1fr;
  }
}
