/* ==========================================================================
   Hackgenix — brand tokens and base
   Colours sampled from the logo files, not approximated.
   ========================================================================== */

:root {
  /* Brand */
  --flame:    #FF8804;
  --pulse:    #FB1155;
  --magenta:  #FA0099;
  --ink:      #000712;
  --void:     #01000A;

  /* Neutrals */
  --paper:    #FFFFFF;
  --mist:     #F5F5F7;
  --cloud:    #ECEDF1;
  --line:     #E2E3E9;
  --slate:    #5B6070;
  --graphite: #2A2E3B;

  /* On dark */
  --dark-line: rgba(255, 255, 255, .12);
  --dark-text: rgba(255, 255, 255, .64);

  --gradient: linear-gradient(115deg, var(--flame) 0%, var(--pulse) 55%, var(--magenta) 100%);

  /* Type */
  --display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Spacing rhythm */
  --gutter:  clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 9vw, 8.5rem);
  --maxw:    1240px;

  --radius:   14px;
  --radius-l: 22px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* --------------------------------------------------------------- reset -- */

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--slate);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.025em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 4.75rem); letter-spacing: -.04em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.15rem); letter-spacing: -.032em; }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.1875rem; }

p { margin: 0 0 1.15em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

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

ul { margin: 0; padding: 0; list-style: none; }

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

::selection { background: var(--pulse); color: #fff; }

/* -------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .62); }
.section--mist { background: var(--mist); }
.section--dark { background: var(--void); color: var(--dark-text); }
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: #fff; }

/* Section heading pair: a heading and one supporting line, no eyebrow label. */
.head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.head p { font-size: 1.125rem; }
.head--split { max-width: none; display: grid; gap: 1rem clamp(2rem, 6vw, 5rem); }
@media (min-width: 900px) {
  .head--split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: end; }
  .head--split h2 { margin-bottom: 0; }
}

/* ---------------------------------------------------------- typography -- */

.lede { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.6; }

.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------------------------------------------------------------- button -- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.7rem;
  border: 1px solid transparent;
  border-radius: 100px;
  font-family: var(--display);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .3s var(--ease), background-color .3s var(--ease),
              border-color .3s var(--ease), color .3s var(--ease), opacity .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--gradient); color: #fff; background-size: 160% 160%; }
.btn--primary:hover { background-position: 100% 0; }

.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--graphite); }

.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }

.btn--ghost-light { border-color: var(--dark-line); color: #fff; background: transparent; }
.btn--ghost-light:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.05); }

.btn__arrow { transition: transform .3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* -------------------------------------------------------------- motion -- */

/* Scroll reveal. Elements are visible by default and only hidden once JS
   confirms it can observe them, so the page is never blank without JS. */
.js-reveal[data-reveal-ready] {
  opacity: 0;
  transform: translateY(14px);
}
.js-reveal[data-reveal-ready].is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

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

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

.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 200;
  background: var(--ink); color: #fff;
  padding: .75rem 1.25rem; border-radius: 0 0 8px 8px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }
