/* ==========================================================================
   Cloudster Media Group
   Design tokens mirror the live site's Elementor kit.
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable weight) ---------- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --white: #ffffff;
  --bg: #020618;
  --panel: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --text: #cad5e2;
  --accent: #eb3340;
  --accent-soft: #ffb3c2;

  --container: 1280px;
  --gutter: 30px;
  --section-y: 96px;
  --radius-card: 16px;
  --radius-btn: 8px;
  --radius-field: 12px;

  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;

  --header-h: 88px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  color: var(--white);
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.2;
  margin: 0.5rem 0 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

ul { margin: 0; }

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--white);
  border-radius: 0 0 var(--radius-btn) var(--radius-btn);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

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

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
}

.section {
  padding: var(--section-y) var(--gutter);
  background-image: linear-gradient(180deg, var(--panel) 0%, var(--bg) 100%);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background-color: var(--panel);
  padding: 15px 0;
  position: relative;
  z-index: 100;
}

.header-inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: var(--gutter);
}

.logo {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
}
.logo img { width: 140px; height: auto; }

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;
  padding: 8px 11px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s ease;
}
.nav-list a:hover,
.nav-list a:focus,
.nav-list a.is-active { color: var(--white); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 12px;
  background-color: var(--bg);
  color: var(--white);
  border: 0;
  border-radius: var(--radius-btn);
  cursor: pointer;
}
.nav-toggle svg { width: 26px; height: 26px; fill: var(--white); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded='true'] { border-radius: 8px 8px 0 0; }
.nav-toggle[aria-expanded='true'] .icon-open { display: none; }
.nav-toggle[aria-expanded='true'] .icon-close { display: block; }

.header-cta { flex: 0 0 auto; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 16px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--white);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--border);
  color: var(--white);
}

.btn-ghost {
  background-color: var(--bg);
  color: var(--white);
  border-color: var(--border);
}
.btn-ghost:hover,
.btn-ghost:focus {
  background-color: var(--border);
  border-color: var(--border);
  color: var(--white);
}

.btn-block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.hero-copy {
  flex: 0 0 50%;
  max-width: 50%;
  padding-right: 60px;
}

.hero-copy h1 { margin-top: 0; }
.hero-copy h1 small {
  font-size: 1em;
  color: var(--accent);
}

.lead { margin-bottom: 0; }

.hero-media {
  flex: 0 0 50%;
  max-width: 50%;
}
.hero-media img {
  width: 100%;
  border-radius: var(--radius-card);
  box-shadow: 0 0 83px 0 rgba(59, 129, 218, 0.48);
}

/* ==========================================================================
   Split sections (Advertisers / Property / Retailers / Contact)
   ========================================================================== */
.split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
}

.split-main {
  flex: 0 0 50%;
  max-width: 50%;
  padding-right: 30px;
}

.contact-copy { padding-right: 60px; }

.split-aside {
  flex: 0 0 50%;
  max-width: 50%;
}

/* ---------- Section heading with icon ---------- */
.head-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.head-row h2 { margin: 0; }

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 12px;
  background-color: var(--accent);
  border-radius: 50%;
}
.icon-badge svg {
  width: 28px;
  height: 28px;
  fill: var(--white);
}

.subhead {
  color: var(--accent);
  font-size: 1.5rem;
  margin: 0 0 1rem;
  padding-top: 20px;
}

.section-intro {
  max-width: 680px;
  margin-bottom: 0;
}

/* ==========================================================================
   Prose blocks
   ========================================================================== */
.prose p { margin: 0 0 1rem; }
.prose p:last-child { margin-bottom: 0; }

.prose ul {
  margin: 0 0 1rem;
  padding-left: 18px;
}
.prose ul:last-child { margin-bottom: 0; }
.prose li + li { padding-top: 10px; }
.prose ul + p { padding-top: 16px; }
.prose strong { color: var(--white); }
.prose li::marker { color: var(--accent); }

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 45px;
}

.card-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}
.card-title-spaced { margin-top: 30px; }

/* Group cards: the <strong> renders as a small accent eyebrow above the name */
.card-title strong {
  display: block;
  font-weight: 400;
  font-size: 0.8em;
  color: var(--accent);
}

/* ---------- Card grids ---------- */
.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px 20px;
  margin-top: 30px;
}

.grid-3 > .card {
  flex: 0 0 calc(33.333% - 14px);
  max-width: calc(33.333% - 14px);
}

.grid-2 > .card {
  flex: 0 0 calc(50% - 10px);
  max-width: calc(50% - 10px);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-list {
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}
.contact-list a:hover,
.contact-list a:focus { color: var(--text); }

.contact-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 20px;
}
.contact-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
  transition: fill 0.3s ease;
}
.contact-list a:hover .contact-icon svg { fill: var(--text); }

.note { margin: 0; }

/* ==========================================================================
   Form
   ========================================================================== */
