/* ========================================================================== */
/* Lenko Studio — Mobile-first, accessible, high-contrast styles              */
/* Professional divisions for easy reading and maintenance                     */
/* ========================================================================== */

/* 1) Design Tokens ---------------------------------------------------------- */
:root {
  /* Dark theme colors */
  --bg: #0a0a0a;
  --bg-elevated: #1a1a1a;
  --bg-card: #141414;
  --fg: #ffffff;
  --fg-muted: #a0a0a0;
  --fg-subtle: #6b6b6b;
  
  /* Accent colors */
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-light: rgba(59, 130, 246, 0.1);
  
  /* UI elements */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --focus: #ff4d8f;
  
  /* Header */
  --header-bg: rgba(10, 10, 10, 0.2);
  --header-border: rgba(255, 255, 255, 0.06);
  
  /* Buttons */
  --btn-primary-bg: #ffffff;
  --btn-primary-fg: #000000;
  --btn-primary-hover: #f0f0f0;
  --btn-secondary-bg: rgba(255, 255, 255, 0.08);
  --btn-secondary-hover: rgba(255, 255, 255, 0.15);
  
  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.7);
}

/* 2) Base / Reset ----------------------------------------------------------- */
* { 
  box-sizing: border-box; 
  -webkit-tap-highlight-color: transparent;
}
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { 
  max-width: 100%; 
  height: auto; 
  display: block; 
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; color: inherit; }

/* 3) Accessibility: Skip Link & Focus -------------------------------------- */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--focus); }

/* Visually hidden text (screen-reader only) */
.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;
}

/* 4) Header / Navigation ---------------------------------------------------- */
/* Avoid `display: contents` for better assistive-tech compatibility. */
site-header, site-footer { display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
  transition: all 0.3s ease;
}
.site-nav { display: flex; align-items: center; gap: var(--space-lg); }
.brand { 
  font-weight: 700; 
  letter-spacing: 0.03em; 
  font-size: 1.125rem;
  transition: color 0.2s ease;
}
.brand:hover {
  color: var(--accent);
  text-decoration: none;
}
.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: var(--space-sm); overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list a { 
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md); 
  border-radius: var(--radius-sm); 
  white-space: nowrap;
  transition: all 0.2s ease;
  font-size: 0.9375rem;
  min-height: 44px;
}
.nav-list a:hover { 
  background: var(--btn-secondary-hover); 
  text-decoration: none; 
}
.nav-list a[aria-current="page"] {
  background: var(--btn-secondary-bg);
  color: var(--accent);
}
.adam-link { 
  color: var(--accent); 
  font-weight: 600;
}

/* Header actions container */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  justify-self: end;
}

/* Hide mobile actions on desktop */
.header-actions--mobile {
  display: none;
}

/* Show desktop actions */
.header-actions--desktop {
  display: flex;
}

/* Language toggle button */
.sound-toggle {
  background: var(--btn-secondary-bg);
  border: 1px solid var(--border);
  padding: var(--space-xxs) var(--space-xs);
  border-radius: calc(var(--radius-sm) / 2);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.78rem;
  min-width: 74px;
  text-align: center;
  justify-self: end;
  align-self: center;
  line-height: 1;
}
.sound-toggle:hover { 
  background: var(--btn-secondary-hover);
  border-color: var(--border-hover);
}
  color: var(--text-primary);
  white-space: nowrap;
}
.lang-toggle:hover {
  background: var(--btn-secondary-hover);
  border-color: var(--border-hover);
}
.lang-icon {
  font-size: 1.125rem;
  line-height: 1;
}
.lang-code {
  font-weight: 600;
  font-family: monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
}

/* Sound toggle button */
.sound-toggle {
  background: var(--btn-secondary-bg);
  border: 1px solid var(--border);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}
.sound-toggle:hover { 
  background: var(--btn-secondary-hover);
  border-color: var(--border-hover);
}

