/* ============================================================
   Spectrum Tokyo Festival 2027 — v2
   Design tokens from Figma:
   black #1E0A1E / white #FFFFFF / red #E94709 / yellow #F0CB27 / beige #F2EFEB
   ============================================================ */

:root {
  --black: #1E0A1E;
  --white: #FFFFFF;
  --red: #E94709;
  --yellow: #F0CB27;
  --beige: #F2EFEB;
  --font-display: 'Special Gothic Expanded One', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --edge-h: clamp(70px, 12.5vw, 180px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--beige);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

em { font-style: normal; color: var(--red); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* ============ HEADER ============ */

/* overlaid on the hero so the animated collage runs to the top */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px 44px 0;
}

.hashtag {
  position: relative;
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.02em;
}
/* thick white outline via a stroked duplicate behind the text */
.hashtag::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  -webkit-text-stroke: 10px var(--white);
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle img { display: block; width: 36px; }

.site-nav { display: none; }

/* ============ HERO ============ */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 486px);
  padding: 140px 0 calc(var(--edge-h) * 0.6) 24px;
}

/* animated collage behind everything in the first view. Taller than the
   hero so it can drift on scroll (--hero-shift, set in main.js) without
   exposing an edge. */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% 0;
  z-index: 0;
  background: url("assets/hero-bg.gif") center / cover no-repeat;
  transform: translate3d(0, var(--hero-shift, 0px), 0);
  will-change: transform;
}
.hero > * {
  position: relative;
  z-index: 1;
}

/* the right column is pinned to the edge, so the logo centers
   itself in whatever space remains on the left */
.hero-title {
  grid-row: 1 / 3;
  justify-self: center;
  width: min(700px, 100%);
  margin: -40px 0 50px;
}
.hero-title img { display: block; width: 100%; }

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 22px;
  margin-top: 20px;
}

/* Hero tape links: the tape art carries its own lettering.
   They overhang the right edge slightly and hop left on hover. */
.tape-link {
  display: block;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tape-link img { display: block; }
.tape-link--red {
  width: min(440px, 100%);
  transform: rotate(-1deg);
  margin-right: -18px;
}
.tape-link--yellow {
  width: min(420px, 100%);
  transform: rotate(1deg);
  margin-right: -18px;
}
.tape-link--red:hover,
.tape-link--red:focus-visible { transform: rotate(-1deg) translateX(-14px); }
.tape-link--yellow:hover,
.tape-link--yellow:focus-visible { transform: rotate(1deg) translateX(-14px); }

/* Blank tape titles (WANTED) with HTML lettering on top */
.tape {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  color: var(--black);
}
.tape--blank-red { background-image: url("assets/tape-blank-red.svg"); }
.tape--blank-yellow { background-image: url("assets/tape-blank-yellow.svg"); }

.tape-en {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.tape-ja { font-weight: 700; }

/* the white panel is baked into dates.svg;
   z-index keeps it in front of the brush_top edge below */
.hero-dates {
  position: relative;
  z-index: 2;
  justify-self: end;
  margin: 70px 30px 0 0;
}
.hero-dates img {
  display: block;
  width: min(486px, 100%);
  filter: drop-shadow(0 6px 22px rgba(30, 10, 30, 0.08));
}

/* ============ DARK SECTIONS + BRUSH EDGES ============ */

.dark {
  background: var(--black);
  color: var(--white);
  position: relative;
  z-index: 1;
}

.dark::before,
.dark::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--edge-h);
  pointer-events: none;
}
/* brush-top.svg: ink mass at its bottom → sits above the dark block.
   Tiled at natural aspect (2831×180) so widths beyond ~2800px repeat
   instead of stretching; 1px overlap hides subpixel seams. */
.dark::before {
  bottom: calc(100% - 1px);
  background: url("assets/brush-top.svg") left bottom / auto 100% repeat-x;
}
/* brush-bottom-1.svg (2800×180): ink mass at its top → below the dark block */
.dark::after {
  top: calc(100% - 1px);
  background: url("assets/brush-bottom-1.svg") left top / auto 100% repeat-x;
}

/* ============ ABOUT ============ */

.about-inner {
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  min-height: 550px;
}

.about-text {
  position: relative;
  z-index: 2;
  max-width: 580px;
  padding: 95px 24px 90px clamp(24px, 6.6vw, 96px);
}

.about-text h2 {
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 900;
  line-height: 1.55;
  margin-bottom: 34px;
}

.about-text p {
  font-size: 16px;
  line-height: 2.0;
  margin-bottom: 1.6em;
}
.about-text p:last-child { margin-bottom: 0; }

