/* ==========================================================================
   TAFANEE Landing Page Stylesheet
   Design Reference: Figma DykyWiiGsV9vCoxoxAjA4B (node 2209:206)
   Water Ripple FX: Almer Thie (https://code.almeros.com)
   Deep Sea Audio: Web Audio API Procedural Engine
   ========================================================================== */

:root {
  --brand-ruby: #BD365F;
  --text-white: #FFFFFF;
  --text-white-subtle: rgba(255, 255, 255, 0.96);

  --font-heading: 'Cabin Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Fluid scale: 1920px -> 32px, 375px -> ~18px */
  --font-size-heading: clamp(1.25rem, 1.667vw, 2rem);
  --font-size-body: clamp(1.125rem, 1.667vw, 2rem);

  --line-height-heading: 1.15;
  --line-height-body: 1.25;

  /* In Figma: 22px vertical gap between heading and paragraph */
  --gap-heading-body: clamp(14px, 1.15vw, 22px);

  /* Horizontal alignment offset matching Figma (x=696.5 vs x=379.45 = 27.3%) */
  --text-indent-offset: 27.3%;
}

/* --------------------------------------------------------------------------
   Global Reset & Defaults
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--brand-ruby);
  color: var(--text-white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: default;
}

/* --------------------------------------------------------------------------
   Almeros Water Ripple Canvas Layer
   -------------------------------------------------------------------------- */
#water-holder {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

#water-holder canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   Deep Sea Sound Floating Button
   -------------------------------------------------------------------------- */
.sound-control {
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.sound-control:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.sound-control:active {
  transform: translateY(1px);
}

.sound-wave-icon {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.sound-wave-icon .bar {
  display: block;
  width: 2px;
  background: var(--text-white);
  border-radius: 2px;
  height: 3px;
  transition: height 0.3s ease;
}

/* Animated Soundwave Rhythm when playing */
.sound-control.playing .bar-1 {
  animation: wavePulse 1.2s infinite ease-in-out;
}
.sound-control.playing .bar-2 {
  animation: wavePulse 1.2s infinite ease-in-out 0.2s;
}
.sound-control.playing .bar-3 {
  animation: wavePulse 1.2s infinite ease-in-out 0.4s;
}
.sound-control.playing .bar-4 {
  animation: wavePulse 1.2s infinite ease-in-out 0.1s;
}

@keyframes wavePulse {
  0%, 100% { height: 3px; }
  50% { height: 13px; }
}

/* --------------------------------------------------------------------------
   Stage & Main Layout
   -------------------------------------------------------------------------- */
.landing-stage {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1920px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 5vw, 6rem) clamp(1.5rem, 6vw, 6rem);
}

.content-container {
  width: 100%;
  max-width: 1161px;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Logo Section
   -------------------------------------------------------------------------- */
.logo-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.brand-logo {
  width: 100%;
  max-width: 1161px;
  height: auto;
  aspect-ratio: 1161 / 304;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.16));
}

/* --------------------------------------------------------------------------
   Phrases Section
   -------------------------------------------------------------------------- */
.phrases-wrapper {
  margin-top: clamp(10px, 1.2vw, 24px);
  margin-left: var(--text-indent-offset);
  display: flex;
  flex-direction: column;
}

.headline {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--font-size-heading);
  line-height: var(--line-height-heading);
  letter-spacing: 0;
  color: var(--text-white);
  margin-bottom: var(--gap-heading-body);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.description-block {
  display: flex;
  flex-direction: column;
}

.description-line {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--text-white-subtle);
  white-space: normal;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */

/* Tablet and Smaller Desktops (< 960px) */
@media (max-width: 960px) {
  :root {
    --text-indent-offset: 18%;
  }

  .landing-stage {
    padding: 3rem 2rem;
  }
}

/* Mobile Devices (< 680px) */
@media (max-width: 680px) {
  :root {
    --text-indent-offset: 0;
    --font-size-heading: clamp(1.15rem, 5.2vw, 1.5rem);
    --font-size-body: clamp(1rem, 4.4vw, 1.35rem);
    --line-height-body: 1.35;
  }

  .landing-stage {
    padding: 2.5rem 1.25rem;
    align-items: center;
  }

  .content-container {
    align-items: stretch;
  }

  .logo-wrapper {
    margin-bottom: 0.5rem;
  }

  .phrases-wrapper {
    margin-left: 0;
    text-align: left;
    margin-top: 1.5rem;
  }

  .headline {
    margin-bottom: 14px;
  }

  .description-line {
    margin-bottom: 4px;
  }

  .sound-control {
    bottom: 16px;
    right: 16px;
    padding: 6px 12px;
    font-size: 0.7rem;
  }
}

/* Extra Small Phones (< 380px) */
@media (max-width: 380px) {
  .landing-stage {
    padding: 2rem 1rem;
  }

  :root {
    --font-size-heading: 1.1rem;
    --font-size-body: 0.95rem;
  }
}

/* --------------------------------------------------------------------------
   Accessibility & Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #water-holder {
    display: none !important;
  }

  .sound-control.playing .bar {
    animation: none !important;
    height: 8px !important;
  }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }

  #water-holder, .sound-control {
    display: none !important;
  }

  .brand-logo {
    filter: invert(1);
  }

  .headline, .description-line {
    color: #000000 !important;
    text-shadow: none !important;
  }
}
