/* ==========================================================================
   Rebeca Neacsu — site styles
   Palette: espresso #2b2118 · brown #34271f · cream #fffbf2 · taupe #897c6b
   ========================================================================== */

:root {
  --espresso: #2b2118;
  --brown: #34271f;
  --cream: #fffbf2;
  --taupe: #897c6b;
  --nav-h: 80px;
}

/* Smooth scrolling for the scroll-down arrow (respects reduced-motion below) */
html {
  scroll-behavior: smooth;
}

/* General Reset */
html, body, h1, h2, h3, p, ul, ol, li, figure, blockquote {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Body Styling for All Pages */
body {
  font-family: 'Rubik', sans-serif;
  line-height: 1;
  color: var(--cream);
  padding-top: var(--nav-h);
  background-color: var(--espresso);
  /* Short pages (thank you, 404, contact on a tall screen): keep the footer
     at the bottom of the window instead of halfway up */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

/* --------------------------------------------------------------------------
   Page background photo
   A fixed, viewport-sized layer: the photo is always cropped to the screen,
   never stretched over a tall page, and it works on iOS (unlike
   background-attachment: fixed). Each page sets --bg and --bg-pos.
   -------------------------------------------------------------------------- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--bg);
  background-position: var(--bg-pos, center);
  background-size: cover;
  background-repeat: no-repeat;
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(43, 33, 24, var(--bg-dim, 0.25));
}

@media (max-width: 768px) {
  .page-bg {
    background-image: var(--bg-mobile, var(--bg));
    background-position: var(--bg-pos-mobile, var(--bg-pos, center));
  }

  .page-bg::after {
    background-color: rgba(43, 33, 24, var(--bg-dim-mobile, 0.6));
  }
}

/* Brand name font (Dancing Script) */
.name-script {
  font-family: 'Dancing Script', cursive;
  font-size: 5rem;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar {
  background-image: url('images/navbar.jpg');
  background-size: cover;
  background-position: center;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-size: 3rem;
}

.navbar-nav .nav-link {
  font-size: 1.25rem;
  color: var(--cream);
}

.navbar-nav .nav-link:hover {
  color: var(--taupe);
}

/* Current page: keep it readable on the photo navbar, mark it with a line */
.navbar-nav .nav-link.active {
  color: var(--cream);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.45em;
}

.navbar-nav .nav-item {
  margin: 0 0.85rem;
}

/* Phones & tablets: keep the name and the menu button on one line */
@media (max-width: 991.98px) {
  :root {
    --nav-h: 64px;
  }

  .navbar {
    padding: 0.5rem 1rem;
    min-height: var(--nav-h);
  }

  .navbar-brand {
    font-size: 2.25rem;
    padding-left: 0.25rem !important;
    margin-right: 0;
  }

  .navbar-toggler {
    border-color: rgba(255, 251, 242, 0.35);
    padding: 0.35rem 0.6rem;
  }

  .navbar-collapse {
    padding: 0.5rem 0 1rem;
  }

  .navbar-nav .nav-item {
    margin: 0.15rem 0.25rem;
  }

  .navbar-nav .nav-link {
    font-size: 1.35rem;
  }
}

.nav-icon {
  color: var(--cream);
  font-size: 1.5rem;
  text-decoration: none;
  transition: color 0.3s ease;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.6); /* makes white icons visible */
}

.nav-icon:hover {
  color: var(--taupe);
}

/* --------------------------------------------------------------------------
   Home: hero
   -------------------------------------------------------------------------- */
.main-hero {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  background-image: url('images/main_hero_mobile.jpg');
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0 1rem 3.5rem;
  position: relative;
}

/* Desktop background override */
@media (min-width: 769px) {
  .main-hero {
    background-image: url('images/main_hero.jpg');
    background-position: center center;
    background-attachment: fixed;
  }
}

/* Soft fade at the bottom of the hero so the intro text is readable */
.main-hero::before {
  content: "";
  position: absolute;
  inset: 40% 0 0 0;
  background: linear-gradient(to bottom, rgba(43, 33, 24, 0), rgba(43, 33, 24, 0.75));
  pointer-events: none;
}

.hero-intro {
  position: relative;
  text-align: center;
}

.hero-tagline {
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

@media (max-width: 576px) {
  .hero-tagline {
    font-size: 0.9rem;
    letter-spacing: 0.22em;
  }
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-cream {
  min-width: 8rem;
  padding: 0.65rem 1.5rem;
  border: 1px solid var(--cream);
  border-radius: 999px;
  color: var(--cream);
  background-color: rgba(43, 33, 24, 0.35);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-cream:hover,
.btn-cream:focus-visible {
  background-color: var(--cream);
  color: var(--espresso);
}

.btn-cream.solid {
  background-color: var(--cream);
  color: var(--espresso);
}

.btn-cream.solid:hover {
  background-color: transparent;
  color: var(--cream);
}

/* --------------------------------------------------------------------------
   Home: muted video section
   -------------------------------------------------------------------------- */
.mute-video {
  background: url('images/backdrop_mutevideo.jpg') center center / cover no-repeat;
  min-height: 100vh;
  padding: 3rem 1rem;
  position: relative;
  overflow: hidden;
}

.video-portrait {
  max-height: 90vh;
  max-width: 100%;
  height: auto;
  width: auto;
  border-radius: 1rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.video-credit {
  color: var(--brown);
  font-size: 0.9rem;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Home: music & video sections
   -------------------------------------------------------------------------- */
.music-home-section {
  position: relative;
  background-image: url('images/main_hero.jpg');
  min-height: 80vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  overflow: hidden;
}

.music-home-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(52, 39, 31, 0.6); /* dark brown overlay */
  z-index: -1;
}

.video-home-section {
  position: relative;
  background: url('images/backdrop_mutevideo.jpg') center center / cover no-repeat;
  min-height: 80vh;
  z-index: 1;
  overflow: hidden;
}

/* Phones: a photo stretched over a tall stack of cards turns into a blurry
   crop, so these sections go see-through and show the page's fixed,
   screen-sized photo layer (.page-bg) instead. */
@media (max-width: 768px) {
  .music-home-section,
  .video-home-section,
  .reels-section {
    background: transparent;
    min-height: 0;
  }

  .music-home-section::before {
    display: none;
  }
}

.section-title a,
.page-title {
  font-size: 2.5rem;
  color: var(--cream);
  text-decoration: none;
}

.section-title a:hover {
  color: var(--taupe);
}

.page-title {
  font-weight: 500;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.more-link {
  display: inline-block;
  margin-top: 2.5rem;
}

/* --------------------------------------------------------------------------
   Home: Instagram reels grid
   -------------------------------------------------------------------------- */
.reels-section {
  position: relative;
  z-index: 1;
}

/* Desktop: the fixed home photo shows through, darkened like the music section */
@media (min-width: 769px) {
  .reels-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: rgba(52, 39, 31, 0.6);
  }
}

/* Swipeable row: one reel + a peek of the next on phones, ~3 on desktop */
.reel-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0.25rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--taupe) transparent;
  -webkit-overflow-scrolling: touch;
}

.reel-item {
  flex: 0 0 340px;
  max-width: 85vw;
  scroll-snap-align: start;
}

/* Instagram's embed.js sizes the iframe; soften its white frame a little */
.reel-item .instagram-media,
.reel-item iframe {
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35) !important;
}

/* Before embed.js loads (or if it is blocked): a simple link card */
.reel-item blockquote.instagram-media {
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: radial-gradient(circle at 30% 20%, var(--taupe), var(--brown) 70%);
  text-align: center;
}

.reel-item blockquote.instagram-media a {
  color: var(--cream);
}

/* --------------------------------------------------------------------------
   Inner pages: shared layout
   -------------------------------------------------------------------------- */
.page {
  padding: 4rem 0 2rem;
}

@media (max-width: 768px) {
  .page {
    padding: 2rem 0 1rem;
  }
}

.page-header {
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .page-header {
    margin-bottom: 2rem;
  }

  .section-title a,
  .page-title {
    font-size: 2rem;
  }
}

/* --------------------------------------------------------------------------
   Music cards
   -------------------------------------------------------------------------- */
.music-card {
  display: flex;
  flex-direction: column;
  background-color: transparent;
  overflow: hidden;
  transition: transform 0.3s ease;
  border-radius: 1rem;
  height: 100%;
}

.music-card:hover {
  transform: scale(1.02);
}

.image-wrapper {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

/* Make sure each img fills and covers the square */
.image-wrapper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.music-card:hover .image-wrapper img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(52, 39, 31, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.music-card:hover .image-overlay,
.music-card:focus-within .image-overlay {
  opacity: 1;
}

.overlay-text-middle {
  padding: 0 1rem;
  color: var(--cream);
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.4;
}

.image-credit {
  position: absolute;
  bottom: 0.5rem;
  left: 0.75rem;
  font-size: 0.75rem;
  color: var(--cream);
}

/* Touch screens have no hover: always show the title over a soft gradient */
@media (hover: none) {
  .image-overlay {
    opacity: 1;
    justify-content: flex-end;
    padding-bottom: 2.25rem;
    background: linear-gradient(to top, rgba(43, 33, 24, 0.9) 0%, rgba(43, 33, 24, 0.55) 35%, rgba(43, 33, 24, 0) 65%);
  }

  .music-card:hover {
    transform: none;
  }
}

.card-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--cream);
}

.card-link:hover {
  color: var(--taupe);
}

/* Bar under each card (audio player / captions) */
.audio-bar {
  padding: 0.75rem 1rem;
  background-color: rgba(52, 39, 31, 0.6);
  text-align: center;
}

.audio-bar audio {
  width: 100%;
}

/* Cards in a row share one height; the bar fills the rest of each card so
   every card ends on the same rounded corner (Warrior has an extra link). */
.music-card .audio-bar:not(.credit-video-text) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Custom audio player (built by js/site.js; native controls stay as fallback) */
.player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-btn {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--cream);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  font-size: 1.35rem;
  display: grid;
  place-items: center;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.player-btn:hover,
.player-btn:focus-visible,
.player.is-playing .player-btn {
  background-color: var(--cream);
  color: var(--espresso);
}

.player-seek {
  --progress: 0%;
  flex: 1;
  min-width: 0;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 2px;
  background: linear-gradient(to right, var(--cream) var(--progress), rgba(255, 251, 242, 0.25) var(--progress));
  cursor: pointer;
}

.player-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cream);
}

.player-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
}

