/* ==========================================================================
   Future Current Studio — design system (shared by every page)
   Brand colours are sampled from the approved F mark (purple → blue → cyan).
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #0B0C10;
  --bg-2: #0F1116;
  --bg-3: #12141B;
  --surface: #191C25;
  --surface-2: #20242F;

  /* Hairlines */
  --line: rgba(245, 246, 250, 0.08);
  --line-2: rgba(245, 246, 250, 0.13);
  --line-3: rgba(245, 246, 250, 0.22);

  /* Text */
  --text: #F5F6FA;
  --text-2: #A5A9B8;
  --text-3: #7D8294;

  /* Brand (from the approved mark) */
  --violet: #A33CFF;
  --magenta: #C034FF;
  --indigo: #7250FF;
  --blue: #5085FF;
  --sky: #29BFFF;
  --cyan: #12E8F6;
  --grad: linear-gradient(90deg, #C034FF 0%, #7250FF 34%, #5085FF 52%, #29BFFF 76%, #0CF4FF 100%);

  /* Functional */
  --accent: #5CE6F4;      /* links, focus, active states on dark */
  --ok: #3DDC97;
  --warn: #F2C46D;
  --danger: #FF7D8E;

  /* Type */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout */
  --container: 1320px;
  --pad: clamp(20px, 4.4vw, 56px);
  --gap: clamp(16px, 2.2vw, 32px);
  --header-h: 72px;
  --section-y: clamp(96px, 11vw, 168px);

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --r-xl: 26px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas, video, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
/* Zero-specificity list reset: any class rule can still set margins/padding. */
:where(ul, ol) { list-style: none; padding: 0; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
[hidden] { display: none !important; }
::selection { background: rgba(18, 232, 246, 0.26); color: #fff; }

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
.display {
  font-size: clamp(2.75rem, 1.15rem + 5.3vw, 6.25rem);
  line-height: 0.96;
  letter-spacing: -0.048em;
  font-weight: 600;
}
.title {
  font-size: clamp(2.125rem, 1.25rem + 3.1vw, 4.125rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.h3 {
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.lead {
  font-size: clamp(1.0625rem, 0.98rem + 0.36vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
p { text-wrap: pretty; }
.muted { color: var(--text-2); }
.mono, .label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
}
.label { color: var(--text-3); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex;
  align-items: flex-start; /* marker aligns with the first line when the label wraps */
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 6px;
  margin-top: calc(0.8em - 3px); /* centred on the first line (line-height 1.6) */
  flex: none;
  background: var(--grad);
  transform: skewX(-24deg);
  border-radius: 1px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.section {
  position: relative;
  padding-block: var(--section-y);
}
.section--alt { background: var(--bg-2); }
.section--rule { border-top: 1px solid var(--line); }

.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 28px;
  margin-bottom: clamp(48px, 6.4vw, 96px);
  align-items: end;
}
.section-head > .section-index { grid-column: 1 / -1; }
.section-head > .title { grid-column: 1 / span 8; }
.section-head > .lead { grid-column: 9 / span 4; }
.section-head--wide > .title { grid-column: 1 / span 9; }
.section-head--wide > .lead { grid-column: 1 / span 7; }

.section-index {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.section-index b { color: var(--text); font-weight: 500; }
.section-index::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

@media (max-width: 1023px) {
  .section-head > .title,
  .section-head > .lead,
  .section-head--wide > .title,
  .section-head--wide > .lead { grid-column: 1 / -1; }
  .section-head > .lead { max-width: 40em; }
}

/* ---------- Buttons & links ---------- */
.btn {
  --btn-h: 50px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 560;
  letter-spacing: -0.005em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn .i-arrow { width: 16px; height: 16px; transition: transform 0.35s var(--ease-out); }
.btn:hover .i-arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--text);
  color: #0B0C10;
}
.btn-primary:hover {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(245, 246, 250, 0.08);
}
.btn-secondary {
  background: rgba(245, 246, 250, 0.02);
  border-color: var(--line-3);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: rgba(245, 246, 250, 0.5);
  background: rgba(245, 246, 250, 0.05);
}
.btn-sm { --btn-h: 40px; padding: 0 16px; font-size: 0.875rem; }
.btn-lg { --btn-h: 56px; padding: 0 28px; font-size: 1rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line-3);
  padding-bottom: 3px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.link-arrow:hover { border-color: var(--accent); }
.link-arrow .i-arrow { width: 14px; height: 14px; transition: transform 0.35s var(--ease-out); }
.link-arrow:hover .i-arrow { transform: translateX(3px); }

.text-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  transition: text-decoration-color 0.2s;
}
.text-link:hover { text-decoration-color: var(--accent); }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}
.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
}
.tag--live::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.16); }
.tag--demo::before { background: var(--warn); }
.tag--brand::before { background: var(--cyan); }
.tag--plain::before { display: none; }

/* ---------- Header ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), -webkit-backdrop-filter 0.4s, backdrop-filter 0.4s;
}
.site-header.is-scrolled,
.menu-open .site-header {
  background: rgba(11, 12, 16, 0.76);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  backdrop-filter: saturate(150%) blur(18px);
  border-bottom-color: var(--line);
}
.menu-open .site-header { background: var(--bg); }
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: block;
  flex: none;
  line-height: 0;
  border-radius: 4px;
}
.brand img { width: 140px; height: auto; }

.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s var(--ease);
}
.nav a:hover,
.nav a[aria-current] { color: var(--text); }
.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 1px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-out);
}
.nav a[aria-current]::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  padding: 0;
}
.menu-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out);
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 59;
  display: flex;
  flex-direction: column;
  padding: 8px var(--pad) calc(28px + env(safe-area-inset-bottom));
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-menu ul { border-top: 1px solid var(--line); }
.mobile-menu li { border-bottom: 1px solid var(--line); }
.mobile-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  font-size: 1.625rem;
  font-weight: 520;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.mobile-menu li a span {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--text-3);
}
.mm-foot {
  margin-top: auto;
  padding-top: 32px;
  display: grid;
  gap: 18px;
}
.mm-foot .btn { width: 100%; }
.mm-foot p { color: var(--text-3); font-size: 0.875rem; }

.menu-open { overflow: hidden; }

@media (max-width: 1079px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
}
@media (min-width: 1080px) {
  .mobile-menu { display: none !important; }
}
@media (max-width: 599px) {
  :root { --header-h: 64px; }
  .brand img { width: 118px; }
  .header-actions .btn-sm { padding: 0 14px; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding: clamp(64px, 8vw, 104px) 0 calc(32px + env(safe-area-inset-bottom));
  background: var(--bg);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  padding-bottom: clamp(48px, 6vw, 80px);
}
.footer-brand img { width: 220px; }
.footer-tagline {
  margin-top: 28px;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}
.footer-brand .mono { margin-top: 12px; color: var(--text-3); }
.footer-col h2 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 18px;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a,
.footer-col li > span {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--text-3);
}
.footer-base a { color: var(--text-2); text-decoration: none; }
.footer-base a:hover { color: var(--text); }

@media (max-width: 899px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 479px) {
  .footer-brand img { width: 180px; }
}

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.i-arrow { flex: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .mobile-menu, .hero-visual { display: none !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; }
}
