/* ==========================================================================
   components.css  -  REUSABLE PIECES (TEMPLATE)
   Small building blocks used in many sections: section wrapper, headings,
   buttons, grid helpers, section colours and the scroll animations.
   ========================================================================== */

/* WRAP: the centred box that holds the content of every section (max 1320px wide). */
.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 112px) clamp(16px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 44px;
}
/* HEAD: row with the small label on the left and the big heading on the right. */
.head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  align-items: baseline;
}
/* KICK: the small label above a heading (e.g. "01 · THE PROBLEM") with a blue square before it. */
.kick {
  flex: 0 0 220px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 12px var(--font-mono);
  color: var(--label-color, var(--text-body));
}
/* The small blue square before the label text. */
.kick::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--brand-blue);
}
/* Style of every big section heading (h2). */
h2 {
  flex: 1 1 640px;
  font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -.05em;
  text-wrap: balance;
}
/* Part of a heading shown in a softer colour. */
h2 .dim { color: var(--dim-color, var(--text-muted)); }
/* Highlighted (italic) words inside a heading. */
h2 em { letter-spacing: -.02em; color: var(--highlight-color, var(--brand-blue-dark)); white-space: nowrap; }

/* OFFSET: pushes text to the right so it lines up under the heading (on big screens only). */
.offset {
  margin-left: 260px;
  max-width: 760px;
}
/* On screens smaller than 1000px, remove that push. */
@media (max-width: 1000px) { .offset { margin-left: 0; } }

/* BUTTON: the main blue button (for example "Join the waitlist"). */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 22px;
  background: var(--brand-blue);
  color: #fff;
  font: 13px var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all 0.2s ease;
}
/* When the mouse is over the button: slightly darker, lifts up 1px, soft shadow. */
.btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(10, 91, 255, 0.25);
}
/* The small square drawn at the end of the button text. */
.btn::after {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
}
/* GRADIENT BORDER: an outline that uses the same blue gradient as the "Join waitlist" button,
   but with NO fill inside. It is drawn by a ::before layer that is cut out in the middle
   (the mask), so it works with round corners and a see-through inside.
   Used by: the menu links, the .link buttons, and the problem cards.
   --bw is the border width (default 1.5px). */
.menu a, .link, .card { position: relative; }
.menu a::before, .link::before, .card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: var(--bw, 1.5px);
  border-radius: inherit;
  background: var(--brand-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* LINK: the second button beside a main button (for example "See how it works").
   Same pill shape and height as .btn, but outlined instead of filled. */
.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  font: 13px var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand-blue);
  border-radius: 999px;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
/* On hover: a very light blue fill, and it lifts 2px like the main button. */
.link:hover { opacity: 1; background: var(--brand-tint); transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(10, 91, 255, .45); }

/* ROW: items side by side that wrap to the next line on small screens. */
.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; }
/* GRID: a grid with a 1px gap. The gap shows the background colour, which makes thin lines between boxes. */
.grid { display: grid; gap: 1px; }
/* LABEL: tiny capital letters for small captions. */
.label { font: 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-small); }

/* SECTION THEME "dark": plain white background (the name is old; the colour is now white). */
.dark { background: var(--page-bg); color: var(--text-main); }
/* SECTION THEME "paper": light grey background, used for alternating sections. */
.paper { background: var(--section-bg); color: var(--text-main); --label-color: var(--text-small); --dim-color: var(--text-body); --highlight-color: var(--text-main); }

/* SCROLL ANIMATIONS (modern browsers only): .rv items fade in as they scroll into view; .prog is the progress bar at the bottom that grows while scrolling. */
@supports (animation-timeline: view()) {
  .rv { animation: rv linear both; animation-timeline: view(); animation-range: entry 0% entry 75%; }
  .prog { animation: grow linear both; animation-timeline: scroll(root); }
}
/* Animation: fade in while moving up 32px. */
@keyframes rv { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
/* Animation: a bar grows from 0 to full width. */
@keyframes grow { to { transform: scaleX(1); } }
/* Animation: twinkle (fade softly in and out). Used by the hero letters. */
@keyframes tw { 0%, 100% { opacity: .10; } 50% { opacity: .28; } }
/* Animation: slide to the left by half the width. Used by the moving phrase ribbon. */
@keyframes mq { to { transform: translateX(-50%); } }

/* PAGE BACKGROUND: every section uses the same soft sky-blue gradient as the hero.
   Sections take turns: blue-to-white, then white-to-blue, so one section flows into the next
   with no hard edge. Left alone on purpose: the slim ribbon (white strip), the Safety section
   (its own amber stripes) and the dark waitlist section. */
main > section:not(#ribbon):not(#safety):not(#cta) { background: var(--hero-gradient); }
main > section:nth-of-type(even):not(#ribbon):not(#safety):not(#cta) { background: var(--hero-gradient-up); }
footer.site { background: var(--hero-gradient); }

/* no hairline gap between sections */

main > section + section { margin-top: -1px; }
