/* ============================================
   Make Your Mark: Stylesheet
   ============================================ */

/* ----- Reset (minimal modern) ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: var(--topbar-height); }
body {
  font-family: var(--font-body);
  color: var(--color-fg);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video, canvas { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ----- Brand tokens (from MASTER §3 / §4) ----- */
:root {
  /* Raw brand colours */
  --pro-charcoal: #373D40;
  --pro-charcoal-75: #5F6467;
  --pro-charcoal-50: #9B9E9F;
  --pro-charcoal-25: #CDCFD0;
  --pro-cream: #ECE7DC;
  --pro-cream-75: #F1EDE5;
  --pro-cream-50: #F5F3EE;
  --pro-cream-25: #FAF9F6;
  --pro-ruby: #FF4753;
  --pro-ruby-75: #FF7A82;
  --pro-ruby-50: #FFA3A9;
  --pro-ruby-25: #FFD1D4;
  --pro-ruby-shade: #E63E48; /* ~92% lightness of ruby: used for hover/active accent surfaces */
  --pro-white: #FFFFFF;
  /* Full neutral scale per MASTER §3.3 */
  --pro-neutral-0: #FFFFFF;
  --pro-neutral-100: #F2F0EB;
  --pro-neutral-200: #E4E4E2;
  --pro-neutral-400: #9B9E9F;
  --pro-neutral-600: #5F6467;
  --pro-neutral-800: #373D40;
  --pro-neutral-900: #1F2326;

  /* Semantic tokens (use these in components) */
  --color-bg: var(--pro-cream);
  --color-bg-elevated: var(--pro-white);
  --color-bg-subtle: var(--pro-cream-25);
  --color-bg-dark: var(--pro-charcoal);
  --color-fg: var(--pro-charcoal);
  --color-fg-muted: var(--pro-charcoal-75);
  --color-fg-subtle: var(--pro-charcoal-50);
  --color-fg-on-dark: var(--pro-white);
  --color-fg-on-dark-muted: rgba(255, 255, 255, 0.8);
  --color-border: var(--pro-neutral-200);
  --color-border-strong: var(--pro-charcoal-25);
  --color-accent: var(--pro-ruby);
  --color-accent-hover: var(--pro-ruby-shade);
  --color-on-accent: var(--pro-white); /* per MASTER §10: accent buttons use white text on Ruby */

  /* Typography */
  --font-heading: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows / elevation */
  --elev-1: 0 1px 2px rgba(31, 35, 38, 0.06), 0 1px 3px rgba(31, 35, 38, 0.05);
  --elev-2: 0 4px 8px rgba(31, 35, 38, 0.08), 0 2px 4px rgba(31, 35, 38, 0.06);
  --elev-3: 0 8px 24px rgba(31, 35, 38, 0.12);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-medium: 280ms;
  --duration-slow: 400ms;

  /* Layout */
  --container-max: 1360px;
  --section-padding-y: clamp(56px, 8vw, 96px);
  --section-padding-x: clamp(24px, 5vw, 64px);

  /* Top bar */
  --topbar-height: 64px;
}

/* ----- @font-face: self-hosted ----- */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/SourceSerif4-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/SourceSerif4-MediumItalic.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Poppins-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/Poppins-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Poppins-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Poppins-Bold.woff2') format('woff2');
}

/* ----- Typography primitives ----- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-fg);
  display: inline-block;
}
.eyebrow--on-dark { color: var(--color-accent); }

h1, h2, h3, .display, .heading {
  font-family: var(--font-heading);
  font-weight: 500; /* MASTER §4.3.3: Source Serif 4 ALWAYS weight 500 */
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--color-fg);
}
h1 { font-size: clamp(36px, 6vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 56px); }
h3 { font-size: clamp(22px, 3vw, 36px); }
h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.25;
}

/* The italic ruby rule (MASTER §4.3) */
em.ruby, .ruby-italic {
  font-style: italic;
  color: var(--color-accent);
}

/* Body */
p { margin: 0 0 1em; }
.body-lg { font-size: 18px; line-height: 1.6; }
.body { font-size: 16px; line-height: 1.6; }
.body-sm { font-size: 14px; line-height: 1.6; }

