/* ==========================================================================
   SCOTLAN.EVENTS — design system
   CoreHost family skin + ScotLAN brand colours.
   Family surfaces (shared with rob.tf / corehost.com.au):
     bg       #0E0F13  page ground (dark charcoal)
     surface  #15171C  elevated cards
     line     #232730  hairline borders
     text     #EDEEF3  primary text
     muted    #A6ABB8  secondary text
   ScotLAN brand (sampled from the ScotLAN logo):
     sl-blue  #3D8FD4  Pac-Man blue
     sl-green #5DC24A  ghost green
     sl-red   #E5342B  tagline red (sharp secondary accent)
   Type: Lato 300 / 400 / 700 / 900 throughout.
   ========================================================================== */

:root {
  --bg: #0E0F13;
  --surface: #15171C;
  --surface-hover: #181B21;
  --line: #232730;
  --line-strong: #2E333D;
  --text: #EDEEF3;
  --muted: #A6ABB8;

  --sl-blue: #3D8FD4;
  --sl-green: #5DC24A;
  --sl-red: #E5342B;
  --sl-red-bright: #F0564A; /* red for small text on dark — AA */
  --sl-red-deep: #C4271F;   /* red fills behind white text — AA */
  --sl-gradient: linear-gradient(96deg, var(--sl-blue) 0%, var(--sl-green) 100%);

  --font-sans: "Lato", "Helvetica Neue", Arial, system-ui, sans-serif;

  --r-card: 12px;
  --r-ctl: 8px;

  --frame-max: 72rem;
  --frame-pad: clamp(1.25rem, 4vw, 2.5rem);
  --sect-pad: clamp(4.5rem, 10vw, 8.5rem);
}

/* ---------- Reset & base ---------- */

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
svg { display: block; }

::selection { background: var(--sl-red-deep); color: #fff; }

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

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

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--sl-red-deep);
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: var(--r-ctl);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

.frame {
  max-width: var(--frame-max);
  margin-inline: auto;
  padding-inline: var(--frame-pad);
}

section { scroll-margin-top: 5.5rem; }

/* ---------- Shared type ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sl-red-bright);
  margin-bottom: 1.25rem;
}
/* short rule before every kicker — a quiet editorial marker */
.kicker::before {
  content: "";
  flex: none;
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.65;
}