/* Mobile hamburger menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-sm);
  cursor: pointer;
  position: relative;
  z-index: 96;
  width: 44px;
  height: 44px;
}
.menu-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 2px;
  background: var(--fg);
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* Hamburger default (3 lines) */
.menu-toggle span:nth-child(1) { transform: translateY(-8px); }
.menu-toggle span:nth-child(2) { transform: translateY(0); }
.menu-toggle span:nth-child(3) { transform: translateY(8px); }

/* Hamburger open (X centered) */
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); }

@media (max-width: 768px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }
  .menu-toggle {
    display: block;
    order: -1;
  }
  .site-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-elevated);
    padding: var(--space-3xl) 0;
    transition: left 0.3s ease;
    z-index: 90;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2xl);
  }

  /* Mobile menu: make the brand feel like a big button */
  .site-nav .brand {
    width: 100%;
    display: block;
    padding: var(--space-lg) var(--space-lg);
    margin-top: var(--space-lg);
  }

  /* Keep menu readable and consistent */
  .site-nav,
  .site-nav a,
  .site-nav .brand {
    color: var(--fg);
  }
  .site-nav.is-open {
    left: 0;
    box-shadow: var(--shadow-lg);
  }
  .brand {
    font-size: 1.5rem;
  }
  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: var(--space-sm);
  }
  .nav-list a {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: var(--space-lg) var(--space-lg);
    font-size: 1.25rem;
    line-height: 1.2;
    min-height: 64px;
    border-radius: 0;
  }

  /* Mobile: remove rounded corners from header actions */
  .header-actions--mobile {
    display: flex;
    gap: 0;
    width: 100%;
    flex-direction: column;
    margin-top: var(--space-lg);
  }
  
  .header-actions--desktop {
    display: none;
  }
  
  .lang-toggle,
  .sound-toggle {
    border-radius: 0;
    justify-content: center;
    padding: var(--space-md) var(--space-lg);
  }

  .lang-toggle {
    width: 100%;
  }

  .sound-toggle {
    width: auto;
    min-width: 74px;
    border-radius: calc(var(--radius-sm) / 2);
    align-self: center;
    justify-self: end;
    padding: var(--space-xxs) var(--space-sm);
  }
  /* Overlay when menu is open */
  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* Must sit UNDER the header/menu so it doesn't cover the panel */
    z-index: 70;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .menu-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
  }
  /* On reduced motion, ensure overlay is never invisible by default */
  @media (prefers-reduced-motion: reduce) {
    .menu-overlay:not(.is-visible) {
      display: none;
    }
  }
}

/* 5) Hero (video, scrim, content) ------------------------------------------ */
.hero { 
  position: relative; 
  min-height: 100svh; 
  display: grid;
  place-items: center;
  overflow: hidden;
}
.video-wrap { 
  position: absolute; 
  inset: 0; 
  overflow: hidden; 
  z-index: 0; 
}
#bgVideo { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  filter: grayscale(1);
  transition: filter 900ms ease;
}
body.stage-2 #bgVideo {
  filter: grayscale(0);
}
.scrim { 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(
    180deg, 
    rgba(10,10,10,0.2), 
    rgba(10,10,10,0.05) 40%, 
    rgba(10,10,10,0.25)
  ); 
  pointer-events: none; 
  z-index: 1; 
}

/* Grid overlay (texture) sits above video, below content */
.grid-overlay { 
  position: absolute; 
  inset: 0; 
  z-index: 2; 
  background: url('media/texture.png') repeat; 
  opacity: 1; 
  pointer-events: none; 
  mix-blend-mode: overlay;
}

.hero-content {
  position: relative; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-lg); 
  gap: var(--space-3xl);
  width: 100%;
  margin: 0 auto;
}