.text-link {
  font-weight: 700;
  font-size: 16px;
  text-underline-offset: 6px;
}
.text-link:hover { color: var(--yellow); }

.about-collage {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(740px, 54%);
  z-index: 1;
}
.about-collage img { display: block; width: 100%; }

/* ============ THEMES ============ */

.themes {
  padding: calc(var(--edge-h) + 30px) 24px 150px;
}

.brush-heading img { display: block; margin: 0 auto; }

.themes-lead {
  max-width: 640px;
  margin: 45px auto 0;
  font-size: 16px;
  line-height: 2.1;
  text-align: center;
}

.theme-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 30px;
  max-width: 1400px;
  margin: 230px auto 0;
  list-style: none;
}

/* The li carries the float animation; the card carries its scattered
   tilt plus a mouse-parallax offset (--mx/--my set from main.js). */
.theme-cards li {
  animation: card-float 6s ease-in-out infinite;
}
.theme-cards li:nth-child(1) { margin-top: 18px; }
.theme-cards li:nth-child(2) { animation-duration: 7s; animation-delay: -2.3s; }
.theme-cards li:nth-child(3) { animation-duration: 6.5s; animation-delay: -4.1s; margin-top: 34px; }

.card {
  position: relative;
  /* matches the paper color baked into the ripped-edge PNGs */
  background: #FDFDFD;
  padding: 4px 36px 48px;
  filter: drop-shadow(0 10px 20px rgba(30, 10, 30, 0.14));
  transform: rotate(var(--tilt, 0deg)) translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: transform 0.3s ease-out;
}
.theme-cards li:nth-child(1) .card { --tilt: -2deg; }
.theme-cards li:nth-child(2) .card { --tilt: 1.3deg; }
.theme-cards li:nth-child(3) .card { --tilt: -1.2deg; }

@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-cards li { animation: none; }
  .card { transition: none; }
}
/* ripped paper edges above and below the card body;
   1px overlap into the card keeps the joint seamless */
.card::before,
.card::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  aspect-ratio: 440 / 80;
  background: center / 100% 100% no-repeat;
}
.card::before {
  bottom: calc(100% - 1px);
  background-image: url("assets/ripped-top.png");
}
.card::after {
  top: calc(100% - 1px);
  background-image: url("assets/ripped-bottom.png");
}

.pin {
  position: relative;
  z-index: 1;
  display: block;
  margin: -190px auto 0;
  width: min(270px, 80%);
}

.card h3 {
  font-size: clamp(24px, 2.1vw, 30px);
  font-weight: 900;
  text-align: center;
  margin: 22px 0 20px;
}

.card p {
  font-size: 15px;
  line-height: 1.95;
}

/* ============ WANTED ============ */

.wanted {
  padding: 70px 24px 120px;
}

.wanted-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 8vw, 150px);
  max-width: 1200px;
  margin: 70px auto 0;
}

.wanted-col { text-align: center; }

.tape--big {
  width: min(505px, 100%);
  margin: 0 auto;
  padding: 42px 24px 38px;
}
.wanted-col:first-child .tape--big { transform: rotate(-1deg); }
.wanted-col:last-child .tape--big { padding: 30px 24px 26px; }
/* the yellow tape art slants within its canvas — tilt the lettering
   to run parallel with it */
.wanted-col:last-child .tape--big .tape-en,
.wanted-col:last-child .tape--big .tape-ja { transform: rotate(-2.5deg); }
.tape--big .tape-en { font-size: clamp(28px, 2.6vw, 38px); }
.tape--big .tape-ja { font-size: 15px; margin-top: 10px; }

.wanted-col p {
  font-size: 16px;
  font-weight: 500;
  line-height: 2.1;
  max-width: 560px;
  margin: 42px auto 52px;
  text-align: left;
}

.outline-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(400px, 100%);
  min-height: 80px;
  margin: 0 auto;
  border: 2px solid var(--white);
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.outline-btn:hover,
.outline-btn:focus-visible {
  background: var(--white);
  color: var(--black);
}

.outline-btn--dark {
  border-color: var(--black);
  color: var(--black);
}
.outline-btn--dark:hover,
.outline-btn--dark:focus-visible {
  background: var(--black);
  color: var(--white);
}

/* ============ TICKETS ============ */

.tickets {
  position: relative;
  padding: calc(var(--edge-h) + 60px) 24px 120px;
  text-align: center;
}
.tickets > * {
  position: relative;
  z-index: 1;
}

/* B&W photo collage behind TICKETS. Sits at z-index 0 so the
   brush_bottom edge of WANTED (z-index 1) and the ripped_top edge of
   INFO (z-index 2) both paint over it, keeping the seams intact. */