.enquiry-form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.field { display: block; }
.field-full { flex: 0 0 100%; max-width: 100%; }
.field-half { flex: 1 1 calc(50% - 10px); min-width: 200px; }

.enquiry-form input:not([type='checkbox']),
.enquiry-form textarea,
.enquiry-form select {
  width: 100%;
  padding: 12px 14px;
  background-color: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  border: 1px solid var(--border);
  border-radius: var(--radius-field);
  accent-color: var(--accent);
  transition: border-color 0.2s ease;
}

.enquiry-form textarea {
  resize: vertical;
  min-height: 110px;
}

.enquiry-form input::placeholder,
.enquiry-form textarea::placeholder { color: #7b8ba3; }

.enquiry-form input:focus,
.enquiry-form textarea:focus,
.enquiry-form select:focus {
  border-color: var(--accent);
  outline: none;
}

.enquiry-form :is(input, textarea, select).has-error { border-color: var(--accent); }

/* Select with custom caret */
.select-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
}
.enquiry-form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}
.select-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  fill: var(--border);
  pointer-events: none;
}

.acceptance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0 15px;
}
.acceptance input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
  cursor: pointer;
}
.acceptance label {
  font-size: 0.9375rem;
  cursor: pointer;
}

/* Honeypot */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  flex: 0 0 100%;
  margin: 0;
  font-size: 0.9375rem;
  min-height: 1.4em;
}
.form-status.is-error { color: var(--accent-soft); }
.form-status.is-success { color: var(--white); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--bg);
  padding: 30px var(--gutter);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.copyright {
  margin: 0;
  font-size: 0.875rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav a {
  display: block;
  padding: 6px 8px;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s ease;
}
.footer-nav a:hover,
.footer-nav a:focus { color: var(--white); }

/* ==========================================================================
   Tablet — max 1024px
   ========================================================================== */
@media (max-width: 1024px) {
  .header-inner { justify-content: space-between; }

  .site-nav {
    order: 3;
    flex: 0 0 100%;
    max-width: 100%;
    justify-content: center;
  }

  .hero-grid { flex-direction: column; }
  .hero-copy,
  .hero-media {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0;
  }
  .hero-media { order: -1; }
  .hero-copy { padding-top: 30px; }

  .section { padding-block: var(--section-y); }
  /* Room for the hero image glow, which the header would otherwise cover */
  .section-hero { padding-top: 80px; }

  .split-main,
  .split-aside,
  .contact-copy {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0;
  }
  .split-main { padding-bottom: 30px; }

  .card { padding: 36px; }

  .grid-3 > .card,
  .grid-2 > .card {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ==========================================================================
   Mobile — max 767px
   ========================================================================== */
@media (max-width: 767px) {
  :root {
    --section-y: 80px;
    --header-h: 78px;
  }

  h1 { font-size: clamp(1.875rem, 8vw, 2.5rem); }
  h2 { font-size: clamp(1.625rem, 6.5vw, 2rem); }
  .subhead { font-size: 1.25rem; }

  /* Sticky header on mobile, as on the live site */
  .site-header {
    position: sticky;
    top: 0;
  }
  .site-header.is-stuck { box-shadow: 0 8px 24px rgba(2, 6, 24, 0.6); }

  .header-inner { transition: row-gap 0.3s ease; }

  /* Row 1: logo. Row 2: CTA (left) + burger (right) — as on the live site. */
  .logo {
    order: 0;
    flex: 0 0 100%;
    max-width: 100%;
    /* 96px: the 280x192 logo scaled to its 140px width */
    max-height: 96px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
  }
  .logo img { margin-inline: auto; }

  /* Slide the logo away once scrolling starts so the sticky header sits lower */
  .site-header.is-stuck .logo {
    max-height: 0;
    opacity: 0;
  }
  .site-header.is-stuck .header-inner { row-gap: 0; }

  .site-nav {
    order: 2;
    flex: 0 0 auto;
    max-width: none;
    position: static;
  }

  .nav-toggle { display: inline-flex; }
  .nav-toggle svg { width: 28px; height: 28px; }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    right: var(--gutter);
    left: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    background-color: var(--bg);
    border-radius: 8px 0 8px 8px;
    overflow: hidden;
    z-index: 99;
  }
  .nav-list.is-open { display: flex; }

  .nav-list a {
    padding: 14px 20px;
    font-size: 16px;
    text-align: left;
  }
  .nav-list a:hover,
  .nav-list a:focus,
  .nav-list a.is-active { background-color: var(--bg); color: var(--white); }

  .header-cta {
    order: 1;
    margin-right: auto;
  }

  .card { padding: 28px 22px; }

  .field-half { flex: 0 0 100%; max-width: 100%; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 400px) {
  :root { --gutter: 20px; }
}

/* ==========================================================================
   Motion & print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .btn,
  .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .section { background: #fff; padding: 20px 0; }
  h1, h2, h3, .card-title { color: #000; }
  .card { border-color: #ccc; }
}