/* ----- Layout primitives ----- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--section-padding-x);
  padding-right: var(--section-padding-x);
}
.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
}
.section--cream { background: var(--color-bg); }
.section--cream-25 { background: var(--color-bg-subtle); }
.section--charcoal {
  background: var(--color-bg-dark);
  color: var(--color-fg-on-dark);
}
.section--charcoal h1, .section--charcoal h2, .section--charcoal h3 { color: var(--color-fg-on-dark); }
.section--charcoal .eyebrow { color: var(--color-accent); }

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--color-fg);
  color: var(--color-fg-on-dark);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

/* Reduced motion: kill transitions/animations globally */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   Topbar
   ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-height);
  background: var(--color-bg-dark); /* full charcoal at all times */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
  height: 100%;
}
.topbar__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
}
.topbar__logo {
  height: 28px;
  width: auto;
  display: block;
}

@media (max-width: 640px) {
  .topbar__logo { height: 24px; }
}

/* Topbar nav: canonical Pros nav-item, dark-surface variant (MASTER nav convention) */
.topbar__nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.pros-nav-item {
  font-family: var(--font-body);        /* Poppins */
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  padding: 8px 4px 10px;
  position: relative;
  transition: color 160ms ease;
}
.pros-nav-item::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 2px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms ease;
}
.pros-nav-item:hover,
.pros-nav-item:focus-visible,
.pros-nav-item.is-active { color: #fff; }
.pros-nav-item.is-active::after { transform: scaleX(1); }

@media (max-width: 768px) {
  /* Mobile keeps the progress bar + side rail; links would crowd the 64px bar */
  .topbar__nav { display: none; }
  .topbar__inner { justify-content: center; }
}

/* ============================================
   Buttons (used here + in Section 5)
   ============================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  height: 36px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  min-height: 44px; /* WCAG touch target: visually 36 with vertical padding */
  min-width: 44px;
}
.button--secondary {
  background: transparent;
  color: var(--color-fg);
  border-color: var(--color-fg);
}
/* When the secondary button sits on a dark surface (topbar), flip its colours */
.topbar .button--secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.topbar .button--secondary:hover,
.topbar .button--secondary:focus-visible {
  background: #fff;
  color: var(--color-fg);
  border-color: #fff;
}
.button--secondary:hover,
.button--secondary:focus-visible {
  background: var(--color-fg);
  color: var(--color-fg-on-dark);
}
.button--accent {
  background: var(--color-accent);
  color: var(--color-on-accent);
  height: 52px;
  padding: 0 var(--space-6);
  font-size: 15px;
  font-weight: 600;
}
.button--accent:hover,
.button--accent:focus-visible {
  background: var(--color-accent-hover);
}

/* ============================================
   Side-rail navigation (right rail): desktop only
   Pattern from professionals-bd-wireframe; uses --color-accent (Ruby).
   ============================================ */
