/* Benchmark challenges on Next — marketing walkthrough. Styled after the Next platform (next.eyra.co). */

:root {
  --primary: #4272ef;
  --primary-dark: #2f5fd9;
  --primary-light: #e3eafd;
  --secondary: #ff5e5e;
  --tertiary: #ffcf60;
  --success: #52ba12;
  --grey1: #222222;
  --grey2: #999999;
  --grey3: #cccccc;
  --grey4: #eeeeee;
  --grey5: #f6f6f6;
  --white: #ffffff;
  --shadow: 0 5px 20px 0 rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 24px 60px -12px rgba(20, 40, 100, 0.28);
  --font-title: "Nunito", sans-serif;
  --font-body: "Nunito Sans", sans-serif;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--grey1);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3, h4 { font-family: var(--font-title); margin: 0; color: inherit; }

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

/* ---------- Top bar ---------- */

.topbar { background: var(--grey5); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.topbar img { width: 120px; }
.topbar nav a {
  margin-left: 28px;
  color: var(--grey1);
  text-decoration: none;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
}
.topbar nav a:hover { color: var(--primary); }

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

.btn {
  display: inline-block;
  padding: 15px 24px;
  border-radius: 4px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 18px;
  line-height: 18px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: var(--primary); color: var(--white); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.light { background: var(--white); color: var(--primary); }
.btn.ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn.outline { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }

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

.hero {
  position: relative;
  overflow: hidden;
  background: var(--primary);
  color: var(--white);
  padding: 72px 0 0;
}
.hero .shapes { position: absolute; right: 0; top: 0; width: 560px; max-width: 50%; height: 260px; opacity: 0.9; }
.hero .wrap { position: relative; }
.hero .eyebrow {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
}
.hero h1 {
  margin: 20px 0 16px;
  max-width: 720px;
  font-weight: 900;
  font-size: 60px;
  line-height: 64px;
}
.hero .lead { max-width: 640px; margin: 0 0 32px; font-size: 21px; line-height: 1.55; opacity: 0.96; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero .stage { position: relative; margin-top: 56px; padding-bottom: 0; }
.hero .stage .browser { width: 86%; margin-bottom: -6px; }
.hero .stage .browser.front { position: absolute; right: 0; bottom: 32px; width: 42%; margin: 0; }

.facts { background: var(--grey5); }
.facts ul {
  list-style: none;
  margin: 0;
  padding: 36px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.facts li { display: flex; gap: 14px; align-items: flex-start; font-size: 17px; line-height: 1.5; }
.facts li strong { display: block; font-family: var(--font-title); font-weight: 800; font-size: 18px; }
.facts .icon {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
}
.facts .icon svg { width: 20px; height: 20px; }

/* ---------- Frames ---------- */

.browser {
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}
.browser .chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  background: var(--grey4);
}
.browser .chrome i { width: 11px; height: 11px; border-radius: 50%; background: var(--grey3); }
.browser .chrome i:nth-child(1) { background: #ff5f57; }
.browser .chrome i:nth-child(2) { background: #febc2e; }
.browser .chrome i:nth-child(3) { background: #28c840; }
.browser .chrome span {
  flex: 1;
  max-width: 340px;
  margin: 0 auto;
  padding: 3px 12px;
  border-radius: 6px;
  background: var(--white);
  color: var(--grey2);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}


/* ---------- Scenes ---------- */

.scene { padding: 104px 0; }
.scene.alt { background: var(--grey5); }
.scene .grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.scene.flip .grid { grid-template-columns: 7fr 5fr; }
.scene.flip .text { order: 2; }

.step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--primary);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
}
.step b {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 15px;
}
.scene h2 { font-weight: 900; font-size: 42px; line-height: 46px; margin-bottom: 18px; }
.scene p { margin: 0 0 14px; font-size: 19px; line-height: 1.6; }
.scene .text p:last-child, .scene .center p:last-child { margin-bottom: 0; }
.muted { color: #666; }


.browsers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 48px auto 0; }
.browsers .browser .chrome { height: 26px; }
.browsers .browser .chrome span { display: none; }
.browsers figure { margin: 0; }
.browsers figcaption { margin-top: 18px; text-align: center; font-size: 17px; line-height: 1.45; }
.browsers figcaption strong { display: block; font-family: var(--font-title); font-weight: 800; font-size: 19px; }
.center { text-align: center; max-width: 760px; margin: 0 auto; }

/* ---------- What is a benchmark challenge ---------- */

.step.plain { padding: 4px 12px; border-radius: 999px; background: var(--primary-light); }
.intro + .scene { border-top: 1px solid var(--grey4); }
.concepts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 48px; }
.concept {
  padding: 24px 26px;
  border-radius: 8px;
  background: var(--grey5);
}
.concept .icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
}
.concept .icon svg { width: 22px; height: 22px; }
.concept.hidden .icon { background: var(--grey1); color: var(--white); }
.concept h4 { font-weight: 800; font-size: 19px; line-height: 23px; margin-bottom: 6px; }
.scene .concept p { margin: 0; font-size: 16px; line-height: 1.5; color: #555; }

/* ---------- Example: PreFer ---------- */

.example {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: center;
  padding: 40px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.example ul { margin: 18px 0 0; padding: 0; list-style: none; }
.example li { margin: 0 0 10px; padding-left: 26px; position: relative; font-size: 17px; line-height: 1.5; }
.example li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 9px; height: 9px; border-radius: 2px; background: var(--secondary); }
.example .links { display: flex; flex-direction: column; gap: 12px; }
.example .links a {
  display: block;
  padding: 16px 20px;
  border-radius: 6px;
  background: var(--grey5);
  color: var(--grey1);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
}
.example .links a strong { display: block; color: var(--primary); font-family: var(--font-title); font-weight: 800; font-size: 17px; }
.example .links a:hover { background: var(--primary-light); }

/* ---------- Template repository ---------- */

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 48px 0 56px;
  counter-reset: pipe;
}
.pipeline li {
  list-style: none;
  position: relative;
  padding: 0 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pipeline li + li::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 30px;
  width: 28px;
  height: 2px;
  background: var(--grey3);
}
.pipeline li + li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 25px;
  border: 6px solid transparent;
  border-left-color: var(--grey3);
}
.pipeline .dot {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow);
}
.pipeline .dot svg { width: 28px; height: 28px; }
.pipeline li.key .dot { background: var(--primary); color: var(--white); }
.pipeline h4 { font-weight: 800; font-size: 19px; line-height: 23px; margin-bottom: 6px; }
.pipeline p { margin: 0 0 10px; font-size: 16px; line-height: 1.5; color: #555; }
.pipeline .device {
  display: inline-block;
  margin-top: auto;
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
}
.pipeline .device.size { background: var(--grey4); color: #555; }

.routes-title { text-align: center; font-weight: 900; font-size: 28px; line-height: 32px; margin-bottom: 8px; }
.scene .routes-sub { text-align: center; margin: 0 auto 32px; max-width: 680px; font-size: 18px; }
.routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.route {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.route .tag {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 14px;
}
.route .tag.blue { background: var(--primary-light); color: var(--primary); }
.route .tag.green { background: #e6f6dc; color: #3b8a0c; }
.route .tag.grey { background: var(--grey4); color: #666; }
.route h3 { font-weight: 800; font-size: 22px; line-height: 26px; margin-bottom: 10px; }
.route p { font-size: 17px; line-height: 1.55; margin: 0; }
.route.featured { box-shadow: 0 0 0 2px var(--primary), var(--shadow); }
.scene .routes-more { text-align: center; margin: 40px 0 0; }

/* ---------- CTA ---------- */

.cta {
  position: relative;
  overflow: hidden;
  background: var(--primary);
  color: var(--white);
  padding: 96px 0;
  text-align: center;
}
.cta h2 { font-weight: 900; font-size: 44px; line-height: 48px; margin-bottom: 14px; }
.cta p { margin: 0 auto 32px; max-width: 620px; font-size: 20px; opacity: 0.95; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta .shapes { position: absolute; left: -40px; bottom: -20px; width: 300px; opacity: 0.5; }

.footer { padding: 28px 0; text-align: center; font-size: 15px; color: var(--grey2); background: var(--grey5); }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .wrap { padding: 0 16px; }
  .topbar nav a:not(.btn) { display: none; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 40px; line-height: 44px; }
  .hero .lead { font-size: 19px; }
  .hero .shapes { opacity: 0.3; }
  .hero .stage .browser { width: 100%; }
  .hero .stage .browser.front { display: none; }
  .facts ul { grid-template-columns: 1fr; gap: 18px; padding: 28px 0; }
  .scene { padding: 64px 0; }
  .scene .grid, .scene.flip .grid { grid-template-columns: 1fr; gap: 36px; }
  .scene.flip .text { order: 0; }
  .scene h2 { font-size: 32px; line-height: 36px; }
  .browsers { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .concepts { grid-template-columns: 1fr 1fr; gap: 16px; }
  .example { grid-template-columns: 1fr; gap: 28px; padding: 28px 22px; }
  .pipeline { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .pipeline li + li::before, .pipeline li + li::after { display: none; }
  .routes { grid-template-columns: 1fr; }
  .cta { padding: 64px 0; }
  .cta .shapes { display: none; }
  .cta h2 { font-size: 32px; line-height: 36px; }
}
@media (max-width: 520px) {
  .concepts { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .browser .chrome span { display: none; }
}