/* 5.1) Hero Title ----------------------------------------------------------- */
.intro-title {
  position: relative; 
  z-index: 40;
  font-size: 3rem; 
  font-weight: 200; 
  letter-spacing: 0.08em; 
  text-align: center; 
  cursor: pointer;
  color: #ffffff;
  padding-right: 0.08em;
  text-shadow: 
    0 0 30px rgba(0,0,0,1),
    0 0 50px rgba(0,0,0,0.9),
    0 0 70px rgba(0,0,0,0.8),
    0 4px 8px rgba(0,0,0,1),
    0 0 100px rgba(0,0,0,0.6);
  transition: transform 300ms ease, opacity 300ms ease, text-shadow 300ms ease, margin-bottom 2.5s ease;
  margin: 0;
  width: 100%;
}
.intro-title:hover { 
  transform: scale(1.06); 
  text-shadow: 0 0 16px rgba(255,255,255,0.95), 0 0 30px rgba(255,255,255,0.7); 
}
body.stage-2 .intro-title {
  cursor: default;
  margin-bottom: 20vh;
}
body.stage-2 .intro-title:hover {
  transform: none;
  text-shadow: 
    0 0 30px rgba(0,0,0,1),
    0 0 50px rgba(0,0,0,0.9),
    0 0 70px rgba(0,0,0,0.8),
    0 4px 8px rgba(0,0,0,1),
    0 0 100px rgba(0,0,0,0.6);
}
@media (hover: none) {
  .intro-title { animation: pulse 4s infinite ease-in-out; }
  @keyframes pulse { 0%,100%{ transform: scale(1) } 50%{ transform: scale(1.04) } }
}

/* 6) Hero CTAs -------------------------------------------------------------- */
.hero-ctas {
  display: grid; 
  gap: 0;
  width: 100vw;
  position: relative; 
  left: 50%; 
  transform: translate(-50%, 0);
  z-index: 10;
  padding-inline: 0;
  margin-top: -8vh;
  opacity: 1;
}
.cta { 
  display: block; 
  text-align: center; 
  padding: 18px 16px; 
  border-radius: 12px; 
  font-size: 1.0625rem; 
}

/* Hero CTA overrides */
.hero-ctas .cta {
  background: transparent; 
  border: none; 
  color: rgba(255,255,255,0.9);
  display: flex; 
  justify-content: center; 
  align-items: center;
  width: 100%; 
  min-height: 76px;
  letter-spacing: 0.3rem; 
  font-size: clamp(1.25rem, 6vw, 2rem); 
  font-weight: 300;
  border-radius: 0;
  text-shadow: 
    0 0 20px rgba(0,0,0,0.9),
    0 0 40px rgba(0,0,0,0.7),
    0 0 60px rgba(0,0,0,0.5),
    0 2px 4px rgba(0,0,0,1);
  transform: scale(1);
  transition: color 1s ease, opacity 1s ease, transform 1s ease, text-shadow 1s ease, background-color 1s ease;
}

.hero-ctas .cta:hover {
  color: #ffffff;
  opacity: 1;
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.55);
  text-shadow: 0 0 12px rgba(255,255,255,0.95), 0 0 24px rgba(255,255,255,0.75), 0 0 36px rgba(255,255,255,0.5);
  text-decoration: none;
}

/* 7) Floating CTA ----------------------------------------------------------- */
.floating-cta {
  position: fixed; 
  bottom: var(--space-lg); 
  left: 50%; 
  transform: translateX(-50%);
  z-index: 10; 
  padding: var(--space-md) var(--space-xl); 
  border-radius: var(--radius-full); 
  background: var(--accent); 
  color: #ffffff; 
  border: 2px solid var(--accent); 
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  transition: all 0.2s ease;
}
.floating-cta:hover { 
  background: var(--accent-hover); 
  border-color: var(--accent-hover);
  transform: translateX(-50%) translateY(-2px); 
  text-decoration: none; 
  box-shadow: 0 12px 40px rgba(0,0,0,0.8);
}

