/* Colours come from src/_data/site.json (theme) and are set as variables in base.njk. */

@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("/assets/fonts/open-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/open-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/open-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/open-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(20, 40, 70, 0.12);
  --header-h: 84px;
  --container: 1140px;
  --border: #e3eaf0;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 300; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 300; }
h3 { font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 852px; }

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

.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 8px; }

.eyebrow { font-weight: 600; color: var(--heading); margin-bottom: 0.4em; }

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6em; }
.buttons--center { justify-content: center; }
.button {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 999px;
  border: 2px solid var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.button:hover { transform: translateY(-1px); }
.button--primary { background: var(--primary); color: #fff; }
.button--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.button--outline { background: transparent; color: var(--primary); }
.button--outline:hover { background: var(--primary); color: #fff; }
.button--light { background: transparent; color: #fff; border-color: #fff; }
.button--light:hover { background: #fff; color: var(--heading); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: 0 1px 0 var(--border);
  transition: background 0.25s, box-shadow 0.25s;
}
.site-header--overlay { position: fixed; left: 0; right: 0; background: transparent; box-shadow: none; }
.site-header--overlay:not(.is-scrolled) .site-nav a { color: #fff; }
.site-header--overlay:not(.is-scrolled) .site-header__burger,
.site-header--overlay:not(.is-scrolled) .site-header__burger::before,
.site-header--overlay:not(.is-scrolled) .site-header__burger::after { background: #fff; }
.site-header.is-scrolled { background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }

.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.site-header__logo img { width: 52px; height: 52px; border-radius: 12px; }

.site-nav ul { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--heading);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: currentColor; }

.site-header__toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.site-header__burger, .site-header__burger::before, .site-header__burger::after {
  display: block; width: 24px; height: 2px; background: var(--heading); position: relative; content: "";
}
.site-header__burger::before { position: absolute; top: -7px; }
.site-header__burger::after { position: absolute; top: 7px; }

/* Sections */
.section { padding: 90px 0; }
.bg-white { background: #fff; }
.bg-light { background: var(--light); }
.bg-primary { background: var(--primary); color: #fff; }
.bg-primary h2, .bg-primary h3 { color: #fff; }

.section__header { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.section__header p { color: var(--muted); font-size: 1.05rem; }

.grid { display: grid; grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr)); gap: 30px; }

/* Hero */
.hero {
  position: relative;
  color: #fff;
  padding: calc(var(--header-h) + 70px) 0 150px;
  background: var(--hero-bg) center / cover no-repeat, linear-gradient(135deg, #5ec5f2, #9b7fd6);
}
.hero h1 { color: #fff; }
.hero__inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; align-items: center; }
.hero__inner--centered { grid-template-columns: 1fr; text-align: center; max-width: 760px; }
.hero__inner--centered .buttons { justify-content: center; }
.hero__text { text-align: center; }
.hero__text .buttons { justify-content: center; }
.hero__eyebrow { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 300; margin-bottom: 0.4em; }
.rotator { display: inline-block; font-style: italic; transition: opacity 0.35s, transform 0.35s; }
.rotator.is-changing { opacity: 0; transform: translateY(-8px); }
.hero__lead { font-size: 1.05rem; opacity: 0.95; }
.hero__lead p:last-child { margin-bottom: 0; }
.hero__media img { border-radius: var(--radius); box-shadow: 0 20px 50px rgba(20, 30, 60, 0.3); }

/* Icon grid */
.icon-grid--overlap { padding-top: 0; }
.icon-grid--overlap .grid { margin-top: -70px; position: relative; }
.icon-grid__item { text-align: center; padding: 0 10px; }
.icon-grid__icon {
  width: 110px; height: 110px; margin: 0 auto 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--primary); color: #fff;
  box-shadow: 0 10px 25px rgba(3, 169, 244, 0.35);
}
.icon-grid__icon svg { width: 54px; height: 54px; }
.icon-grid__item p { color: var(--muted); font-size: 0.95rem; }
.icon-grid--overlap + .icon-grid { padding-top: 10px; }

/* Feature cards */
.card { display: flex; gap: 20px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; transition: box-shadow 0.2s; }
.card:hover { box-shadow: var(--shadow); }
.card__icon { flex: none; width: 46px; height: 46px; color: var(--accent); }
.card__icon svg { width: 100%; height: 100%; }
.card h3 { color: var(--accent); margin-bottom: 0.4em; }
.card p { margin: 0; font-size: 0.95rem; }

/* Feature split */
.feature-split__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.feature-split__inner--reverse { grid-template-columns: 1fr 1.2fr; }
.feature-split__inner--reverse .feature-split__media { order: 2; }
.feature-split__media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-split__text > p { color: var(--muted); }
.points { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 30px; margin: 30px 0 0; }
.points dt { font-weight: 600; text-transform: uppercase; color: var(--heading); margin-bottom: 4px; }
.points dd { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Download */
.download { overflow: hidden; }
.download__inner { text-align: center; }
.download__title em { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.download__text { color: var(--muted); font-size: 1.1rem; font-weight: 300; }
.collage { position: relative; display: flex; justify-content: center; align-items: flex-end; margin-top: 50px; }
.collage img { width: 36%; min-width: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.collage--3 img:nth-child(1) { margin-right: -8%; transform: translateY(20px); }
.collage--3 img:nth-child(2) { width: 42%; position: relative; z-index: 2; }
.collage--3 img:nth-child(3) { margin-left: -8%; transform: translateY(20px); }

/* CTA */
.cta__inner { text-align: center; max-width: 760px; }
.cta .buttons { justify-content: center; }

/* Text pages */
.page-banner {
  padding: 70px 0 60px;
  background: linear-gradient(120deg, var(--primary), #7e8fe0);
  color: #fff;
}
.page-banner h1 { color: #fff; margin: 0; }
.page-banner__subtitle { margin: 0.6em 0 0; opacity: 0.9; }

.prose--center { text-align: center; }
.prose h2 { font-size: 1.6rem; font-weight: 400; margin-top: 1.8em; }
.prose h3 { margin-top: 1.6em; }
.prose img { margin: 1.4em 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.3em; }
.prose code { background: var(--light); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.9em; }
.prose blockquote { margin: 1.4em 0; padding: 0.8em 1.2em; border-left: 4px solid var(--primary); background: var(--light); }
.prose blockquote p:last-child { margin-bottom: 0; }

/* Releases */
.release { padding: 30px 0; border-bottom: 1px solid var(--border); }
.release:first-of-type { padding-top: 0; }
.release:last-child { border-bottom: 0; }
.release__header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 0.6em; }
.release__header h3 { font-size: 1.3rem; text-transform: none; margin: 0; }
.release__header time { color: var(--muted); font-size: 0.9rem; }
.release__summary { font-weight: 600; color: var(--heading); }
.badge { background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 10px; border-radius: 999px; }
.release .prose ul { margin-top: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 0.9rem; color: var(--muted); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.site-footer p { margin: 0; }
.site-footer__links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--muted); }

/* Responsive */
@media (max-width: 960px) {
  .hero__inner, .feature-split__inner, .feature-split__inner--reverse { grid-template-columns: 1fr; }
  .feature-split__inner--reverse .feature-split__media { order: 0; }
  .grid { grid-template-columns: repeat(min(var(--columns, 3), 2), minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --header-h: 70px; }
  .section { padding: 60px 0; }
  .hero { padding-bottom: 120px; }
  .grid { grid-template-columns: 1fr; }
  .points { grid-template-columns: 1fr; }
  .site-header__logo img { width: 44px; height: 44px; }
  .site-header__toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .site-nav a, .site-header--overlay:not(.is-scrolled) .site-nav a { display: block; color: var(--heading); padding: 12px 0; border-bottom: 1px solid var(--border); }
  .collage img { width: 40%; }
  .collage--3 img:nth-child(2) { width: 46%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rotator, .button { transition: none; }
}
