/* ==========================================================================
   Madhoo Works — reset, shell, typography, accessibility
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--pink-100);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--body);
  line-height: 1.5;
  background: var(--pink-100);
  color: var(--pink-40);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

/* ---------- skip link ---------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -160%);
  z-index: 999;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--nav-cta-bg);
  color: var(--nav-cta-text);
  border-radius: 0 0 var(--radius-pill) var(--radius-pill);
  transition: transform 0.22s var(--ease-custom);
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline: 3px solid var(--nav-text);
  outline-offset: 2px;
}

/* ---------- focus -------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--focus-color, var(--pink-40));
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Theme section
   ========================================================================== */

.theme-section {
  position: relative;
  isolation: isolate;
  background: var(--section-bg);
  color: var(--text-body);
  padding-block: var(--section-space);
  overflow: clip;
}

.theme-section--flush {
  padding-block: 0;
}

.theme-section--tall {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* the light panel that lifts over the preceding dark field, as in the video */
.theme-section--lifted {
  border-start-start-radius: var(--radius-panel);
  border-start-end-radius: var(--radius-panel);
  margin-top: calc(var(--radius-panel) * -1);
}

.shell {
  width: min(var(--shell), 100% - (var(--gutter) * 2));
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.shell--narrow {
  width: min(880px, 100% - (var(--gutter) * 2));
}

/* ==========================================================================
   Typography primitives
   ========================================================================== */

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-label);
  margin-bottom: clamp(1.1rem, 2.4vw, 2.2rem);
}

.display-hero {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--display-hero);
  line-height: 0.9;
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text-display);
  text-wrap: balance;
}

.display-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--display-section);
  line-height: 0.94;
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text-display);
}

.display-statement {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--display-statement);
  line-height: 1;
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text-display);
}

.heading-card {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--heading-card);
  line-height: 1.02;
  letter-spacing: var(--letter-spacing-mid);
  color: var(--text-display);
}

.body-copy {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--body);
  line-height: 1.5;
  color: var(--text-body);
  max-width: 62ch;
}

.body-lg {
  font-size: var(--body-lg);
  line-height: 1.4;
  max-width: 46ch;
}

.body-copy--center {
  margin-inline: auto;
  text-align: center;
}

.text-accent {
  color: var(--text-emphasis);
}

.mono-note {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-label);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Scroll-driven text fill
   The reference fills large statements character by character from the
   section's secondary colour into its display colour. Both endpoints are
   supplied palette tokens and each character snaps between the two — no
   gradient, no interpolation, no blend mode.
   ========================================================================== */

.fill-text .fill-char {
  color: var(--text-fill-from);
  transition: color 0.18s linear;
}

.fill-text .fill-char.is-filled {
  color: var(--text-display);
}

/* before the splitter runs, and whenever JS is unavailable */
.fill-text:not(.is-split) {
  color: var(--text-display);
}

/* ==========================================================================
   Reveal-on-scroll primitive
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 0.62s var(--ease-custom), transform 0.62s var(--ease-custom);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* no-JS safety: never leave content invisible */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Anchor offset so headings never land under the floating navigation
   ========================================================================== */

[id] {
  scroll-margin-top: var(--anchor-offset);
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .fill-text .fill-char,
  .fill-text .fill-char.is-filled {
    color: var(--text-display);
  }
}