.side-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transition: opacity 400ms var(--ease-out);
  pointer-events: none;
}
@media (min-width: 1024px) {
  .side-nav { display: flex; }
}
.side-nav.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.side-nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background var(--duration-medium) var(--ease-out),
              transform var(--duration-medium) var(--ease-out),
              box-shadow var(--duration-medium) var(--ease-out),
              border-color var(--duration-medium) var(--ease-out);
  position: relative;
  display: block;
  text-decoration: none;
}
.side-nav-dot:hover,
.side-nav-dot:focus-visible {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.3);
  outline: none;
}
.side-nav-dot.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 8px rgba(255, 71, 83, 0.4);
  transform: scale(1.2);
}
.side-nav-dot .dot-label {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
  background: rgba(42, 47, 50, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 4px;
}
.side-nav-dot:hover .dot-label,
.side-nav-dot:focus-visible .dot-label {
  opacity: 1;
}

/* ============================================
   Mobile / tablet progress bar (under topbar)
   ============================================ */
.section-progress {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  z-index: 39;
  pointer-events: none;
}
.section-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  transition: width 100ms linear;
}
@media (min-width: 1024px) {
  .section-progress { display: none; }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 600px;
  height: 90vh;
  width: 100%;
  overflow: hidden;
  color: var(--color-fg-on-dark);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Photo at full visibility: let it breathe. */
  opacity: 1;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Soft left-side wash + subtle bottom darkening: only just enough
     to keep white text legible where it sits, otherwise the photo
     reads in full. */
  background:
    linear-gradient(90deg, rgba(31,35,38,0.45) 0%, rgba(31,35,38,0.10) 55%, rgba(31,35,38,0) 100%),
    linear-gradient(180deg, rgba(31,35,38,0) 50%, rgba(31,35,38,0.20) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: 0 clamp(24px, 4vw, 64px);
  max-width: 1360px;
  margin: 0 auto;
  /* Ensure first paint doesn't FOUC during font load */
  opacity: 0;
  animation: hero-rise 700ms var(--ease-out) 200ms both;
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .eyebrow {
  margin-bottom: var(--space-4);
}
.hero__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(56px, 8vw, 120px);
  line-height: 0.92;
  margin: 0 0 var(--space-5);
  color: var(--color-fg-on-dark);
}
.hero__subhead {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: var(--color-fg-on-dark);
  opacity: 0.92;
  margin: 0;
  max-width: 680px;
}

@media (prefers-reduced-motion: reduce) {
  .hero__content { animation: none; opacity: 1; }
}

/* Mobile hero tweaks: shift photo focus to the right and lay a darker
   overlay over the photo so the headline + subhead read cleanly. */
@media (max-width: 640px) {
  .hero__media img { object-position: 80% center; }
  .hero__overlay {
    background:
      linear-gradient(180deg, rgba(31,35,38,0.45), rgba(31,35,38,0.45)),
      linear-gradient(90deg, rgba(31,35,38,0.35) 0%, rgba(31,35,38,0) 70%),
      linear-gradient(180deg, rgba(31,35,38,0) 50%, rgba(31,35,38,0.35) 100%);
  }
  .hero__title { font-size: clamp(72px, 16vw, 110px); }
}

/* ============================================
   Section 1 · The Opening Frame
   ============================================ */
.container--narrow {
  max-width: 720px;
}
.container--mid {
  max-width: 960px;
}
.section__divider {
  display: block;
  width: 80px;
  height: 1px;
  margin: 0 0 var(--space-6);
  background: var(--color-fg);
  opacity: 0.15;
}
.section__title {
  margin: var(--space-2) 0 var(--space-8);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}
.section__body p {
  margin: 0 0 var(--space-6);
  color: var(--color-fg);
}
/* ============================================
   Competition panel (under hero): editorial split
   ============================================ */
.comp-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  margin-bottom: var(--space-12);
}
.comp-subhead {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  margin: 0 0 var(--space-5);
}
.comp-social {
  padding-top: var(--space-4);
}
.comp-social img {
  width: 100%;
  height: auto;
}
.comp-steps {
  list-style: none;
  margin: var(--space-8) 0 0;
  padding: 0;
}
.comp-step {
  display: grid;
  grid-template-columns: 72px minmax(0, 220px) minmax(0, 1fr);
  gap: var(--space-6);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-border-strong);
}
.comp-step:last-child { border-bottom: 1px solid var(--color-border-strong); }
.comp-step__num {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  font-size: 32px;
  color: var(--color-accent);
  margin: 0;
  line-height: 1;
}
.comp-step__title {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
}
.comp-step__copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-fg-muted);
  overflow-wrap: anywhere; /* long email address must not stretch the column */
}
/* Prize ticker strip: transform-only marquee above the band. The global
   prefers-reduced-motion rule freezes it for those users. */
