:root {
  --ink: #0b1930;
  --paper: #fffaf0;
  --sun: #f3bf52;
  --coral: #f26d4f;
  --panel: #142238;
  --layer1: #784e5f;
  --layer2: #4a375f;
  --layer3: #2e2a5f;
  --layer4: #1b1843;
  --sans: "Manrope", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "DM Mono", monospace;
  --piece-w: 200px;
  --piece-tab: 22px;
  --cursor-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpolygon points='6,4 6,30 13,24 18,34 22,32 17,22 26,22' fill='%23f26d4f' stroke='%23ffffff' stroke-width='2' stroke-linejoin='round' paint-order='stroke'/%3E%3C/svg%3E")
    6 4;
  --cursor-arrow-active: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpolygon points='6,4 6,30 13,24 18,34 22,32 17,22 26,22' fill='%23f26d4f' stroke='%23ffffff' stroke-width='2' stroke-linejoin='round' paint-order='stroke'/%3E%3Ccircle cx='32' cy='29' r='3.5' fill='%23ffffff' stroke='%23f26d4f' stroke-width='1.5'/%3E%3C/svg%3E")
    6 4;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  cursor: var(--cursor-arrow), auto;
}

a {
  color: inherit;
  cursor: var(--cursor-arrow-active), pointer;
}

button {
  cursor: var(--cursor-arrow-active), pointer;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 11px 16px;
  color: var(--ink);
  background: var(--sun);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 86px;
  padding: 0 clamp(20px, 4vw, 68px);
  align-items: center;
  border-bottom: 1px solid rgba(255, 250, 240, 0.28);
}

.wordmark {
  display: inline-flex;
  gap: 11px;
  width: fit-content;
  align-items: center;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.055em;
  text-decoration: none;
}

.wordmark-logo {
  display: block;
  width: 110px;
  height: auto;
}

.wordmark > span:last-child > span {
  color: var(--coral);
}

.wordmark-mark {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.wordmark-mark::before,
.wordmark-mark::after,
.wordmark-mark i {
  position: absolute;
  content: "";
}

.wordmark-mark::before,
.wordmark-mark::after {
  right: 7px;
  left: 7px;
  height: 1px;
  background: currentColor;
  transform-origin: center;
}

.wordmark-mark::before {
  top: 14px;
  transform: rotate(12deg);
}

.wordmark-mark::after {
  top: 22px;
  transform: rotate(-12deg);
}

.wordmark-mark i:first-child {
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 1px;
  background: currentColor;
  transform: rotate(27deg);
}

.wordmark-mark i:last-child {
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--sun);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.header-nav {
  display: flex;
  gap: 42px;
  align-items: center;
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-nav a {
  text-decoration: none;
  text-underline-offset: 5px;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  text-decoration: underline;
}

.mobile-menu {
  display: none;
}

.team-mobile-link {
  display: none;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-underline-offset: 5px;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.hero-art {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.hero::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: -1px;
  left: 0;
  height: clamp(72px, 12svh, 120px);
  content: "";
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--layer1) 0%, transparent) 0%,
    color-mix(in srgb, var(--layer1) 4%, transparent) 25%,
    color-mix(in srgb, var(--layer1) 18%, transparent) 50%,
    color-mix(in srgb, var(--layer1) 45%, transparent) 70%,
    color-mix(in srgb, var(--layer1) 78%, transparent) 87%,
    var(--layer1) 100%
  );
}

.hero-title {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(82vw, 1100px);
  transform: translate(-50%, -42%);
}

.hero-title h1 {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin: 0;
  line-height: 0.67;
  text-transform: uppercase;
}

.hero-title h1 span {
  font-size: clamp(6.6rem, 13vw, 14rem);
  font-weight: 800;
  letter-spacing: -0.105em;
  text-shadow: 0 7px 35px rgba(3, 12, 29, 0.35);
}

