/* ==========================================================================
   Suresh Maliyadde — Coming Soon · Version 2 (classic theme)
   Follows the logo guideline: Bellefair + Ropa Sans, peach #EFB6A2 on deep brown #200E0C.
   1. Tokens
   2. Base
   3. Intro
   4. Marquee
   5. Hero
   6. Socials
   7. Countdown
   8. Motion
   9. Responsive
   ========================================================================== */

/* 1. Tokens
   ========================================================================== */

:root {
  /* Brand colours from the logo guideline */
  --sm-bg: #200e0c;            /* deep brown */
  --sm-accent: #efb6a2;        /* peach */
  --sm-accent-soft: #f8dcd0;   /* lighter tint of the peach */
  --sm-text: #fdf1ec;          /* near-white tint of the peach, for body text */
  --sm-surface: rgba(239, 182, 162, 0.08);
  --sm-border: rgba(239, 182, 162, 0.42);

  /* Brand fonts from the logo guideline (400 weight only) */
  --sm-font-body: "Ropa Sans", "Segoe UI", Arial, sans-serif;
  --sm-font-display: "Bellefair", Georgia, "Times New Roman", serif;

  /* Map the tokens onto Bootstrap so its components pick them up */
  --bs-body-font-family: var(--sm-font-body);
  --bs-body-font-size: 1.125rem;
  --bs-body-font-weight: 400;
  --bs-body-bg: var(--sm-bg);
  --bs-body-color: var(--sm-text);
}

/* 2. Base
   ========================================================================== */

body {
  /* Upright figures everywhere, so "1 January 2027" does not read as a letter I */
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Inline SVG that only holds symbols and filters (display: none would disable the filter) */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Header: logo, top centre */
.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}

.site-logo {
  display: block;
  animation: marquee-in 1s ease-out both;
}

.site-logo img {
  display: block;
  width: 7.125rem;
  height: 7.5rem;
}

/* Background music toggle, top right */
.sound-toggle {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--sm-accent-soft);
  background: rgba(32, 14, 12, 0.5);
  border: 1px solid var(--sm-border);
  border-radius: 50%;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  background: rgba(239, 182, 162, 0.16);
  border-color: var(--sm-accent);
}

/* Equaliser bars: flat when off, dancing when on */
.sound-toggle_bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 1rem;
}

.sound-toggle_bars span {
  width: 2px;
  height: 100%;
  background: currentColor;
  border-radius: 1px;
  transform: scaleY(0.2);
  transform-origin: bottom;
  transition: transform 0.3s ease;
}

.sound-toggle.is-playing .sound-toggle_bars span {
  background: var(--sm-accent);
  animation: equalise 0.9s ease-in-out infinite alternate;
}

.sound-toggle.is-playing .sound-toggle_bars span:nth-child(2) { animation-delay: -0.3s; }
.sound-toggle.is-playing .sound-toggle_bars span:nth-child(3) { animation-delay: -0.6s; }
.sound-toggle.is-playing .sound-toggle_bars span:nth-child(4) { animation-delay: -0.15s; }

/* 3. Intro
   ========================================================================== */

/* Hidden unless JavaScript is running (the "js" class is set in the <head>) */
.intro {
  display: none;
}

.js .intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  background: radial-gradient(120% 90% at 50% 115%, #573028 0%, #331814 34%, var(--sm-bg) 70%);
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 0.8s ease;
}

.js .intro[hidden] {
  display: none;
}