.comp-ticker {
  overflow: hidden;
  user-select: none;
  background: var(--pro-neutral-900);
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.comp-ticker__track {
  display: flex;
  width: max-content;
  animation: comp-ticker-scroll 22s linear infinite;
}
.comp-ticker__seq {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.comp-ticker__seq span {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  padding: 0 22px;
  white-space: nowrap;
}
.comp-ticker__seq i {
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.35);
}
@keyframes comp-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.comp-band {
  background: var(--color-bg-dark);
  color: var(--color-fg-on-dark);
  padding: clamp(28px, 3.4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-8);
  align-items: center;
}
.comp-band__title {
  color: var(--color-fg-on-dark);
  font-size: clamp(24px, 2.6vw, 32px);
  margin: 0 0 var(--space-2);
}
.comp-band__copy {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}
.comp-deliverables {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin: var(--space-3) 0 0;
}
.comp-deliverables li {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.comp-deliverables li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  display: inline-block;
}
.comp-band__dates {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin: var(--space-3) 0 0;
}
@media (max-width: 900px) {
  .comp-grid, .comp-band { grid-template-columns: 1fr; }
  .comp-step { grid-template-columns: 56px minmax(0, 1fr); }
  .comp-step__copy { grid-column: 2; }
  .comp-social { max-width: 480px; margin: 0 auto; }
}
/* Charcoal-surface variant of the comp panel (white text per dark-bg rules;
   prize band steps down to neutral-900 to stay a distinct block) */
.section--charcoal .comp-subhead { color: var(--color-fg-on-dark); }
.section--charcoal .comp-grid .body { color: rgba(255, 255, 255, 0.85); }
.section--charcoal .comp-step { border-top-color: rgba(255, 255, 255, 0.22); }
.section--charcoal .comp-step:last-child { border-bottom-color: rgba(255, 255, 255, 0.22); }
.section--charcoal .comp-step__title { color: var(--color-fg-on-dark); }
.section--charcoal .comp-step__copy { color: rgba(255, 255, 255, 0.78); }
.section--charcoal .comp-band { background: var(--pro-neutral-900); }

.section-frame {
  /* Generous top space gives the opening section room to breathe; the
     hero is now a clean rectangle (slash crop removed Round 1, Step 3). */
  padding-top: clamp(72px, 10vw, 120px);
}

/* ============================================
   Section 2 · The Occasions: masonry grid + click-to-expand modal
   ============================================ */
.section-occasions {
  /* Section keeps the full-bleed Charcoal background; inner blocks below
     handle their own max-width + horizontal padding. */
  padding: clamp(72px, 9vw, 120px) 0;
}
.section-occasions__header,
.section-occasions > .occasions-grid {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(24px, 4vw, 64px);
  padding-right: clamp(24px, 4vw, 64px);
}
.section-occasions__header {
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section-occasions__header > * {
  max-width: 720px;
}
.section-occasions__header .eyebrow {
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.section-occasions__header .section__title {
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.05;
  margin: 0 0 var(--space-6);
  color: var(--color-fg-on-dark);
}
.section-occasions__intro {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 720px;
}
.section-occasions__cta-hint {
  display: inline-block;
  margin-left: var(--space-2);
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--color-accent);
}

/* Masonry grid (4 cols × explicit row spans) */
.occasions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 218px;
  gap: 14px;
}

.pin {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--pro-charcoal-75);
  cursor: pointer;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
  border: none;
  padding: 0;
  color: inherit;
  text-align: left;
  font: inherit;
  display: block;
  width: 100%;
}
.pin:hover,
.pin:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  outline: none;
}
.pin:focus-visible {
  box-shadow: 0 0 0 2px var(--color-accent), 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Explicit grid placement matches the approved Option A mockup */
.pin--01 { grid-column: 1 / 3; grid-row: 1 / 4; }
.pin--02 { grid-column: 3 / 5; grid-row: 1 / 3; }
.pin--03 { grid-column: 3;     grid-row: 3 / 5; }
.pin--04 { grid-column: 4;     grid-row: 3 / 5; }
.pin--05 { grid-column: 1;     grid-row: 4 / 7; }
.pin--06 { grid-column: 2;     grid-row: 4 / 7; }
.pin--07 { grid-column: 3 / 5; grid-row: 5 / 7; }

.pin__image { position: absolute; inset: 0; z-index: 0; }
.pin__image img,
.pin__image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.pin__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}
.pin__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(18px, 2vw, 32px);
  z-index: 2;
  color: var(--color-fg-on-dark);
}
.pin__num {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--color-accent);
  font-size: 14px;
  display: block;
  margin-bottom: var(--space-2);
}
.pin__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(20px, 1.4vw, 26px);
  line-height: 1.05;
  color: var(--color-fg-on-dark);
  margin: 0 0 var(--space-2);
}
.pin--01 .pin__title { font-size: clamp(32px, 2.6vw, 48px); }
.pin__excerpt {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 360px;
}
.pin--01 .pin__excerpt { font-size: 15px; max-width: 420px; }