h1 {
  font-weight: 900;
  font-size: clamp(2.25rem, 5.6vw, 4.25rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 26ch;
  text-wrap: balance;
}

/* two-register headline: a whispered setup, then the shout */
.h1-quiet {
  display: block;
  font-weight: 300;
  font-size: 0.5em;
  line-height: 1.3;
  letter-spacing: 0.005em;
  color: var(--muted);
  margin-bottom: 0.5em;
}

h1 em {
  font-style: normal;
  font-weight: 900;
  color: var(--sl-blue);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 em {
    background: var(--sl-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

h2 {
  font-weight: 900;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: #fff;
  max-width: 24ch;
  text-wrap: balance;
}

h3 {
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.25;
  color: #fff;
}

.sect-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

.sect-sub {
  color: var(--muted);
  font-weight: 300;
  max-width: 52ch;
  margin-top: 1.25rem;
}

p { text-wrap: pretty; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease,
              background-color 0.18s ease, filter 0.18s ease;
}
.btn:hover { border-color: var(--sl-blue); color: #fff; }

.btn-solid {
  background: var(--sl-gradient);
  border: 1px solid transparent;
  color: #0B0D11;
  font-weight: 900;
}
.btn-solid:hover {
  filter: brightness(1.1);
  color: #0B0D11;
  box-shadow: 0 10px 28px -14px rgba(61, 143, 212, 0.55);
}
.btn-solid:disabled { opacity: 0.6; cursor: wait; filter: none; }

/* ---------- Header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 15, 19, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-mark { height: 26px; width: auto; flex: none; }

.brand-name {
  display: inline-flex;
  align-items: baseline;
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  color: #fff;
}

.brand-grad { color: var(--sl-blue); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand-grad {
    background: var(--sl-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.brand-tld {
  font-weight: 300;
  color: var(--muted);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.site-nav a {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}
.site-nav a:hover { color: #fff; }
.site-nav a.nav-cta { color: var(--sl-red-bright); }
.site-nav a.nav-cta:hover { color: #fff; }

.nav-toggle {
  display: none;
  padding: 0.55rem;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle .bar-top, .nav-toggle .bar-bot { transition: transform 0.2s ease; transform-origin: center; }
.nav-toggle[aria-expanded="true"] .bar-top { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar-bot { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 47.5rem) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  body.nav-open .site-nav { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--frame-pad) 1.25rem;
  }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a { display: block; padding: 1rem 0.25rem; font-size: 0.875rem; }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(5rem, 13vw, 10rem) clamp(4.5rem, 11vw, 8.5rem);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: clip;
}

/* faint arcade dot-grid, hero only — a quiet Pac-dot nod */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line-strong) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: 0.5;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(120% 90% at 85% 0%, #000 0%, transparent 62%);
  mask-image: radial-gradient(120% 90% at 85% 0%, #000 0%, transparent 62%);
}

/* faint brand aurora behind the headline — barely there, no banding */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(42rem 26rem at 78% 8%, rgba(61, 143, 212, 0.10), transparent 68%),
    radial-gradient(34rem 22rem at 96% 42%, rgba(93, 194, 74, 0.05), transparent 70%);
  pointer-events: none;
}

.hero .frame { position: relative; z-index: 1; }

/* entrance stagger — only applies when JS adds .will-reveal */
.hero .kicker.will-reveal       { transition-delay: 0s; }
.hero h1.will-reveal            { transition-delay: 0.08s; }
.hero .lede.will-reveal         { transition-delay: 0.16s; }
.hero .hero-actions.will-reveal { transition-delay: 0.24s; }
.hero .hero-meta.will-reveal    { transition-delay: 0.32s; }

.lede {
  margin-top: 1.75rem;
  max-width: 56ch;
  font-weight: 300;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.1rem;
  row-gap: 0.5rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
/* pac-dot separators between hero meta items */
.hero-meta span { display: inline-flex; align-items: center; gap: 1.1rem; }
.hero-meta span + span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sl-green);
  opacity: 0.85;
}

/* ---------- Pillars ---------- */

.pillars { padding-block: var(--sect-pad); border-bottom: 1px solid var(--line); }

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 53.75rem) {
  .pillar-grid { grid-template-columns: 1fr; }
}

.pillar {
  --accent: var(--sl-blue);
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  transition: background-color 0.2s ease, border-color 0.2s ease,
              transform 0.2s ease;
}
/* one brand colour per discipline — blue / green / red, straight from the logo */
.pillar:nth-child(2) { --accent: var(--sl-green); }
.pillar:nth-child(3) { --accent: var(--sl-red-bright); }

.pillar:hover {
  background: var(--surface-hover);
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .pillar:hover { border-color: color-mix(in srgb, var(--accent) 38%, var(--line-strong)); }
}

/* arcade dot, top-right, lights up on hover */
.pillar::before {
  content: "";
  position: absolute;
  top: 1.1rem; right: 1.1rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.pillar:hover::before { opacity: 1; }

/* card entrance stagger */
.pillar:nth-child(2).will-reveal { transition-delay: 0.08s; }
.pillar:nth-child(3).will-reveal { transition-delay: 0.16s; }

.pillar-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 2.75rem;
}

.pillar-icon { color: var(--accent); margin-bottom: 1.25rem; }

.pillar h3 { margin-bottom: 0.875rem; font-size: 1.25rem; }
.pillar p:last-child { color: var(--muted); font-size: 0.98rem; }

/* ---------- Trusted wall (client / event logos) ---------- */

.trusted { padding-block: var(--sect-pad); border-bottom: 1px solid var(--line); }

.wall-group + .wall-group { margin-top: clamp(2.75rem, 6vw, 4rem); }

.wall-label {
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* Hairline-grid wall: 1px gaps over the line colour read as engraved rules.
   Cells sit on the page ground so the marks float, not "cards". */
.wall {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
}
.wall-2 { grid-template-columns: repeat(2, 1fr); }
.wall-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 53.75rem) {
  .wall-2, .wall-3 { grid-template-columns: 1fr; }
}

.wall-cell {
  position: relative;
  background: var(--bg); /* must stay --bg: the EPL mark's cutouts are inked to match */
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.4rem;
}

/* brand-gradient rule sweeps in along the cell base on hover */
.wall-cell::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--sl-gradient);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
}
.wall-cell:hover::after { transform: scaleX(1); }