/* Leaving: fade out and drift forward */
.is-entered .intro {
  visibility: hidden;
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

/* No page scroll behind the intro */
.js:not(.is-entered) body {
  overflow: hidden;
}

.intro_logo {
  width: 7.125rem;
  height: 7.5rem;
  margin-bottom: 3rem;
}

.intro_play {
  position: relative;
  display: grid;
  place-items: center;
  width: 6.5rem;
  height: 6.5rem;
  padding: 0 0 0 0.25rem; /* optical centring of the triangle */
  color: var(--sm-accent-soft);
  background: rgba(239, 182, 162, 0.08);
  border: 1.5px solid var(--sm-accent);
  border-radius: 50%;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.intro_play:hover,
.intro_play:focus-visible {
  color: var(--sm-bg);
  background: var(--sm-accent);
  transform: scale(1.06);
}

/* Rings rippling out from the button */
.intro_play::before,
.intro_play::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(239, 182, 162, 0.6);
  border-radius: 50%;
  animation: ripple 2.4s ease-out infinite;
  pointer-events: none;
}

.intro_play::after {
  animation-delay: 1.2s;
}

.intro_hint {
  margin: 2.25rem 0 0;
  color: var(--sm-accent);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.intro_skip {
  margin-top: 0.875rem;
  padding: 0.5rem 0.75rem;
  color: rgba(253, 241, 236, 0.62);
  font-size: 1.0625rem;
  text-decoration: underline;
  text-decoration-color: var(--sm-border);
  text-underline-offset: 0.3em;
  background: none;
  border: 0;
  transition: color 0.25s ease;
}

.intro_skip:hover,
.intro_skip:focus-visible {
  color: var(--sm-text);
}

/* 4. Marquee
   ========================================================================== */

.marquee {
  position: absolute;
  top: 8.25rem;
  left: 0;
  z-index: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  /* Soft fade at both edges */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  animation: marquee-in 1.4s ease-out both;
}

.marquee_track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 48s linear infinite;
  will-change: transform;
}

.marquee_group {
  display: flex;
  flex-shrink: 0;
}

.marquee_item {
  display: flex;
  align-items: center;
  color: var(--sm-accent-soft);
  font-family: var(--sm-font-display);
  font-size: clamp(3.25rem, 10vw, 10rem);
  font-weight: 400;
  line-height: 1.15;
  white-space: nowrap;
  opacity: 0.07;
}

/* Separator between names: a small peach diamond */
.marquee_item::after {
  content: "";
  width: 0.13em;
  height: 0.13em;
  margin-inline: 0.5em;
  background: var(--sm-accent);
  transform: rotate(45deg);
}

/* Every other name is stroke-only */
.marquee_item_outline {
  filter: url("#text-outline");
  opacity: 0.26;
}

.marquee_item_outline::after {
  visibility: hidden;
}

/* 5. Hero
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    #150908 0%,
    var(--sm-bg) 40%,
    #2e1613 68%,
    #40211c 88%,
    #573028 100%
  );
}

/* Piano photo (hands on the keys) on the right, tinted by the brand brown behind it
   (luminosity blend). It is a portrait
   image, so it sits in a narrower column and fades out on the left, top and bottom. */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  width: 48%;
  height: 100%;
  background: url("../images/piano-2.jpg") center / cover no-repeat;
  opacity: 0.55;
  mix-blend-mode: luminosity;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to left, #000 45%, transparent), linear-gradient(to bottom, transparent, #000 22%, #000 62%, transparent 96%);
  mask-image: linear-gradient(to left, #000 45%, transparent), linear-gradient(to bottom, transparent, #000 22%, #000 62%, transparent 96%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* Main area: two equal columns, vertically centred in the space under the header */
.hero_main {
  position: relative;
  z-index: 4;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  padding-block: 2rem 2rem;
}

/* Headline */
.hero_headline {
  --headline-size: clamp(2.5rem, 6.2vw, 6.5rem);
  position: relative;
  margin-bottom: 1.75rem;
}

.hero_title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--sm-accent);
  font-family: var(--sm-font-display);
  font-size: var(--headline-size);
  font-weight: 400;
  line-height: 1.04;
  white-space: nowrap;
}

.hero_line {
  display: block;
}

/* Staff: five thin peach rules behind the headline, like sheet music, with a few
   notes in the space to the right of the last line */
.staff {
  position: absolute;
  top: 7%;
  bottom: 7%;
  left: 0;
  z-index: 0;
  width: 100%;
  font-size: calc(var(--headline-size) * 0.68);
  pointer-events: none;
  user-select: none;
}

/* The rules run the full width of the screen: four from the repeating background,
   the fifth is the bottom border */
.staff::before {
  content: "";
  position: absolute;
  top: 0;
  right: -100vw;
  bottom: 0;
  left: -100vw;
  background: linear-gradient(to bottom, var(--sm-accent) 1px, transparent 1px) 0 0 / 100% 25%;
  border-bottom: 1px solid var(--sm-accent);
  opacity: 0.16;
  animation: staff-in 1.6s ease-out both;
}

/* Notes: --x is the position along the headline's width, --y the line or space
   (0% = top line, 100% = bottom line). The shift puts the note head on that line. */
.staff_note {
  position: absolute;
  top: var(--y);
  left: var(--x);
  color: var(--sm-accent);
  font-family: Arial, sans-serif;
  line-height: 1;
  opacity: 0.22;
  transform: translate(-50%, -78%);
  animation: note-in 1.2s ease-out 0.5s backwards;
}

/* Record player: fills the right column, above the staff lines that pass behind it */
.hero_visual {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: 36rem;
  height: auto;
  margin-inline: auto;
  aspect-ratio: 1;
  pointer-events: none;
  user-select: none;
}

/* Record: spins only while the music is playing ("is-music-on" is set on <html> by main.js).
   SVG transform origins are in the illustration's own coordinates. */
.record_disc {
  transform-origin: 450px 540px;
  animation: record-spin 5s linear infinite;
  animation-play-state: paused;
}

.is-music-on .record_disc {
  animation-play-state: running;
}

