/* ==========================================================================
   Grzegorz Boduszek — Contest Landing Page  v2
   ========================================================================== */

:root {
  --pink: #FA2E7C;
  --purple: #C94EAA;
  --accent-purple-text: #AC00AE;
  --accent-pink-text: #EF0A6A;
  --gradient-brand: linear-gradient(135deg, var(--pink), var(--purple));

  --ink: #111111;
  --body-text: #2b2b2b;
  --gray-text: #6b6b6b;
  --footer-bg: #e5e5e5;
  --border-soft: rgba(0, 0, 0, 0.14);
  --card-bg: #ffffff;
  --frame-bg: #000000;

  /* Corners reduced 30% from original */
  --radius-lg: clamp(14px, 1.8vw, 31px);
  --radius-md: clamp(10px, 1.3vw, 20px);
  --radius-pill: 999px;

  --container-max: 1280px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);

  --font-body: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-condensed: "Roboto Condensed", var(--font-body);

  --shadow-button: 0 14px 30px -10px rgba(201, 30, 130, 0.55);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--body-text);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0 0 1em; line-height: 1.6; }
h1, h2, h3 { margin: 0; line-height: 1.25; }

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.brand-logo { width: 30px; height: auto; }
.brand-name {
  font-family: var(--font-condensed);
  font-weight: 300;
  letter-spacing: 0.12em;
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  color: var(--ink);
  text-transform: uppercase;
}
.header-pill {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.4rem;
  font-family: var(--font-body);
  font-size: clamp(0.72rem, 1.2vw, 0.92rem);
  white-space: nowrap;
}
.pill-light { font-weight: 300; color: #777; }
.pill-bold  { font-weight: 700; color: var(--ink); }

@media (max-width: 560px) {
  .header-pill { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero-bg {
  width: 100%;
  aspect-ratio: 1920 / 1256;
  background-size: cover;
  background-position: center 30%;
}

/* ---------- Intro card ---------- */
.intro-card {
  position: relative;
  z-index: 2;
  /* moved up ~120px total to cover hero fade edge */
  margin-top: clamp(-280px, -17.9vw, -180px);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  /* no shadow */
  padding: clamp(1.5rem, 3vw, 2.8rem);
  display: flex;
  align-items: stretch;
  gap: clamp(1.2rem, 3vw, 2.5rem);
}
/* intro-card: always visible, no entrance animation */

/* Text column — narrower so video gets more space */
.intro-text {
  flex: 0 0 38%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.intro-text h1 {
  font-size: clamp(1.13rem, 2.0vw, 1.63rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.9rem;
}
.accent-purple { color: var(--accent-purple-text); }
.accent-pink   { color: var(--accent-pink-text); }

/* Body text: Roboto Regular 400, slightly bigger than before */
.intro-text p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  color: var(--body-text);
  margin-bottom: 0.7em;
}
.intro-text p:last-child { margin-bottom: 0; }
.intro-text strong { font-weight: 700; color: var(--ink); }
.intro-closing { font-weight: 700; margin-top: 1.6rem; }

/* Video column — 40px narrower from the left; aspect ratio maintained; video fills by cover */
.video-frame {
  flex: 1 1 0;
  position: relative;
  aspect-ratio: 794 / 530;
  background: var(--frame-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  min-width: 0;
  align-self: center;
  margin-left: 40px;
}
.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-toggle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.2;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.video-toggle svg { width: clamp(30px, 4vw, 44px); height: auto; }
.video-frame.is-playing .video-toggle { opacity: 0; }

/* ---------- Interactions row ---------- */
.interactions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: clamp(2rem, 5vw, 3.5rem);
  flex-wrap: wrap;
}

.interactions-hint {
  flex: 0 0 auto;
  max-width: 420px;
  /* offset matches the intro-card's internal padding so text aligns with card text above */
  padding-left: clamp(1.5rem, 3vw, 2.8rem);
}
.js .interactions-hint {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js .interactions-hint.in-view { opacity: 1; transform: none; }

.interactions-hint p {
  /* 2pts bigger than before (was ~1.2rem max) */
  font-size: clamp(1.1rem, 1.7vw, 1.325rem);
  font-weight: 500;
  color: var(--accent-purple-text);
  margin-bottom: 0.75rem;
}
.interactions-hint strong { font-weight: 900; }

/* interactions.png at 40% opacity instead of SVG icons */
.interactions-img {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  opacity: 0.4;
}

/* Scroll-down arrow — 50% smaller than original */
.scroll-down {
  flex: 0 0 auto;
  width: clamp(26px, 2.8vw, 32px);
  height: clamp(26px, 2.8vw, 32px);
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2.4s ease-in-out infinite;
  box-shadow: 0 8px 20px -8px rgba(201, 30, 130, 0.5);
  align-self: center;
}
.scroll-down svg { width: 48%; height: 48%; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* Quote — quote.png background at 10% opacity, text centered, shifted left+up */
.quote {
  flex: 1 1 260px;
  position: relative;
  margin: 0;
  max-width: 400px;
  text-align: center;
  padding: 1.2rem 1.5rem;
  /* resting offset: 60px left, 8px up */
  transform: translate(-60px, -8px);
}
.quote::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/img/quote.png') no-repeat center center / auto 60px;
  opacity: 0.1;
  pointer-events: none;
}
.js .quote {
  opacity: 0;
  transform: translate(-60px, 8px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js .quote.in-view {
  opacity: 1;
  transform: translate(-60px, -8px);
}

.quote p {
  position: relative; /* above ::before */
  /* +3pt ≈ +4px ≈ +0.25rem from original 1.05rem max */
  font-size: clamp(1.2rem, 1.4vw, 1.3rem);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}
.quote strong { font-weight: 700; }
/* "most fun I've ever had" — purple, matching "Don't forget" colour */
.quote-bold-pink {
  font-weight: 700;
  color: var(--accent-purple-text);
}

/* ---------- Showcase sections ---------- */
.showcase {
  padding-block: clamp(1.2rem, 3vw, 2.2rem);
}

/* Reduce gap between Halloween and Flamingo frames */
#showcase-halloween { padding-bottom: clamp(0.4rem, 0.8vw, 0.8rem); }
#showcase-flamingo  {
  padding-top:    clamp(0.4rem, 0.8vw, 0.8rem);
  /* No bottom padding so gap above pair = only pair section's top padding */
  padding-bottom: 0;
}
/* Pair section top padding = measured pair internal gap = 40px at 1440px */
.showcase--pair { padding-top: clamp(1.25rem, 3vw, 2.5rem); }

.rive-frame {
  background: var(--frame-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: none;
  outline: none;
  box-shadow: none;
}
.js .rive-frame {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .rive-frame.in-view { opacity: 1; transform: none; }
.rive-frame iframe {
  width: 100%;
  height: 100%;
  border: none !important;
  outline: none;
  display: block;
}
.rive-frame--wide   { aspect-ratio: 1422 / 829; }
/* Square frames: rounded top corners only — bottom merges flush into caption */
.rive-frame--square {
  aspect-ratio: 686 / 741;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Pair grid — equal-height items so captions stretch to same size */
.pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}
.pair-item {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.js .pair-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .pair-item.in-view { opacity: 1; transform: none; }

/* Caption: no top rounding, flush against iframe, fills remaining height for equal sizing */
.caption {
  flex: 1;
  margin-top: 0;
  background: #ebebeb;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 0.9rem 1.4rem;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.88rem, 1vw, 0.98rem);
  color: #555;
  line-height: 1.55;
}
.caption strong { font-weight: 700; color: #444; }
/* Right caption: text vertically centred within the gray box */
.caption--vcenter {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* The inner span is the single flex item so text flows normally inside it */
.caption--vcenter span {
  display: block;
  text-align: center;
}
.lead-paragraph {
  max-width: 760px;
  margin: clamp(1.5rem, 4vw, 2.8rem) auto 0;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  color: var(--ink);
}
.lead-paragraph strong { font-weight: 700; }

.mini-chevron {
  display: flex;
  justify-content: center;
  margin-top: clamp(1rem, 2vw, 1.8rem);
}
.mini-chevron svg { width: 22px; height: 22px; }

@media (max-width: 760px) {
  .pair-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */
.contact-section {
  padding-block: clamp(1.5rem, 4vw, 3rem);
  /* 50px up */
  margin-top: -50px;
}
.contact-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  /* 20px less tall than before (−10px top, −10px bottom) */
  padding: clamp(0.575rem, 2.2vw, 1.375rem) clamp(1.5rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 1.5rem;
}
.js .contact-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .contact-card.in-view { opacity: 1; transform: none; }

/* Left column — centered within its half */
.contact-col--left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}
.contact-headline {
  font-family: var(--font-body);
  font-weight: 700;
  /* 3pts bigger than body text (~1.05rem body → +3pt ≈ +0.19rem) */
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  color: var(--ink);
  margin: 0;
  line-height: 1.3;
}
.accent-pink-bold {
  color: var(--accent-pink-text);
  font-weight: 700;
}
.contact-body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  color: var(--ink);
  margin: 0;
  line-height: 1.6;
}
.contact-body strong { font-weight: 700; }
.contact-body .fw-black { font-weight: 900; color: var(--ink); }
.contact-arrows {
  /* Roboto Black + magenta */
  font-family: var(--font-body);
  font-weight: 900;
  color: var(--pink);
}

/* Right column — button centered within it, double width, shifted 40px right */
.contact-col--right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 40px;
}
.cta-button {
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  padding: 1rem 2rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-button);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: block;
  text-align: center;
  /* twice the width of original button */
  min-width: clamp(260px, 26vw, 360px);
}
.cta-button:hover, .cta-button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -10px rgba(201, 30, 130, 0.65);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* taller than before → reduced by 30px from previous version */
  padding-block: 0.5rem;
  /* Roboto Regular (not condensed), 50% opacity */
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.75rem, 1vw, 0.88rem);
  color: rgba(0, 0, 0, 0.5);
  flex-wrap: wrap;
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  /* --- Card --- */
  .intro-card { flex-direction: column; }
  .intro-text  { flex: none; width: 100%; }
  /* remove the 40px left margin that is desktop-only */
  .video-frame { flex: none; width: 100%; aspect-ratio: 794/530; align-self: auto; margin-left: 0; }

  /* --- Interactions row: column order, tight spacing --- */
  .interactions-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-block: 1rem;        /* was 2–3.5rem each side on desktop */
    gap: 0.65rem;               /* tight gap between hint / quote / arrow */
  }
  .interactions-hint {
    order: 1;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 0;            /* remove desktop alignment offset */
  }
  /* KEY FIX: quote had flex-basis:260px which made it 260px+ tall on mobile */
  .quote {
    order: 2;
    flex: 0 0 auto !important; /* shrink to content, not 260px minimum */
    max-width: 100%;
    padding: 0.5rem 1rem;
    transform: translate(0, 0) !important;
  }
  .js .quote         { transform: translate(0, 12px) !important; }
  .js .quote.in-view { transform: translate(0, 0)    !important; }
  .scroll-down { order: 3; }

  .interactions-img { max-width: 320px; margin: 0 auto; }

  /* --- Showcase sections: uniform 12px padding → equal gaps between all iframes --- */
  .showcase             { padding-block: 0.75rem; }
  #showcase-halloween   { padding-bottom: 0.75rem; }
  #showcase-flamingo    { padding-top: 0.75rem; padding-bottom: 0; }
  /* Gap before first small iframe = measured pair gap = 12px; no bottom pad (contact supplies its own) */
  .showcase--pair       { padding-top: 12px; padding-bottom: 0; }

  /* Lead paragraph and chevron between Halloween and Flamingo: compact */
  .lead-paragraph { margin-top: 0.6rem; font-size: 0.92rem; }
  .mini-chevron   { margin-top: 0.4rem; }

  /* Pair grid: 1 column, gap = 12px (measured gap between pair iframes) */
  .pair-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Gap after last small iframe = same 12px; remove desktop -50px pull-up */
  .contact-section { margin-top: 0; padding-top: 12px; padding-bottom: 1.5rem; }

  /* --- Contact --- */
  .contact-card { grid-template-columns: 1fr; }
  .contact-col--right { justify-content: center; padding-left: 0; }
  .cta-button { min-width: 220px; }
}

@media (max-width: 480px) {
  .intro-card { margin-top: -28px; }
}

/* Icon always displays as uploaded — no dark/light mode colour change */