/* fixed optical stage per row so mixed lockups hang on one line */
.wall-logo {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wall-2 .wall-logo { height: 4rem; }
.wall-3 .wall-logo { height: 6.5rem; }

.logo-img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
  opacity: 0.72;
  transition: opacity 0.25s ease;
}
.wall-cell:hover .logo-img { opacity: 1; }

/* solid dark marks → white, uniformly */
.logo-invert { filter: brightness(0) invert(1); }

/* per-mark optical sizing (aspect ratios vary wildly) */
.logo-ewc       { height: 2.4rem; }
.logo-esl       { height: 3.5rem; }
.logo-epl       { height: 6.5rem; }
.logo-dreamhack { height: 1.45rem; }

.wall-desc {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--muted);
  max-width: 36ch;
}

/* cell entrance stagger */
.wall li:nth-child(2).will-reveal { transition-delay: 0.08s; }
.wall li:nth-child(3).will-reveal { transition-delay: 0.16s; }

.wall-more {
  margin-top: 1.25rem;
  font-weight: 300;
  font-size: 0.9375rem;
  color: var(--muted);
}

.wall-note {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 68ch;
}

/* ---------- How we work ---------- */

.how { padding-block: var(--sect-pad); border-bottom: 1px solid var(--line); }

.steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4.5vw, 3.5rem) clamp(2.5rem, 5vw, 4.5rem);
  counter-reset: step;
}
@media (max-width: 47.5rem) {
  .steps { grid-template-columns: 1fr; }
}

/* number + trailing hairline does the separating — calmer than a full border */
.step-num {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--sl-red-bright);
  margin-bottom: 1.1rem;
}
.step-num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.step h3 { margin-bottom: 0.75rem; }
.step p:last-child { color: var(--muted); font-size: 0.98rem; }

.capabilities { margin-top: clamp(3.5rem, 7vw, 5.5rem); }

.cap-head {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.cap-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.cap-list li {
  padding: 0.9rem 0.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--text);
  position: relative;
  padding-left: 1.35rem;
}
/* Pac-dot bullets, cycling the three brand colours like a pellet trail */
.cap-list li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--sl-green);
}
.cap-list li:nth-child(3n+1)::before { background: var(--sl-blue); }
.cap-list li:nth-child(3n+2)::before { background: var(--sl-green); }
.cap-list li:nth-child(3n)::before   { background: var(--sl-red-bright); }

/* ---------- Contact ---------- */

.contact { padding-block: var(--sect-pad); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
@media (max-width: 53.75rem) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-copy p:not(.kicker) { color: var(--muted); max-width: 44ch; margin-top: 1.25rem; }

.mail-fallback a {
  color: var(--text);
  font-weight: 700;
  text-decoration-color: var(--sl-green);
  text-underline-offset: 4px;
}
.mail-fallback a:hover { color: var(--sl-green); }

/* the form reads as one quiet instrument panel */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
}

.contact-form .field { margin-bottom: 1.4rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 33.75rem) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

.contact-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.contact-form label .optional { text-transform: none; letter-spacing: 0.04em; opacity: 0.7; font-weight: 400; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-form textarea { resize: vertical; min-height: 8rem; }

.contact-form input:hover,
.contact-form textarea:hover { border-color: var(--line-strong); }

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
  border-color: var(--sl-blue);
  box-shadow: 0 0 0 1px var(--sl-blue);
}

/* Honeypot — visually removed, still in the accessibility-hidden DOM */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.4em;
}
.form-status.is-error { color: #FF8A76; }

/* success state renders inside the form card — no double chrome */
.form-success { padding: 0.5rem 0.25rem; }
.form-success .kicker { margin-bottom: 0.75rem; }
.form-success p:last-child { color: var(--muted); }

/* ---------- Footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 47.5rem) {
  .foot-grid { grid-template-columns: 1fr; }
}

.foot-brand .brand-name { display: flex; align-items: center; }
.foot-brand .brand-mark { height: 22px; margin-right: 0.6rem; }

.foot-line {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.foot-head {
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.foot-nav li { margin-bottom: 0.55rem; }
.foot-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9375rem;
}
.foot-nav a:hover { color: var(--sl-green); }

.foot-small {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------- Reveal motion (added by JS only) ---------- */

.will-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.will-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