/* Tonearm: parked beside the record, swings onto it when the music starts */
.record_arm {
  transform: rotate(-31deg);
  transform-origin: 880px 150px;
  transition: transform 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.is-music-on .record_arm {
  transform: rotate(0deg);
}

/* Wave lines echoing the logo, behind the bottom content */
.waves {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 44%;
  opacity: 0.32;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%);
  mask-image: linear-gradient(180deg, transparent, #000 35%);
}

.hero_text {
  max-width: 30rem;
  margin: 0 0 2rem;
  color: rgba(253, 241, 236, 0.92);
  font-size: 1.25rem;
  line-height: 1.5;
}

/* Launch date: its own line under the intro copy */
.hero_text_date {
  display: block;
  margin-top: 0.75rem;
}

/* Social links block, under the countdown */
.hero_follow {
  margin-top: 1.25rem;
}

/* Copyright line at the very bottom */
.site-footer {
  position: relative;
  z-index: 4;
  padding: 0 1rem 1.25rem;
  text-align: center;
}

.site-footer_text {
  margin: 0;
  color: rgba(253, 241, 236, 0.65);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* 6. Socials
   ========================================================================== */

/* Same treatment as the countdown label so the two bottom corners match */
.socials_label {
  margin: 0 0 0.875rem;
  color: var(--sm-accent);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.socials_link {
  display: block;
  padding: 0.5rem 1.125rem;
  color: var(--sm-text);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
  background: rgba(32, 14, 12, 0.45);
  border: 1px solid var(--sm-border);
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.socials_link:hover,
.socials_link:focus-visible {
  color: var(--sm-bg);
  background: var(--sm-accent);
  border-color: var(--sm-accent);
}

/* 7. Countdown
   ========================================================================== */

.countdown {
  width: fit-content;
  max-width: 100%;
}

.countdown_label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 0.875rem;
  color: var(--sm-accent);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.countdown_clock {
  flex-shrink: 0;
}

/* Minute hand sweeps round the clock face */
.countdown_clock-hand {
  transform-origin: 12px 12px;
  animation: clock-sweep 6s linear infinite;
}

.countdown_grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--sm-border);
}

.countdown_unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 6rem;
  padding: 1rem 0.5rem 0.875rem;
  overflow: hidden;
}

/* Thin rule between the units */
.countdown_unit + .countdown_unit {
  border-left: 1px solid var(--sm-border);
}

.countdown_value {
  font-family: var(--sm-font-display);
  font-size: clamp(2.25rem, 3.6vw, 3.25rem);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.02em;
}

.countdown_value.is-ticking {
  animation: tick 0.35s ease-out;
}

.countdown_name {
  margin-top: 0.5rem;
  color: var(--sm-accent);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Launch reached: swap the tiles for the live message */
.countdown_live {
  display: none;
  margin: 0;
  color: var(--sm-accent);
  font-family: var(--sm-font-display);
  font-size: 2.25rem;
  font-weight: 400;
}

.countdown.is-live .countdown_label,
.countdown.is-live .countdown_grid {
  display: none;
}

.countdown.is-live .countdown_live {
  display: block;
}

/* 8. Motion
   ========================================================================== */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-1.5%);
  }
}

@keyframes equalise {
  from {
    transform: scaleY(0.25);
  }
  to {
    transform: scaleY(1);
  }
}

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

@keyframes marquee-in {
  from {
    opacity: 0;
    transform: translateY(-1rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tick {
  from {
    opacity: 0;
    transform: translateY(-40%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes record-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes staff-in {
  from {
    opacity: 0;
    transform: scaleX(0.4);
  }
}

@keyframes note-in {
  from {
    opacity: 0;
  }
}

@keyframes ripple {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.9);
  }
}

@keyframes clock-sweep {
  to {
    transform: rotate(360deg);
  }
}

.hero_line {
  animation: fade-up 0.8s ease-out both;
}

.hero_line:nth-child(2) { animation-delay: 0.1s; }
.hero_line:nth-child(3) { animation-delay: 0.2s; }

.hero_visual {
  animation: float 4s ease-in-out infinite alternate;
}

/* Hold the entrance animations until the visitor leaves the intro */
.js:not(.is-entered) .site-logo,
.js:not(.is-entered) .marquee,
.js:not(.is-entered) .staff::before,
.js:not(.is-entered) .staff_note,
.js:not(.is-entered) .hero_line {
  animation-play-state: paused;
}

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

  .record_arm {
    transition: none;
  }

  .intro_play::before,
  .intro_play::after,
  .site-logo,
  .sound-toggle.is-playing .sound-toggle_bars span,
  .marquee,
  .marquee_track,
  .staff::before,
  .staff_note,
  .hero_line,
  .hero_visual,
  .countdown_clock-hand,
  .countdown_value.is-ticking {
    animation: none;
  }
}

/* 9. Responsive
   ========================================================================== */

/* Below lg the two columns stack: record player first, then the text */
@media (max-width: 991.98px) {
  .hero_main {
    padding-block: 1.5rem 2rem;
  }

  .hero_headline {
    --headline-size: clamp(2.5rem, 10.5vw, 5.5rem);
  }

  .hero_visual {
    max-width: min(26rem, 82vw);
  }
}

@media (max-width: 767.98px) {
  /* Phones: the photo spans the full width */
  .hero::before {
    width: 100%;
    opacity: 0.4;
  }

  .site-logo img {
    width: 5.7rem;
    height: 6rem;
  }

  .marquee {
    top: 7rem;
  }

  .sound-toggle {
    top: 1rem;
    right: 1rem;
  }

  .hero_main {
    padding-block: 1rem 1.5rem;
  }

  .hero_text {
    font-size: 1.125rem;
  }

  .countdown {
    width: 100%;
  }

  .countdown_unit {
    min-width: 0;
  }
}
