/* ==========================================================================
   Telera / Monako - Design System
   Dark-first, Apple-grade, spare.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Inter+Tight:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* Color */
  --bg: #0A0B0F;
  --bg-elev: #0E1015;
  --surface: #15171E;
  --surface-2: #1B1E27;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  --text: #F4F5F7;
  --text-muted: #8A8F9C;
  --text-dim: #5A5F6B;

  /* Signature accent: confident electric blue */
  --accent: oklch(0.72 0.16 252);
  --accent-strong: oklch(0.78 0.18 252);
  --accent-soft: oklch(0.72 0.16 252 / 0.16);
  --accent-glow: oklch(0.72 0.16 252 / 0.35);

  /* Rare warm accent - approval moments */
  --amber: oklch(0.82 0.14 75);
  --amber-soft: oklch(0.82 0.14 75 / 0.16);

  /* Verified state */
  --green: oklch(0.78 0.14 152);

  /* Type */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'Inter Tight', sans-serif;

  /* Scale */
  --container: 1200px;
  --container-narrow: 920px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'ss02';
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

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

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section-sm { padding: 56px 0; }
.section-lg { padding: 120px 0; }

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .section-lg { padding: 72px 0; }
  .container, .container-narrow { padding: 0 20px; }
}

/* ==========================================================================
   Type
   ========================================================================== */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow-muted {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

h1, .h1 {
  font-size: clamp(48px, 7.2vw, 104px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h2, .h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

h3, .h3 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h4, .h4 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.lead {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.mono {
  font-family: var(--font-mono);
}

.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(10, 11, 15, 0.78);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.nav-logo .wordmark { font-weight: 600; }
.nav-logo .wordmark em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-left: -1px;
  font-size: 1.08em;
}

/* Bold sans-serif accent with cyan→blue gradient - for headline emphasis words.
   Used as <span class="accent">free.</span> inside h1/h2.
   Responds to body[data-accent-style] from the tweaks panel. */
.accent {
  font-family: var(--font-sans) !important;
  font-style: normal !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
  font-size: 1em;
  background: linear-gradient(95deg,
    var(--tweak-grad-start, oklch(0.80 0.16 215)) 0%,
    var(--tweak-grad-end, oklch(0.62 0.18 252)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  padding-right: 0.04em;
  /* Make the gradient render the same on every line when the span wraps */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Solid colour variant */
body[data-accent-style="solid"] .accent {
  background: none !important;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--tweak-solid, oklch(0.78 0.16 232)) !important;
  -webkit-text-fill-color: var(--tweak-solid, oklch(0.78 0.16 232));
}

/* Editorial serif italic variant */
body[data-accent-style="serif"] .accent {
  font-family: 'Instrument Serif', Georgia, serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: 1.08em;
  letter-spacing: -0.005em !important;
  background: none !important;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text);
}

.accent.tint { color: transparent !important; }

/* Headline scaling knob */
h1, .h1 { font-size: calc(clamp(48px, 7.2vw, 104px) * var(--tweak-h1-scale, 1)); }

.nav-logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, oklch(0.65 0.18 280) 100%);
  position: relative;
  box-shadow: 0 0 12px var(--accent-glow);
}
.nav-logo-mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 3px;
  background: var(--bg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

/* ==========================================================================
   Mobile menu
   ========================================================================== */

.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 120;
}

.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(10, 11, 15, 0.97);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s var(--ease), visibility 0.32s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mobile-menu.open { opacity: 1; visibility: visible; }

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transform: translateY(12px);
  transition: transform 0.32s var(--ease);
}

.mobile-menu.open .mobile-menu-inner { transform: none; }

.mobile-link {
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--text-muted);
  padding: 12px 18px;
  transition: color 0.2s;
}

.mobile-link.active,
.mobile-link:hover { color: var(--text); }

.mobile-cta { margin-top: 28px; }

@media (max-width: 880px) {
  .nav-burger { display: flex; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #0A0B0F;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-link {
  padding: 0;
  background: none;
  color: var(--accent);
  font-weight: 500;
}
.btn-link:hover .btn-arrow {
  transform: translateX(3px);
}
.btn-arrow {
  display: inline-block;
  transition: transform 0.2s var(--ease);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 15px;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  background: var(--surface-2);
}

.card-glow:hover::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

/* ==========================================================================
   Footer + CTA band
   ========================================================================== */

.cta-band {
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, rgba(77, 124, 255, 0.04) 100%);
}

.cta-band::before {
  content: '';
  position: absolute;
  left: 50%; bottom: -50%;
  width: 800px; height: 800px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
}

.cta-band h2 {
  position: relative;
  margin-bottom: 32px;
}

.cta-band .btn { position: relative; }

.footer {
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}

@media (max-width: 880px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 32px;
    align-items: start;
    margin-bottom: 48px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-brand p { margin-top: 12px; }
}
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}

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

.footer-col a {
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 16px;
  max-width: 280px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

/* ==========================================================================
   Utility
   ========================================================================== */

.divider {
  height: 1px;
  background: var(--border);
  border: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.tag-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }

@media (max-width: 960px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

.text-center { text-align: center; }

/* placeholder image slot - subtle striped */
.placeholder {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.018) 0 12px,
      rgba(255,255,255,0.03) 12px 24px),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
}