.player-time {
  flex: none;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
  min-width: 5.5em;
  text-align: right;
}

/* --------------------------------------------------------------------------
   Video page & video cards
   -------------------------------------------------------------------------- */
.video-wrapper {
  position: relative;
  overflow: hidden; /* lets aspect-ratio win over the thumbnail's own height */
}

.video-wrapper iframe {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.video-wrapper video,
.ratio video {
  object-fit: cover;
  object-position: center;
  background-color: #000;
}

.credit-video-text {
  font-family: 'Rubik', sans-serif;
  color: var(--cream);
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 0.75rem 1rem;
  text-align: left;
}

.credit-video-text strong {
  font-weight: 500;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Bio
   -------------------------------------------------------------------------- */
.bio-box {
  background-color: rgba(52, 39, 31, 0.75);
  font-family: 'Rubik', sans-serif;
  line-height: 1.6;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.bio-box h2 {
  margin-bottom: 1rem;
}

.bio-lead p + p {
  margin-top: 1rem;
}

.performance-list {
  list-style: none;
  columns: 2;
  column-gap: 2rem;
}

.performance-list li {
  break-inside: avoid;
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
}

.performance-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 0.5rem;
  height: 1px;
  background: var(--taupe);
}

@media (max-width: 576px) {
  .performance-list {
    columns: 1;
  }
}

.bio-full summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.bio-full summary::-webkit-details-marker {
  display: none;
}

.bio-full summary::after {
  content: "\F282"; /* bootstrap-icons chevron-down */
  font-family: 'bootstrap-icons';
  transition: transform 0.3s ease;
}

.bio-full[open] summary::after {
  transform: rotate(180deg);
}

.bio-full-body {
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-panel {
  background-color: rgba(43, 33, 24, 0.7);
  border-radius: 1rem;
  padding: 2rem;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  line-height: 1.6;
}

@media (max-width: 576px) {
  .contact-panel {
    padding: 1.5rem 1.25rem;
  }
}

.contact-intro {
  margin-bottom: 1.75rem;
}

/* Minimal fields: no boxes, just a fine line and a soft hint */
.contact-form .field {
  margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 0.6rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 251, 242, 0.35);
  border-radius: 0;
  color: var(--cream);
  font-family: 'Rubik', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  transition: border-color 0.3s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 6rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 251, 242, 0.45);
  font-weight: 300;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--cream);
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  box-shadow: 0 1px 0 0 var(--cream);
}

