/* HeadNav website: one stylesheet, no framework. */

/* Colours come from the HeadNav artwork: royal-blue glow, near-black
   background, sky-blue neon line. */
:root {
  --bg: #ffffff;
  --bg-alt: #f3f3fa;
  --text: #16161e;
  --muted: #5b5b70;
  --accent: #2424c8;
  --accent-text: #ffffff;
  --border: #dedeea;
  --hero-bg: #0b0b0c;      /* matches the portrait's edges */
  --hero-text: #ffffff;
  --hero-muted: #b4b6c8;
  --hero-accent: #2a2ae0;
  --neon: #0a9deb;
  --radius: 12px;
  --max: 1080px;
  --narrow: 720px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --bg-alt: #14141b;
    --text: #e8e8ee;
    --muted: #9c9cb0;
    --accent: #8282ff;
    --accent-text: #0b0b0c;
    --border: #2a2a36;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

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

a {
  color: var(--accent);
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

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

.narrow { max-width: var(--narrow); }
.center { text-align: center; }

.lead {
  font-size: 1.2rem;
  color: var(--muted);
}

/* Accessibility */

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--bg);
  padding: 8px 12px;
}

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

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 24px;
}

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

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  font: inherit;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--text);
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
  }
}

/* Buttons */

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--accent);
}

.button-secondary {
  background: transparent;
  color: var(--accent);
}

/* Sections */

.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }

/* Hero: always dark, the portrait fills the right half edge to edge. */

.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  overflow: hidden;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

/* Left padding lines the text up with .container (1080px) inside the
   wider 1280px hero. */
.hero-text {
  padding: 48px 32px 48px max(16px, calc((min(100vw, 1280px) - 1080px) / 2 + 16px));
}

.hero .lead { color: var(--hero-muted); }

.hero-image {
  display: block;
  position: relative;
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Fade the portrait's edges into the background so its rectangle never shows. */
.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--hero-bg), transparent 10%, transparent 90%, var(--hero-bg)),
    linear-gradient(to top, var(--hero-bg), transparent 12%);
  pointer-events: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero .button {
  background: var(--hero-accent);
  border-color: var(--hero-accent);
  color: #ffffff;
}

.hero .button-secondary {
  background: transparent;
  border-color: var(--hero-muted);
  color: var(--hero-text);
}

.hero :focus-visible { outline-color: var(--neon); }

@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image { order: -1; }

  .hero-text {
    padding: 8px 16px 48px;
    text-align: center;
  }

  .hero-actions { justify-content: center; }
}

.split {
  display: flex;
  align-items: center;
  gap: 48px;
}

.device-image {
  width: 320px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .split {
    flex-direction: column;
    text-align: center;
  }

  .device-image { width: min(100%, 240px); }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card p:last-child { margin-bottom: 0; }

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.steps li {
  counter-increment: step;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  margin-bottom: 12px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-inner p { margin: 0; }

.site-footer a { color: var(--muted); }