/* Full-screen black overlay (fades on click) - DISABLED ON MOBILE */
.overlay-black { 
  position: fixed; 
  inset: 0; 
  background: #000; 
  z-index: 30; 
  opacity: 1; 
  transition: opacity 6s ease 1s;
}
.overlay-black.is-hidden { 
  opacity: 0; 
  pointer-events: none;
}

/* 8) Intro Stages (state machine styling) ---------------------------------- */
/* Stage 0/1 should not block navigation CTAs (avoid double-click friction). */
body.stage-0 .hero-ctas { pointer-events: auto; }
body.stage-0 .intro-title { 
  position: relative; 
  top: 0; 
  left: 0; 
  opacity: 1; 
  animation: none;
}

body.stage-2 .hero-ctas { 
  pointer-events: auto;
}
body.stage-2 .intro-title { 
  opacity: 1; 
  pointer-events: auto; 
}

/* 9) Footer ----------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); margin-top: var(--space-3xl); }
.footer-inner {
  padding: var(--space-xl) var(--space-lg); 
  display: flex; 
  flex-wrap: wrap; 
  gap: var(--space-md); 
  align-items: center; 
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}
.site-footer nav a { margin-right: var(--space-md); }
.social a { 
  margin-left: var(--space-md);
  transition: color 0.2s ease;
}
.social a:hover {
  color: var(--accent);
}

/* 10) Page Content Shells --------------------------------------------------- */
.page { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: var(--space-3xl) var(--space-lg) var(--space-3xl); 
}
.page h1 { 
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem); 
  font-weight: 600; 
  margin: 0 0 var(--space-2xl); 
  letter-spacing: -0.01em;
}
.page h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  margin: var(--space-2xl) 0 var(--space-lg);
  letter-spacing: -0.01em;
}
.page section { 
  margin: var(--space-2xl) 0; 
}
.page p {
  line-height: 1.7;
  margin-bottom: var(--space-md);
}
.page ul {
  line-height: 1.8;
  padding-left: var(--space-xl);
}
.page ul li {
  margin-bottom: var(--space-sm);
}
.muted { 
  color: var(--fg-muted); 
}

/* 11) Forms ----------------------------------------------------------------- */
label { 
  display: block; 
  margin-bottom: var(--space-sm); 
  font-weight: 500;
  font-size: 0.9375rem;
}
input, select, textarea { 
  width: 100%; 
  padding: var(--space-md); 
  border-radius: var(--radius-md); 
  border: 1px solid var(--border); 
  background: var(--btn-secondary-bg); 
  color: var(--fg);
  font-size: 1rem;
  transition: all 0.2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
input[type="range"] { width: 100%; }
textarea {
  resize: vertical;
  min-height: 120px;
}
button[type="submit"], .btn { 
  padding: var(--space-md) var(--space-xl); 
  border-radius: var(--radius-md); 
  background: var(--accent); 
  border: 2px solid var(--accent); 
  color: #ffffff; 
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

/* Inline form feedback (replaces disruptive alerts) */
button[type="submit"]:hover, .btn:hover { 
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Contact page layout */
.contact-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.contact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
}

/* Pricing page layout (moved from inline <style>) */
.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--bg-card);
}

.price {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 6px 0 10px;
}

/* 12) Reduced Motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  /* Keep animations off, but allow transitions.
     Mobile browsers / battery-saver reduced-motion can disable animations;
     if we also force transitions off, the intro overlay disappears instantly. */
  * { animation: none !important; }
}

/* Page Load Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* On mobile devices, start at opacity: 1 to avoid reduced-motion issues */
@media (max-width: 768px) {
  @keyframes fadeIn {
    from { opacity: 1; }
    to { opacity: 1; }
  }
}

body {
  animation: fadeIn 0.3s ease;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* 13) Breakpoints: ≥768px --------------------------------------------------- */
@media (min-width: 768px) {
  .intro-title { font-size: 4rem; }
}