/* Keep autofilled fields transparent too (Chrome/Safari paint them yellow) */
.contact-form input:-webkit-autofill {
  -webkit-text-fill-color: var(--cream);
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 9999s ease-out 0s;
}

.contact-intro a {
  color: var(--cream);
}

.form-status {
  margin-top: 1rem;
  color: var(--cream);
  background-color: rgba(52, 39, 31, 0.6);
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
}

/* Visually hidden spam trap field on the contact form */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Plain text pages (privacy, thank you, 404)
   -------------------------------------------------------------------------- */
.text-panel {
  background-color: rgba(43, 33, 24, 0.75);
  border-radius: 1rem;
  padding: 2rem;
  line-height: 1.6;
}

.text-panel h2 {
  font-size: 1.35rem;
  margin: 1.75rem 0 0.75rem;
}

.text-panel p + p,
.text-panel ul {
  margin-top: 0.75rem;
}

.text-panel ul {
  padding-left: 1.25rem;
}

.text-panel a {
  color: var(--cream);
}

/* --------------------------------------------------------------------------
   Scroll arrow
   -------------------------------------------------------------------------- */
.scroll-down-arrow {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  font-size: 2rem;
  color: white;
  animation: bounce 2s infinite;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Hidden by js/site.js once the visitor has started scrolling */
.scroll-down-arrow.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 3rem 1rem 1.5rem;
  background: linear-gradient(to bottom, rgba(43, 33, 24, 0), rgba(43, 33, 24, 0.9) 45%);
}