.pin__read {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-fg-on-dark);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.pin:hover .pin__read,
.pin:focus-visible .pin__read {
  opacity: 1;
  transform: translateY(0);
}

/* Tablet: row height grows so cards retain breathing room */
@media (max-width: 1024px) {
  .occasions-grid {
    grid-auto-rows: 280px;
    grid-template-columns: repeat(2, 1fr);
  }
  .pin--01 { grid-column: 1 / 3; grid-row: auto; }
  .pin--02 { grid-column: 1 / 2; grid-row: auto; }
  .pin--03 { grid-column: 2 / 3; grid-row: auto; }
  .pin--04 { grid-column: 1 / 2; grid-row: auto; }
  .pin--05 { grid-column: 2 / 3; grid-row: auto; }
  .pin--06 { grid-column: 1 / 2; grid-row: auto; }
  .pin--07 { grid-column: 1 / 3; grid-row: auto; }
}

/* Mobile: single column, taller rows */
@media (max-width: 600px) {
  .occasions-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 437px;
  }
  .pin--01,
  .pin--02,
  .pin--03,
  .pin--04,
  .pin--05,
  .pin--06,
  .pin--07 {
    grid-column: 1 / 2;
    grid-row: auto;
  }
}

/* ----- Section 2 · Modal ----- */
.occasion-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  opacity: 0;
  transition: opacity 280ms var(--ease-out);
}
.occasion-modal-backdrop.is-open {
  display: flex;
  opacity: 1;
}

.occasion-modal {
  background: var(--color-bg-elevated);
  color: var(--color-fg);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: translateY(8px) scale(0.98);
  transition: transform 280ms var(--ease-out);
  position: relative;
}
.occasion-modal-backdrop.is-open .occasion-modal {
  transform: translateY(0) scale(1);
}

@media (max-width: 768px) {
  .occasion-modal {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    max-height: 92vh;
  }
  /* Cap the media so the body always has room to scroll on tall phones. */
  .occasion-modal__media { min-height: 0; max-height: 38vh; }
  /* The body becomes the scroll container; nav sticks at its bottom. */
  .occasion-modal__body {
    min-height: 0;
    padding-bottom: 0;
  }
  .occasion-modal__nav {
    position: sticky;
    bottom: 0;
    background: var(--color-bg-elevated);
    margin: var(--space-4) calc(-1 * clamp(28px, 3vw, 56px)) 0;
    padding: var(--space-3) clamp(28px, 3vw, 56px) calc(env(safe-area-inset-bottom, 0px) + var(--space-3));
  }
}

.occasion-modal__media {
  background: var(--pro-charcoal-75);
  overflow: hidden;
  min-height: 320px;
}
.occasion-modal__media img,
.occasion-modal__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.occasion-modal__body {
  padding: clamp(28px, 3vw, 56px);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  overflow-y: auto;
}
.occasion-modal__num {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--color-accent);
  font-size: 15px;
  margin: 0;
}
.occasion-modal__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.05;
  margin: 0;
  color: var(--color-fg);
}
.occasion-modal__copy p {
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 var(--space-4);
  color: var(--color-fg);
}
.occasion-modal__copy p:last-child { margin-bottom: 0; }

.occasion-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-fg);
  z-index: 5;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.occasion-modal__close:hover,
.occasion-modal__close:focus-visible {
  background: var(--color-accent);
  color: var(--color-on-accent);
  outline: none;
}

