:root {
  --blue: #4ba4f2;
  --ink: #0a2342;
  --slate: #51627a;
  --mist: #eef2f6;
  --line: #d3dce7;
  --white: #ffffff;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "Schibsted Grotesk", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
}

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 900; line-height: 0.95; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  padding: 10px 14px; background: var(--ink); color: var(--white);
}
.skip:focus { top: 16px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Hero: the network is the headline. */

.hero {
  position: relative;
  background: var(--blue);
  padding: 0 var(--gutter);
  overflow: hidden;
}

.nav {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 0;
}
.nav ul { display: flex; gap: clamp(12px, 2.4vw, 32px); align-items: center; }
.nav a { text-decoration: none; font-weight: 500; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-cta { padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; }
.nav-cta:hover { background: var(--ink); color: var(--blue); text-decoration: none !important; }

/* The PNG wordmark has a blue "8" that disappears on the blue field, so it is used as a mask and painted in ink. */
.logo {
  width: 128px; aspect-ratio: 224 / 70;
  background: var(--ink);
  -webkit-mask: url("../assets/brand/ROCK8-small-logo-black.png") center / contain no-repeat;
  mask: url("../assets/brand/ROCK8-small-logo-black.png") center / contain no-repeat;
}

.hero-body { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }

.hero h1 {
  max-width: 22ch;
  font-family: var(--text); font-weight: 500;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.25;
}

.roster {
  display: flex; flex-wrap: wrap; column-gap: 0.32em; row-gap: 0;
  margin: clamp(20px, 3vw, 36px) 0 clamp(36px, 5vw, 64px);
  font-family: var(--display); font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 5.25rem); line-height: 0.92;
  letter-spacing: -0.01em;
}
.roster a {
  text-decoration: none;
  transition: color 120ms ease-out;
}
.roster li:not(:last-child)::after { content: " /"; font-weight: 500; opacity: 0.35; }
.roster a:hover, .roster a:focus-visible { color: var(--white); }
.roster a:focus-visible { outline-color: var(--white); }

.hero-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  padding-top: 24px; border-top: 2px solid var(--ink);
}
.hero-foot p { max-width: 52ch; font-size: 1.125rem; }

.button {
  display: inline-block; padding: 14px 22px;
  background: var(--ink); color: var(--white);
  font-weight: 700; text-decoration: none; border-radius: 999px;
}
.button:hover { background: var(--white); color: var(--ink); }

/* Screenshot that follows the pointer over the roster. */
.peek {
  position: fixed; left: 0; top: 0; z-index: 5; margin: 0;
  width: 288px; pointer-events: none;
  border: 3px solid var(--ink); border-radius: 6px; overflow: hidden;
  box-shadow: 10px 10px 0 var(--ink);
  opacity: 0; transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(0.96);
  transition: opacity 140ms ease-out, transform 140ms ease-out;
}
.peek.is-on { opacity: 1; transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(1); }
@media (hover: none) { .peek { display: none; } }

/* Load sequence: the domains appear one after another, once. */
@media (prefers-reduced-motion: no-preference) {
  .js .roster li { opacity: 0; transform: translateY(0.18em); animation: rise 420ms cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i) * 55ms + 120ms); }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* Sections */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--white { background: var(--white); }

.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head h2 { font-size: clamp(2.75rem, 6vw, 5rem); }
.section-head p { max-width: 46ch; color: var(--slate); font-size: 1.125rem; }

/* Network */

.family { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px 48px; padding: 32px 0; border-top: 2px solid var(--ink); }
.family h3 { font-size: 1.75rem; font-weight: 700; line-height: 1.05; }

.sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 28px 40px; }
.sites li { display: grid; grid-template-columns: 144px minmax(0, 1fr); gap: 16px; align-items: start; }
.sites img { border-radius: 4px; border: 1px solid var(--line); }
.sites a {
  font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1;
  text-decoration: none;
}
.sites a:hover { color: #1f6fc4; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.sites p { margin-top: 6px; color: var(--slate); font-size: 0.975rem; line-height: 1.45; }

/* Audience */

.figures { margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.figures div { padding: 24px 24px 0 0; }
.figures div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.figures dt { font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 6vw, 5.25rem); line-height: 0.9; color: var(--ink); }
.figures div:first-child dt { color: #1f6fc4; }
.figures dd { margin: 12px 0 0; color: var(--slate); max-width: 20ch; }

/* Ad formats */

.formats { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }

.format-list { display: grid; border-top: 2px solid var(--ink); }
.format-list button {
  display: grid; gap: 4px; text-align: left;
  padding: 16px 16px 16px 20px; margin: 0;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  border-left: 4px solid transparent;
  font: inherit; color: var(--ink); cursor: pointer;
}
.format-list strong { font-family: var(--display); font-size: 1.6rem; font-weight: 700; line-height: 1.05; }
.format-list span { color: var(--slate); font-size: 0.975rem; line-height: 1.45; }
.format-list button:hover { background: var(--white); }
.format-list button[aria-selected="true"] { background: var(--white); border-left-color: var(--blue); }
.format-list button:focus-visible { outline-offset: -3px; }

.mock {
  position: sticky; top: 24px;
  aspect-ratio: 4 / 3.9;
  border: 2px solid var(--ink); border-radius: 10px; overflow: hidden;
  background: var(--white);
}
.mock::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 22px; z-index: 2;
  background: var(--ink);
}
.mock-skin { position: absolute; inset: 22px 0 0; background: var(--mist); }
.mock-page { position: absolute; inset: 22px 9% 0; background: var(--white); padding: 4% 4% 0; display: grid; grid-template-rows: auto 1fr; gap: 4%; border-inline: 1px solid var(--line); }
.mock-banner { height: 0; padding-bottom: 12%; border-radius: 3px; }
.mock-grid { display: grid; grid-template-columns: 1fr 32%; gap: 5%; min-height: 0; }
.mock-main, .mock-side { display: grid; align-content: start; gap: 8%; min-height: 0; }
.mock-side { gap: 6%; }
.mock-video { position: relative; aspect-ratio: 16 / 9; border-radius: 3px; }
.mock-play { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-35%, -50%); border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--white); }
.mock-bar { position: absolute; left: 6%; right: 6%; bottom: 8%; height: 3px; background: rgba(255,255,255,.6); border-radius: 2px; }
.mock-lines { display: grid; gap: 6px; }
.mock-lines i { display: block; height: 7px; border-radius: 4px; background: var(--line); }
.mock-lines i:last-child { width: 60%; }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6%; }
.mock-card { aspect-ratio: 4 / 3; border-radius: 3px; }
.mock-mpu { aspect-ratio: 300 / 250; border-radius: 3px; }
.mock-halfpage { aspect-ratio: 300 / 600; border-radius: 3px; }

.mock-banner, .mock-video, .mock-card, .mock-mpu, .mock-halfpage { background: var(--line); }
.mock [data-zone] { transition: background-color 180ms ease-out, box-shadow 180ms ease-out; }

.mock[data-active="skin"] .mock-skin,
.mock[data-active="banner"] .mock-banner,
.mock[data-active="roll"] .mock-video,
.mock[data-active="story"] .mock-story,
.mock[data-active="mpu"] .mock-mpu,
.mock[data-active="halfpage"] .mock-halfpage { background: var(--blue); box-shadow: 0 0 0 3px var(--ink); }
.mock[data-active="skin"] .mock-skin { box-shadow: none; }
.mock-video { background-color: #9fb0c4; }
.mock[data-active="roll"] .mock-video { background: var(--blue); }

.formats-note { margin-top: 40px; max-width: 60ch; color: var(--slate); }
.formats-note a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }

/* Partners */

.partners { padding: clamp(48px, 7vw, 88px) 0; }
.partners h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; margin-bottom: 28px; }
.logos { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px 16px; }
.logos img { width: 100%; max-width: 150px; margin: 0 auto; }

/* Contact */

.contact { background: var(--ink); color: var(--white); padding: clamp(64px, 9vw, 120px) 0 32px; }
.contact h2 { font-size: clamp(2.25rem, 5vw, 4rem); font-weight: 700; color: var(--blue); }
.contact-mail {
  display: inline-block; margin: 16px 0 56px;
  font-family: var(--display); font-weight: 900; font-size: clamp(2.5rem, 9vw, 8rem); line-height: 1;
  text-decoration: none; overflow-wrap: anywhere;
}
.contact-mail:hover { color: var(--blue); }
.contact :focus-visible { outline-color: var(--blue); }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.25); }
.contact-grid a { text-underline-offset: 3px; }
.social { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legal { margin-top: 56px; color: #9fb0c4; font-size: 0.875rem; }

/* Responsive */

@media (max-width: 1000px) {
  .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .figures div:nth-child(4) { padding-left: 0; border-left: 0; }
  .logos { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .formats { grid-template-columns: 1fr; }
  .mock { position: relative; top: 0; max-width: 560px; order: -1; }
  .family { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav ul li:not(:last-child) { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures div, .figures div + div { padding: 20px 16px 0 0; border-left: 0; }
  .figures div:first-child { grid-column: 1 / -1; }
  .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; }
  .sites li { grid-template-columns: 112px minmax(0, 1fr); }
  .sites a { font-size: 1.4rem; }
}