.footer-text {
  margin-top: 1.2rem;
  margin-bottom: 0 !important;
  font-family: 'Rubik', sans-serif;
  color: var(--cream);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-text .footer-link {
  color: var(--cream);
}

.footer-text .footer-link:hover {
  color: var(--taupe);
}

/* --------------------------------------------------------------------------
   YouTube thumbnail that loads the real player on click (js/site.js)
   -------------------------------------------------------------------------- */
.yt-lite {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background-color: #000;
  cursor: pointer;
  overflow: hidden;
}

/* Inside Bootstrap's .ratio box the thumbnail must stay pinned to the frame */
.ratio > .yt-lite {
  position: absolute;
  inset: 0;
}

.yt-lite img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.yt-lite:hover img {
  transform: scale(1.03);
}

.yt-lite::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 48'%3E%3Cpath d='M66.5 7.7a8.6 8.6 0 0 0-6-6C55.2 0 34 0 34 0S12.8 0 7.5 1.6a8.6 8.6 0 0 0-6 6C0 13 0 24 0 24s0 11 1.5 16.3a8.6 8.6 0 0 0 6 6C12.8 48 34 48 34 48s21.2 0 26.5-1.6a8.6 8.6 0 0 0 6-6C68 35 68 24 68 24s0-11-1.5-16.3z' fill='%23212121' fill-opacity='.8'/%3E%3Cpath d='M45 24 27 14v20' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: filter 0.3s ease;
}

.yt-lite:hover::after,
.yt-lite:focus-visible::after {
  filter: brightness(0) saturate(100%) invert(16%) sepia(99%) saturate(7404%) hue-rotate(4deg) brightness(95%);
}

/* --------------------------------------------------------------------------
   Respect visitors who turn off animations in their OS settings
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-down-arrow {
    animation: none;
  }

  .music-card,
  .music-card:hover,
  .music-card:hover .image-wrapper img,
  .yt-lite:hover img {
    transform: none;
    transition: none;
  }
}