.hero-title h1 em {
  margin-left: clamp(8px, 1.8vw, 40px);
  color: var(--sun);
  font-family: var(--serif);
  font-size: clamp(9.2rem, 17vw, 18rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.09em;
  text-shadow: 0 7px 35px rgba(3, 12, 29, 0.35);
}

.hero-title > p {
  width: auto;
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 1.1rem;
  line-height: 1.65;
  letter-spacing: 0.13em;
  text-align: center;
  text-transform: uppercase;
}

.hero-date-line {
  position: relative;
  top: 10px;
}

.hero-bottom {
  position: absolute;
  right: clamp(24px, 4vw, 68px);
  bottom: 38px;
  left: clamp(24px, 4vw, 68px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: end;
}

.hero-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-direction: column;
}

.hero-info {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-direction: column;
}

.hero-info > p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.59rem;
  line-height: 1.65;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.social-links {
  display: flex;
  gap: 20px;
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.social-links a {
  text-underline-offset: 5px;
}

.made-with {
  color: rgba(255, 250, 240, 0.78);
}

.made-with span {
  color: var(--coral);
}

.site-footer {
  padding: 28px clamp(20px, 4vw, 68px) 34px;
  border-top: 1px solid rgba(255, 250, 240, 0.28);
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 250, 240, 0.65);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer span {
  color: var(--coral);
}

.apply-button {
  display: inline-flex;
  min-height: 54px;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  background: var(--sun);
  border: 1px solid var(--sun);
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.apply-button span {
  margin-left: 38px;
  font-size: 1.08rem;
}

.apply-button:hover,
.apply-button:focus-visible {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--paper);
}

.sponsor-link {
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.07em;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.sponsor-link span {
  color: var(--sun);
  font-size: 0.98rem;
}

.page-section {
  padding: 80px clamp(20px, 4vw, 68px);
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.1875rem);
}

#about.page-section {
  border-top: 0;
  background: linear-gradient(to bottom, var(--layer1), var(--layer2));
}

#schedule.page-section {
  background: linear-gradient(to bottom, var(--layer2), var(--layer3));
}

#faqs.page-section {
  background: linear-gradient(to bottom, var(--layer3), var(--layer4));
}

#sponsors.page-section {
  background: linear-gradient(to bottom, var(--layer4), var(--panel));
}

#contact.page-section {
  background: linear-gradient(to bottom, var(--panel), var(--ink));
}

#team.page-section {
  background: var(--ink);
}

.page-section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.page-section h2 {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.015em;
}

.page-section p {
  margin: 0 0 12px;
  line-height: 1.6;
}

.faq-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  max-width: 900px;
}

.faq-mascot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.faq-mascot-stage {
  position: relative;
  order: -1;
  width: 100%;
  padding: 18px 8px 24px;
}

.faq-mascot-art {
  display: block;
  overflow: visible;
  width: 100%;
  height: auto;
  transform-origin: 50% 90%;
  animation: faq-mascot-bob 4s ease-in-out infinite;
}

.faq-mascot-shadow {
  position: absolute;
  bottom: 8px;
  left: 25%;
  width: 50%;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  animation: faq-shadow-breathe 4s ease-in-out infinite;
}

.faq-fish {
  transform-origin: 490px 260px;
}

.faq-wing-raised {
  transform-origin: 450px 400px;
}

.faq-wing-side {
  transform-origin: 318px 371px;
}

@keyframes faq-mascot-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes faq-shadow-breathe {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.85); opacity: 0.65; }
}

@media (max-width: 700px) {
  .faq-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .faq-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .faq-mascot { width: 140px; flex-shrink: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-mascot-stage > *, .faq-fish, .faq-wing-raised, .faq-wing-side { animation: none; }
}

#faqs details {
  margin: 0 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 250, 240, 0.16);
}

#faqs details:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

#faqs summary {
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.5;
  font-weight: 600;
  cursor: var(--cursor-arrow-active), pointer;
}

#faqs details p {
  margin: 14px 0 0;
}

.faq-smile {
  opacity: 0;
}

