/* ==========================================================================
   Chiara Ferraresi - Official Website
   100% DM Sans Typography, Header Titlebar & Responsive Fullscreen Layout
   ========================================================================== */

/* 1. Design System & Global Font Setup */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
  --color-bg-dark: #07080a;
  --color-gold-primary: #d4af37;
  --color-gold-light: #f5e6b3;
  --color-gold-glow: rgba(212, 175, 55, 0.4);
  --color-text-main: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.82);
  --color-text-subtle: rgba(255, 255, 255, 0.65);

  --titlebar-bg: rgba(10, 12, 17, 0.86);
  --footer-bg: rgba(10, 12, 17, 0.88);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-border-gold: rgba(212, 175, 55, 0.5);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);

  /* Exclusive Universal Font: DM Sans */
  --font-family-global: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Global Reset & Mandatory DM Sans Font Inheritance */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family-global) !important;
  font-optical-sizing: auto !important;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-bg-dark);
  font-family: var(--font-family-global) !important;
  font-optical-sizing: auto !important;
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip Link for Accessibility (WCAG 2.1 AA / EAA) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--color-gold-primary);
  color: #000000;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid #ffffff;
}

/* Focus States for Keyboard Navigation Accessibility */
:focus-visible {
  outline: 3px solid var(--color-gold-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 3. Fullscreen Responsive Background Setup */
.bg-viewport {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  background-color: var(--color-bg-dark);
}

/* Ambient Blurred Side Pillars for Desktop & Wide Screens */
.bg-ambient-blur {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  background-image: url('../images/background.jpg');
  background-size: cover;
  background-position: center 35%;
  filter: blur(45px) brightness(0.25) contrast(1.1);
  transform: scale(1.08);
  z-index: 1;
}

/* Main Foreground Photo Container */
.bg-photo-container {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.bg-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Positioned to keep her face and piano keys clearly visible */
  object-position: 45% 30%;
  display: block;
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.9);
}

/* Desktop optimization: Side pillars prevent vertical clipping of face & keyboard */
@media (min-width: 1024px) {
  .bg-photo {
    width: auto;
    max-width: 1100px;
    height: 100vh;
    object-fit: contain;
    object-position: center;
  }
}

/* Vignette Overlay for Contrast & Legibility */
.vignette-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    transparent 35%,
    rgba(7, 8, 10, 0.45) 70%,
    rgba(7, 8, 10, 0.88) 100%
  );
}

/* 4. Top Attached Titlebar (Header) - Desktop Base Styles */
.header-titlebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--titlebar-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  padding: 0.85rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* Center Identity Container */
.titlebar-center {
  grid-column: 2;
  text-align: center;
}

.artist-name {
  font-size: clamp(1.25rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-main);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.artist-subtitle {
  font-size: clamp(0.75rem, 2vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: lowercase;
  color: var(--color-gold-light);
  margin-top: 0.25rem;
  text-shadow: 0 0 12px var(--color-gold-glow);
}

/* Right Social Icons Navigation */
.titlebar-right {
  grid-column: 3;
  justify-self: end;
}

.social-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Icon-Only Buttons */
.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-text-main);
  text-decoration: none;
  transition: all 0.3s var(--transition-smooth);
}

.social-icon-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--glass-border-gold);
  color: var(--color-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 12px var(--color-gold-glow);
}

.social-svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.social-icon-btn:hover .social-svg {
  transform: scale(1.12);
}

/* --------------------------------------------------------------------------
   Responsive Mobile & Vertical Portrait Layout (Enhanced Breathing Room)
   -------------------------------------------------------------------------- */
@media (max-width: 640px), (orientation: portrait) and (max-width: 768px) {
  .header-titlebar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.95rem 1.25rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 94px; /* Generous height allowing icons to sit comfortably */
  }

  .titlebar-left {
    display: none;
  }

  .titlebar-center {
    width: 100%;
    padding-right: 50px; /* Offsets text away from the stacked icons */
    padding-left: 0.25rem;
    text-align: center;
  }

  .artist-name {
    font-size: clamp(1.05rem, 4.4vw, 1.4rem);
    letter-spacing: 0.11em;
  }

  .artist-subtitle {
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    margin-top: 0.2rem;
  }

  /* Right-corner vertical stacking with comfortable top, bottom, and right padding */
  .titlebar-right {
    position: absolute;
    top: 50%;
    right: 1.1rem; /* Generous padding from the right edge of the screen */
    transform: translateY(-50%);
  }

  .social-nav {
    flex-direction: column;
    gap: 0.35rem;
  }

  .social-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
  }

  .social-svg {
    width: 16px;
    height: 16px;
  }
}

/* Desktop Padding Refinements */
@media (min-width: 769px) {
  .header-titlebar {
    padding: 1.1rem 2.5rem;
  }
}

/* 5. Fixed Bottom Copyright Footer */
.footer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--footer-bg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-top: 1px solid var(--glass-border);
  padding: 0.75rem 1.25rem;
  text-align: center;
}

.footer-text {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

/* Visually Hidden Utility Class for Screen Readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