.occasion-modal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
  gap: var(--space-3);
}
.occasion-modal__nav button {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-fg);
  transition: background-color 200ms var(--ease-out),
              color 200ms var(--ease-out),
              border-color 200ms var(--ease-out);
}
.occasion-modal__nav button:hover,
.occasion-modal__nav button:focus-visible {
  background: var(--color-fg);
  color: var(--color-fg-on-dark);
  outline: none;
}
.occasion-modal__counter {
  font-size: 12px;
  color: var(--color-fg-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================
   Section 3 · Choosing Your P (rotating P + sticky stage)
   ============================================ */
.section-sizes {
  padding-bottom: 0;
}
.section-sizes__intro {
  max-width: 720px;
  margin-bottom: var(--space-12);
}

/* Outer scrolling container: 300vh tall, gives the sticky inner room to "hold" */
.sizes-stage {
  position: relative;
  height: 300vh;
}
.sizes-stage__inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-12);
  padding: 0 var(--section-padding-x);
  max-width: var(--container-max);
  margin: 0 auto;
}
.sizes-stage__p {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sizes-stage__p canvas {
  width: min(600px, 80%);
  height: auto;
  aspect-ratio: 1;
  display: block;
  transform-origin: center center;
  will-change: transform;
}
.sizes-stage__blurbs {
  position: relative;
  min-height: 280px;
}

.size-blurb {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration-medium) var(--ease-out),
              transform var(--duration-medium) var(--ease-out);
  pointer-events: none;
}
.size-blurb[data-active] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.size-blurb__use {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 22px;
  color: var(--color-fg-muted);
  margin: 0 0 var(--space-3);
}
.size-blurb__use em.ruby {
  font-style: italic;
  color: var(--color-accent);
}
.size-blurb__label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1;
  margin: 0 0 var(--space-5);
  color: var(--color-fg);
}
.size-blurb__body {
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-fg);
  max-width: 460px;
  margin: 0;
}

.size-blurb-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-3);
}
.size-blurb-progress span {
  display: block;
  width: 32px;
  height: 3px;
  background: var(--color-fg);
  opacity: 0.25;
  transition: background-color var(--duration-base), opacity var(--duration-base);
}
.size-blurb-progress span[data-active] {
  background: var(--color-accent);
  opacity: 1;
}

/* ============================================
   Experiment panel: full-width, charcoal,
   breathing P + gravity on cursor + scroll parallax.
   Sits between Section 3 and Section 4.
   ============================================ */
.experiment-panel {
  background: var(--color-bg-dark);
  color: #fff;
  padding: clamp(120px, 14vw, 200px) clamp(24px, 4vw, 64px);
  position: relative;
  overflow: hidden;
  width: 100%;
}
.experiment-panel__p {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  will-change: transform;
}
.experiment-panel__p canvas {
  display: block;
  width: clamp(480px, 60vw, 880px);
  height: auto;
  aspect-ratio: 1;
  opacity: 0.22;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.4));
}
.experiment-panel__copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  pointer-events: none;
}
.experiment-panel__pull {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.3;
  color: #fff;
  margin: 0;
}
.experiment-panel__pull em.ruby {
  font-style: italic;
  color: var(--color-accent);
}

/* ----- Mobile: 200vh, P stacks above blurbs ----- */
@media (max-width: 767px) {
  .sizes-stage {
    height: 200vh;
  }
  .sizes-stage__inner {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    padding: var(--space-12) var(--section-padding-x);
    gap: var(--space-6);
  }
  .sizes-stage__p canvas {
    width: min(360px, 70vw);
  }
  .sizes-stage__blurbs {
    min-height: 200px;
  }
}

/* ============================================
   Section 4 · A Few Simple Rules: horizontal cards
   ============================================ */
.section-rules__header {
  margin-bottom: clamp(40px, 5vw, 64px);
  max-width: 720px;
}
.section-rules__header .section__title {
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.05;
  margin: var(--space-3) 0 var(--space-5);
}
.section-rules__intro {
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-fg-muted);
  margin: 0;
}