.photo-bg {
  position: absolute;
  /* extends 80px past the section bottom so the collage also fills the
     gap under INFO's ripped edge (info carries an 80px margin-top) */
  inset: 0 0 -80px 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
/* tilted, oversized inner plane so the 10deg rotation never exposes
   the corners; columns drift up/down in alternation */
.photo-bg-tilt {
  position: absolute;
  left: -15%;
  top: -260px;
  width: 130%;
  height: calc(100% + 520px);
  transform: rotate(-10deg);
  display: flex;
  justify-content: center;
  gap: 20px;
}
/* columns move with the scroll (parallax): --photo-par is set from
   main.js and each column multiplies it by its own factor (--par-f),
   negative for odd columns and positive for even ones, so neighbours
   slide in opposite directions. */
.photo-col {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  transform: translateY(calc(var(--photo-par, 0px) * var(--par-f, 1)));
  will-change: transform;
}

.photo-bg img {
  object-fit: cover;
  filter: grayscale(1);
  opacity: 0.85;
  margin-bottom: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .photo-col { transform: none; }
}

/* near-opaque white panel keeping the ticket copy readable */
.tickets-panel {
  max-width: 880px;
  margin: 0 auto;
  padding: 60px 40px 65px;
  background: rgba(252, 252, 252, 0.9);
}

.tickets-lead {
  font-size: 17px;
  font-weight: 700;
  line-height: 2;
  margin-top: 55px;
}

.ticket-prices {
  margin-top: 30px;
  list-style: none;
}

.ticket-prices li {
  font-size: 18px;
  font-weight: 700;
  line-height: 2.2;
}

.early-bird { color: var(--red); }

.tickets-subhead {
  font-size: 15px;
  font-weight: 700;
  margin-top: 55px;
}

.ticket-perks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 40px;
  width: fit-content;
  max-width: 780px;
  margin: 28px auto 0;
  list-style: none;
  text-align: left;
}

.ticket-perks li {
  font-size: 16px;
  line-height: 1.9;
}

.tickets-note {
  font-size: 16px;
  font-weight: 700;
  margin-top: 50px;
}

.tickets .outline-btn {
  margin-top: 28px;
}

/* ============ INFO ============ */

.info {
  position: relative;
  z-index: 2;
  /* matches the paper color baked into the ripped-edge PNGs */
  background: #FDFDFD;
  margin-top: 80px;
  padding: 60px 24px 110px;
}
/* tiled ripped-paper edges: torn white over the beige above / the photo below;
   1px overlap into the white body keeps the joint seamless */
.info::before,
.info::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 80px;
  background-repeat: repeat-x;
  background-size: 440px 80px;
  pointer-events: none;
}
.info::before {
  bottom: calc(100% - 1px);
  background-image: url("assets/ripped-top.png");
}
.info::after {
  top: calc(100% - 1px);
  background-image: url("assets/ripped-bottom.png");
}

.info-table {
  max-width: 690px;
  margin: 65px auto 0;
}

.info-row {
  display: grid;
  grid-template-columns: 175px 1fr;
  padding: 24px 0;
  border-bottom: 1px solid #E3E0DB;
}
.info-row:last-child { border-bottom: none; }

.info-row dt {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 0 0 60px;
}

.info-row dd {
  font-size: 14px;
  line-height: 1.95;
}
.info-row dd strong { font-weight: 700; }
.info-row dd a { text-underline-offset: 3px; }

/* ============ GALLERY ============ */

.gallery {
  padding: 150px 0 90px;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  width: max-content;
  animation: gallery-scroll 55s linear infinite;
}
.gallery:hover .gallery-track { animation-play-state: paused; }

.gallery-track img {
  height: 300px;
  width: auto;
  margin-right: 16px;
  display: block;
}

@keyframes gallery-scroll {
  to { transform: translateX(-50%); }
}