.faq-mascot-art.smiling .faq-smile {
  opacity: 1;
}

.sponsor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sponsor-row li {
  padding: 14px 20px;
  border: 1px solid rgba(255, 250, 240, 0.28);
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 0 36px;
  padding: 0;
  list-style: none;
}

.schedule-legend li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 250, 240, 0.75);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.swatch {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  border-radius: 3px;
}

.swatch-kickoff {
  background: var(--coral);
}

.swatch-build {
  background: var(--panel);
  border: 1.5px solid var(--coral);
}

.swatch-judge {
  background: var(--sun);
}

.swatch-wrap {
  background: var(--panel);
  border: 1.5px solid var(--sun);
}

.puzzle-shell {
  position: relative;
  margin-inline: clamp(-68px, -4vw, -20px);
  background: transparent;
}

.puzzle-strip {
  --strip-fade: clamp(20px, 4vw, 68px);
  display: flex;
  align-items: stretch;
  margin: 0 clamp(20px, 4vw, 68px) 0 calc(clamp(20px, 4vw, 68px) + 48px);
  padding: 28px 0 44px;
  list-style: none;
  background: transparent;
  cursor: var(--cursor-arrow-active), pointer;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--coral) transparent;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 var(--strip-fade),
    #000 calc(100% - var(--strip-fade)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 var(--strip-fade),
    #000 calc(100% - var(--strip-fade)),
    transparent 100%
  );
}

.puzzle-strip::-webkit-scrollbar {
  height: 8px;
}

.puzzle-strip::-webkit-scrollbar-thumb {
  background: var(--coral);
  border-radius: 8px;
}

.puzzle-strip::-webkit-scrollbar-track {
  background: transparent;
}

.puzzle-strip::-webkit-scrollbar-button {
  display: none;
}

.puzzle-piece {
  position: relative;
  flex-shrink: 0;
  width: calc(var(--piece-w) + var(--piece-tab));
  height: 208px;
  scroll-snap-align: start;
  filter: drop-shadow(0 14px 22px rgba(5, 11, 22, 0.55));
}

.puzzle-piece:not(:first-child) {
  margin-left: calc(-1 * var(--piece-tab));
}

.puzzle-piece.is-end {
  width: var(--piece-w);
}

.piece-face {
  position: absolute;
  inset: 0;
  clip-path: path(
    "M16,0 L184,0 A16,16 0 0 1 200,16 L200,73 A22,22 0 0 1 200,117 L200,174 A16,16 0 0 1 184,190 L16,190 A16,16 0 0 1 0,174 L0,117 A22,22 0 0 0 0,73 L0,16 A16,16 0 0 1 16,0 Z"
  );
}

.puzzle-piece.is-start .piece-face {
  clip-path: path(
    "M16,0 L184,0 A16,16 0 0 1 200,16 L200,73 A22,22 0 0 1 200,117 L200,174 A16,16 0 0 1 184,190 L16,190 A16,16 0 0 1 0,174 L0,16 A16,16 0 0 1 16,0 Z"
  );
}

.puzzle-piece.is-end .piece-face {
  clip-path: path(
    "M16,0 L184,0 A16,16 0 0 1 200,16 L200,174 A16,16 0 0 1 184,190 L16,190 A16,16 0 0 1 0,174 L0,117 A22,22 0 0 0 0,73 L0,16 A16,16 0 0 1 16,0 Z"
  );
}

.puzzle-piece.phase-kickoff .piece-face {
  background: var(--coral);
}

.puzzle-piece.phase-judge .piece-face {
  background: var(--sun);
}

.puzzle-piece.phase-build .piece-face {
  background: var(--panel);
  border: 1.5px solid var(--coral);
}

.puzzle-piece.phase-wrap .piece-face {
  background: var(--panel);
  border: 1.5px solid var(--sun);
}

.piece-content {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--piece-w);
  height: 190px;
  padding: 22px 18px 20px 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.piece-num {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.7;
}