.rules-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 1.6vw, 24px);
  margin-bottom: clamp(48px, 6vw, 80px);
}
@media (max-width: 1024px) {
  .rules-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .rules-cards { grid-template-columns: 1fr; }
}

.rule-card {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 2.4vw, 36px);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  box-shadow: var(--elev-1);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
  position: relative;
  min-height: 280px;
}
.rule-card:hover,
.rule-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--elev-2);
}
.rule-card__num {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--color-accent);
  font-size: 28px;
  line-height: 1;
  margin: 0;
}
.rule-card__statement {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.35;
  color: var(--color-fg);
  margin: 0;
}
.rule-card__body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-fg-muted);
  margin: 0;
  margin-top: auto; /* push body to bottom of flex column */
}

.rules-pull {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  color: var(--color-fg);
  text-align: center;
  margin: 0 auto;
  max-width: 640px;
  padding-top: clamp(32px, 3vw, 48px);
  border-top: 1px solid var(--color-border);
}

/* ============================================
   Section 5 · Share It
   ============================================ */
.section-share { text-align: center; position: relative; overflow: hidden; }
/* Share It background image: barely-visible team photo behind the
   charcoal so the panel reads with subtle depth without competing
   with the headline + CTA + closing pull. */
.section-share__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.04; /* almost nothing: just a hint of texture */
  pointer-events: none;
  z-index: 0;
}
.section-share__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-8); }
.section-share .section__title { font-size: clamp(48px, 6vw, 88px); margin: var(--space-2) 0; }
.section-share__body {
  color: var(--color-fg-on-dark);
  opacity: 0.92;
  max-width: 640px;
}
.link {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  color: inherit;
}
.link--bold { font-weight: 600; }
.section-share__cta {
  margin-top: var(--space-4);
}
.share-pull {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.4;
  color: var(--color-fg-on-dark);
  margin: var(--space-12) auto 0;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
/* Cheat-sheet download: quiet secondary action under the share-pull. */
.section-share__download {
  margin: var(--space-6) 0 0;
  text-align: center;
}
.download-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-fg-on-dark);
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full);
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}
.download-link:hover,
.download-link:focus-visible {
  background: #fff;
  color: var(--color-fg);
  border-color: #fff;
  outline: none;
}
.download-link__icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
}
.download-link__meta {
  opacity: 0.65;
  font-weight: 400;
  margin-left: 4px;
}

/* ============================================
   Section reveals
   ============================================ */
.reveal-target {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal-target.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-target {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--color-bg-dark);
  color: var(--color-fg-on-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: var(--space-12) 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
}
.footer__logo {
  height: 24px;
  width: auto;
  display: block;
}
.footer__meta {
  margin: 0;
  color: var(--color-fg-on-dark);
  opacity: 0.7;
}

/* ============================================
   Layered-people panel
   Full-width Ruby Red. 8 layers stack/unstack on scroll.
   Sits between Section 4 (Rules) and Section 5 (Share).
   ============================================ */
.layers-panel {
  background: var(--color-accent);
  width: 100%;
  height: 250vh; /* gives the scroll-reveal room to play out */
  position: relative;
}
.layers-panel__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.layers-panel__layer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 80vw);
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: contain;
  opacity: 0;
  /* Soft drop shadow + secondary cast shadow gives the "real stacked photos"
     feel: each layer reads as a physical photograph laid on the one below.
     No translation/rotation: the P must stay anchored centrally. */
  filter:
    drop-shadow(0 16px 32px rgba(0, 0, 0, 0.32))
    drop-shadow(0 4px 8px rgba(0, 0, 0, 0.20));
  transition: opacity 480ms var(--ease-out);
  pointer-events: none;
  user-select: none;
}
.layers-panel__layer[data-active] { opacity: 1; }

@media (max-width: 768px) {
  .layers-panel { height: 200vh; }
  .layers-panel__layer { width: min(540px, 86vw); }
}

/* Reduced-motion: show all layers stacked statically */
@media (prefers-reduced-motion: reduce) {
  .layers-panel__layer { opacity: 1 !important; transition: none !important; }
}