@media (max-width: 640px) {
  .gallery { padding: 120px 0 60px; }
  .gallery-track img { height: 200px; margin-right: 10px; }
  .gallery-track { animation-duration: 40s; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-track { animation: none; }
  .gallery { overflow-x: auto; }
}

/* ============ FOOTER ============ */

.site-footer {
  background: var(--black);
  color: var(--white);
}
/* the audience photo closes the page. Its top is transparent, so it is
   pulled up over the content block and the dark background shows
   through the silhouettes for a seamless blend. */
.site-footer > img {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  margin-top: -14vw;
  pointer-events: none;
}

/* sits directly under INFO, so its top edge tucks beneath the
   ripped-bottom strip INFO paints over it */
.footer-content {
  padding: 110px 24px 110px;
  text-align: center;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.footer-heading--archives { margin-top: 80px; }

.footer-logo {
  display: inline-block;
  margin: 34px 0 44px;
}
.footer-logo img { display: block; width: min(380px, 76vw); }

.footer-sns {
  display: flex;
  justify-content: center;
  gap: 30px;
  list-style: none;
}
.footer-sns a {
  display: block;
  padding: 4px;
}
.sns-icon {
  display: block;
  width: 26px;
  height: 26px;
  background: var(--white);
  -webkit-mask: no-repeat center / contain;
  mask: no-repeat center / contain;
  transition: background 0.15s ease;
}
.footer-sns a:hover .sns-icon,
.footer-sns a:focus-visible .sns-icon { background: var(--yellow); }
.sns-icon--x { -webkit-mask-image: url("assets/icon-x.svg"); mask-image: url("assets/icon-x.svg"); }
.sns-icon--instagram { -webkit-mask-image: url("assets/icon-instagram.svg"); mask-image: url("assets/icon-instagram.svg"); }
.sns-icon--facebook { -webkit-mask-image: url("assets/icon-facebook.svg"); mask-image: url("assets/icon-facebook.svg"); }
.sns-icon--linkedin { -webkit-mask-image: url("assets/icon-linkedin.svg"); mask-image: url("assets/icon-linkedin.svg"); }
.sns-icon--youtube { -webkit-mask-image: url("assets/icon-youtube.svg"); mask-image: url("assets/icon-youtube.svg"); }

.footer-archives {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: 26px;
  list-style: none;
}
.footer-archives a {
  font-family: var(--font-display);
  font-size: 18px;
  text-decoration: none;
}
.footer-archives a:hover,
.footer-archives a:focus-visible { color: var(--yellow); }

.copyright {
  margin-top: 80px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 110px 24px calc(var(--edge-h) * 0.6);
  }
  .hero-title {
    grid-row: auto;
    margin-top: 20px;
    width: 100%;
    max-width: 620px;
  }
  /* the tape links are a right-edge motif — hide them once the
     layout stacks; the menu covers the same destinations */
  .hero-actions { display: none; }
  .hero-dates {
    justify-self: center;
    margin: 60px 0 0;
  }

  .about-inner { min-height: 0; }
  .about-text { max-width: 640px; padding-bottom: 30px; }
  .about-collage {
    position: static;
    width: 100%;
    max-width: 740px;
    margin: 0 auto;
  }

  .theme-cards {
    grid-template-columns: 1fr;
    max-width: 480px;
    gap: 240px;
  }

  .wanted-cols { grid-template-columns: 1fr; gap: 100px; }

  .menu-toggle { display: block; }
  .site-nav {
    display: block;
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: var(--black);
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s;
  }
  .site-nav.is-open {
    transform: translateY(0);
    visibility: visible;
  }
  .site-nav ul {
    list-style: none;
    padding: 28px 0;
  }
  .site-nav a {
    display: block;
    padding: 16px 44px;
    color: var(--white);
    font-family: var(--font-display);
    font-size: 22px;
    text-transform: uppercase;
    text-decoration: none;
  }
  .site-nav a:hover { color: var(--yellow); }
}

@media (max-width: 640px) {
  .site-header { padding: 22px 24px 0; }
  .hashtag { font-size: 18px; }
  .hero-dates { padding: 24px 26px 22px; }
  .theme-cards { gap: 210px; }
  .pin { margin-top: -150px; }
  .card { padding: 4px 26px 40px; }
  .outline-btn { font-size: 20px; min-height: 68px; }
  .info-row { grid-template-columns: 1fr; gap: 8px; }
  .info-row dt { padding-left: 0; }
  .ticket-perks { grid-template-columns: 1fr; }
}

/* ============ LANGUAGE SWITCHER ============ */

.header-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}
.lang-switch {
  display: flex;
  border: 3px solid var(--black);
  background: var(--beige);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1;
}
.lang-switch a {
  display: block;
  padding: 8px 11px;
  color: var(--black);
  text-decoration: none;
}
.lang-switch a[aria-current="page"] {
  background: var(--black);
  color: var(--beige);
}
/* keep the dark menu icon legible over dark collage areas, matching the
   hashtag's white-outline treatment */
.menu-toggle img {
  filter: drop-shadow(0 0 1.5px var(--beige)) drop-shadow(0 0 1.5px var(--beige));
}
@media (max-width: 768px) {
  .site-header { gap: 12px; }
  .header-tools { gap: 10px; }
  .lang-switch { font-size: 13px; border-width: 2px; }
  .lang-switch a { padding: 6px 8px; }
}