.piece-time {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.piece-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.32;
}

.phase-kickoff .piece-num,
.phase-kickoff .piece-time,
.phase-kickoff .piece-title,
.phase-judge .piece-num,
.phase-judge .piece-time,
.phase-judge .piece-title {
  color: var(--ink);
}

.phase-build .piece-num,
.phase-build .piece-time {
  color: var(--coral);
}

.phase-wrap .piece-num,
.phase-wrap .piece-time {
  color: var(--sun);
}

.phase-build .piece-title,
.phase-wrap .piece-title {
  color: var(--paper);
}

.puzzle-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 1px 0 0;
  color: rgba(255, 250, 240, 0.42);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.puzzle-hint svg {
  width: 15px;
  height: 15px;
  animation: puzzle-nudge 1.6s ease-in-out infinite;
}

@keyframes puzzle-nudge {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .puzzle-hint svg {
    animation: none;
  }
}

#contact.page-section .apply-button,
#contact.page-section .sponsor-link {
  margin-right: 16px;
}

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

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

  .site-header {
    grid-template-columns: 1fr auto;
    column-gap: 16px;
  }

  .team-mobile-link {
    display: inline-block;
  }

  .mobile-menu {
    display: block;
    justify-self: end;
  }

  .mobile-menu summary {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
  }

  .hamburger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .mobile-menu nav {
    position: absolute;
    top: 100%;
    right: 20px;
    left: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
    border: 1px solid rgba(255, 250, 240, 0.28);
    border-radius: 12px;
    background: var(--ink);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  }

  .mobile-menu nav a {
    padding: 12px;
    min-height: 44px;
    text-decoration: none;
  }

  .hero-title {
    width: min(84vw, 900px);
  }

  .hero-title > p {
    margin: 24px 0 0;
    text-align: center;
  }

  .hero-bottom {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 600px) {
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100svh;
    padding: 120px 20px 32px;
    gap: 48px;
  }

  .wordmark-logo {
    width: 96px;
  }

  .page-section {
    padding: 52px 20px;
  }

  .page-section-inner,
  .faq-questions {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #faqs summary {
    min-height: 44px;
    font-size: 1rem;
    line-height: 1.5;
  }

  #contact .page-section-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  #contact.page-section .apply-button,
  #contact.page-section .sponsor-link {
    margin-right: 0;
  }

  .site-header {
    min-height: 72px;
    padding: 0 19px;
  }

  .wordmark {
    font-size: 0.9rem;
  }

  .wordmark-mark {
    width: 34px;
    height: 34px;
  }

  .team-mobile-link {
    font-size: 0.58rem;
  }

  .hero-art {
    object-position: 51% 50%;
  }

  .hero-title {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin: auto 0;
    transform: none;
  }

  .hero-title h1 {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 3vw;
    white-space: nowrap;
  }

  .hero-title h1 span {
    display: block;
    font-size: clamp(2.5rem, 15vw, 5.625rem);
  }

  .hero-title h1 em {
    display: block;
    margin-top: 0;
    margin-left: 0;
    font-size: clamp(3.25rem, 20vw, 7.5rem);
    line-height: 0.8;
  }

  .hero-title > p {
    margin-top: 32px;
    font-size: 0.85rem;
  }

  .hero-bottom {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    text-align: center;
  }

  .hero-info {
    align-items: center;
    order: 2;
  }

  .hero-actions .apply-button {
    width: min(100%, 340px);
  }

  .sponsor-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .hero-info > p {
    font-size: 0.54rem;
  }

  .social-links {
    font-size: 0.72rem;
  }

  .apply-button {
    min-height: 50px;
    padding: 0 14px;
    font-size: 0.8rem;
  }

  .apply-button span {
    margin-left: 12px;
  }

  .puzzle-piece {
    height: 232px;
  }

  .piece-content {
    height: 214px;
  }

  .piece-title {
    font-size: 1.125rem;
  }
}
