/* ================================================================
   JANUS AUDIO — Main Stylesheet
   Aesthetic: Industrial precision / dark studio / pro audio
   ================================================================

   TABLE OF CONTENTS
   -----------------
   1.  CSS Variables (design tokens)
   2.  Reset & Base
   3.  Typography
   4.  Layout Utilities
   5.  Buttons
   6.  Cookie Banner
   7.  Header & Navigation
   8.  Hero Section
   9.  Products Section
  10.  Newsletter Section
  11.  Footer
  12.  Animations
  13.  Media Queries (responsive)
   ================================================================ */


/* ================================================================
   1. CSS VARIABLES — Edit these to restyle the whole site quickly
   ================================================================ */
:root {
  /* --- Brand Colors --- */
  --color-bg:           #0d0d0d;       /* Deep dark background */
  --color-surface:      #141414;       /* Slightly lighter panels */
  --color-surface-2:    #1c1c1c;       /* Cards, inputs */
  --color-border:       #2a2a2a;       /* Subtle dividers */

  /* --- Text --- */
  --color-text:         #DFDBC7;       /* Main text (warm off-white) */
  --color-text-muted:   #7a7770;       /* Secondary/caption text */
  --color-text-dim:     #4a4845;       /* Very muted text */

  /* --- Accent Colors (pick usage per component below) --- */
  --color-red:          #AB1519;       /* Strong accent — CTAs, highlights */
  --color-yellow:       #EBD346;       /* Secondary accent — hover states */
  --color-terracotta:   #C2674F;       /* Tertiary accent — spec labels */

  /* --- Primary accent used throughout (change to swap palette) --- */
  --color-accent:       var(--color-red);
  --color-accent-hover: #c71a1f;

  /* --- Fonts --- */
  --font-headline:      'Zen Dots', sans-serif;
  --font-body:          'Rajdhani', sans-serif;

  /* --- Spacing scale (rem) --- */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   8rem;

  /* --- Layout --- */
  --container-max:  1280px;
  --radius-sm:      2px;
  --radius-md:      4px;

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-base:   300ms ease;
  --transition-slow:   600ms ease;

  /* --- Header height (used for scroll offset) --- */
  --header-h:  72px;
}


/* ================================================================
   2. RESET & BASE
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Offset anchor links so content isn't hidden behind sticky header */
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;   /* 17px — comfortable reading size */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

/* Screen-reader only utility */
.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;
}


/* ================================================================
   3. TYPOGRAPHY
   ================================================================ */

/* Headline font applied to h1-h3 globally */
h1, h2, h3 {
  font-family: var(--font-headline);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

/* Section-level titles */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Muted subtitle below section title */
.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
}


/* ================================================================
   4. LAYOUT UTILITIES
   ================================================================ */

/* Centred container with max-width */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}


/* ================================================================
   5. BUTTONS
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

/* Filled accent button — primary CTA */
.btn--accent {
  background: var(--color-accent);
  color: #fff;
}
.btn--accent:hover {
  background: var(--color-accent-hover);
}

/* Outline button — secondary CTA */
.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Ghost (transparent) button */
.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.btn--ghost:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

/* Small size modifier */
.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
}


/* ================================================================
   6. COOKIE BANNER (GDPR)
   Positioned fixed at bottom; hidden via JS once consent is given.
   ================================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  padding: var(--space-sm) var(--space-md);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

/* Visible state — toggled by JS */
.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.cookie-banner__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  flex: 1;
  min-width: 240px;
}

.cookie-banner__text a {
  color: var(--color-yellow);
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--space-xs);
  flex-shrink: 0;
}


/* ================================================================
   7. HEADER & NAVIGATION
   ================================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--header-h);
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-base);
}

/* Slightly more opaque when user has scrolled */
.site-header.is-scrolled {
  background: rgba(13, 13, 13, 0.97);
}

.header__inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: var(--space-md);
}

/* ── Logo ── */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Logo image — header version (~32px tall, scales to width based on aspect ratio) */
.logo__img {
  height: 36px;
  width: auto;
  display: block;
  transition: opacity var(--transition-fast);
}

.logo:hover .logo__img {
  opacity: 0.85;
}

/* Footer logo — slightly smaller */
.logo__img--footer {
  height: 32px;
}

/* ── Desktop Nav ── */
.main-nav {
  margin-left: auto;
}

.nav__list {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.nav__link {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  position: relative;
  padding-bottom: 2px;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.nav__link:hover {
  color: var(--color-text);
}

.nav__link:hover::after {
  transform: scaleX(1);
}

/* ── Social Icons (shared styles, used in header + footer) ── */
.social-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--color-text);  /* Black & white — no colour */
}

.social-icon:hover {
  opacity: 1;
}

/* ── Mobile Menu Toggle ── */
.nav-toggle {
  display: none;       /* Hidden on desktop */
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* Animated X state */
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Nav Drawer ── */
.mobile-nav {
  display: none;       /* Hidden by default; shown via JS toggle */
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav__list {
  display: flex;
  flex-direction: column;
}

.mobile-nav__link {
  display: block;
  padding: 0.75rem var(--space-md);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav__link:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}


/* ================================================================
   8. HERO SECTION
   ================================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

/* Backdrop image — technical drawing, faded out */
/* FILE: aux/Backdrop.webp — place the 1920×1080 WebP export here */
.hero__backdrop {
  position: absolute;
  inset: 0;
  background-image: url('../aux/Backdrop.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.50;  /* Low opacity = faded drawing look; adjust 0.05–0.20 to taste */
  transform: scale(1.03);
  will-change: transform;
}

/* Dark gradient overlay layered over the backdrop */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(13, 13, 13, 0.7) 0%,
    rgba(13, 13, 13, 0.4) 50%,
    rgba(13, 13, 13, 0.85) 100%
  );
}

/* Scanline texture for depth — purely decorative */
.hero__scanlines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.12) 3px,
    rgba(0,0,0,0.12) 4px
  );
  pointer-events: none;
}

/* Hero text content */
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  animation: fadeUp 1s ease both;
}

.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.hero__headline {
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  margin-bottom: var(--space-sm);
  color: var(--color-text);
  /* Subtle text-shadow for depth against the backdrop */
  text-shadow: 0 2px 40px rgba(0,0,0,0.8);
}

.hero__subline {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--color-text-muted);
  max-width: 520px;
  margin-bottom: var(--space-md);
  /* Replace the Lorem Ipsum paragraph above in index.html */
}

.hero__cta {
  /* Inherits from .btn .btn--accent */
}


/* ================================================================
   9. PRODUCTS SECTION
   ================================================================ */
.products {
  padding-block: var(--space-xl);
  background: var(--color-surface);
  /* Subtle top border to separate from hero */
  border-top: 1px solid var(--color-border);
}

/* Two-column grid; stacks on mobile */
.products__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* ── Product Card ──
   Horizontal layout: tall portrait product image on left, info on right.
   Designed for module-style product photos in portrait orientation. */
.product-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;  /* Image | Info */
  transition: border-color var(--transition-base), transform var(--transition-base);
  position: relative;
}

/* Decorative accent bar on left edge */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 0;
  background: var(--color-accent);
  transition: height var(--transition-base);
}

.product-card:hover {
  border-color: var(--color-border);
  transform: translateY(-4px);
}

.product-card:hover::before {
  height: 100%;
}

/* Product image container — full-height portrait area */
.product-card__image-wrap {
  position: relative;
  background: var(--color-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  /* Subtle radial glow behind product */
  background-image: radial-gradient(
    ellipse at center,
    rgba(235, 211, 70, 0.05) 0%,
    transparent 60%
  );
}

/* Decorative grid texture in image area */
.product-card__image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.product-card__image {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 12px 36px rgba(0,0,0,0.7));
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image {
  transform: scale(1.03) translateY(-2px);
}

/* Card text body */
.product-card__body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Small category eyebrow above name */
.product-card__category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-terracotta);
  margin-bottom: 0.5rem;
}

.product-card__name {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.04em;
}

.product-card__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.55;
}

/* ── Spec List (bullet points) ── */
/* Each <li> has two spans: .spec-label and .spec-value */
.product-card__specs {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.product-card__specs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.spec-label {
  color: var(--color-terracotta);  /* Accent: terracotta for spec labels */
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.spec-value {
  color: var(--color-text);
  text-align: right;
  font-size: 0.8375rem;
  font-weight: 500;
}

.product-card__btn {
  align-self: flex-start;
  margin-top: auto;
}


/* ================================================================
  10. NEWSLETTER SECTION
   ================================================================ */
.newsletter {
  padding-block: var(--space-xl);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.newsletter__inner {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

/* Copy column */
.newsletter__copy {
  flex: 1;
  min-width: 260px;
}

.newsletter__title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
}

.newsletter__desc {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  max-width: 380px;
}

/* Form column */
.newsletter__form-wrap {
  flex: 1;
  min-width: 280px;
}

.newsletter__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.newsletter__field-group {
  display: flex;
  gap: 0;
}

/* Email input */
.newsletter__input {
  flex: 1;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.newsletter__input::placeholder {
  color: var(--color-text-dim);
}

.newsletter__input:focus {
  border-color: var(--color-accent);
}

/* Submit button flush right of input */
.newsletter__submit {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  flex-shrink: 0;
}

/* Honeypot field — must be visually hidden */
.newsletter__honeypot {
  position: absolute;
  left: -9999px;
  visibility: hidden;
}

/* Legal small print */
.newsletter__legal {
  font-size: 0.75rem;
  color: var(--color-text-dim);
}

.newsletter__legal a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

/* Success / error message area */
.newsletter__message {
  font-size: 0.875rem;
  min-height: 1.4em;
}

.newsletter__message.is-success {
  color: var(--color-yellow);
}

.newsletter__message.is-error {
  color: var(--color-accent);
}


/* ================================================================
  11. FOOTER
   ================================================================ */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-lg);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Footer info: location + email row */
.footer__info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.footer__location,
.footer__email {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

.footer__location:hover,
.footer__email:hover {
  color: var(--color-text);
}

/* Footer icon (location pin, envelope) */
.footer__icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Legal links row */
.footer__legal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-dim);
  width: 100%;
  justify-content: flex-end;
}

.footer__legal-link {
  color: var(--color-text-dim);
}

.footer__legal-link:hover {
  color: var(--color-text-muted);
}

.footer__sep {
  opacity: 0.4;
}

.footer__copy {
  color: var(--color-text-dim);
}


/* ================================================================
  12. ANIMATIONS
   ================================================================ */

/* Fade-up entrance used on hero content */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger children of hero content */
.hero__eyebrow  { animation-delay: 0.1s; }
.hero__headline { animation-delay: 0.25s; }
.hero__subline  { animation-delay: 0.4s; }
.hero__cta      { animation-delay: 0.55s; }

.hero__eyebrow,
.hero__headline,
.hero__subline,
.hero__cta {
  animation: fadeUp 0.8s ease both;
}


/* ================================================================
  13. MEDIA QUERIES
   ================================================================ */

/* Tablet: ≤ 1100px — switch products to single column at this width
   because the horizontal split becomes too cramped */
@media (max-width: 1100px) {

  .products__grid {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin-inline: auto;
  }

  /* Constrain image height when card is full-width */
  .product-card__image-wrap {
    min-height: 480px;
  }
}

/* Tablet: ≤ 900px */
@media (max-width: 900px) {

  .newsletter__inner {
    flex-direction: column;
    gap: var(--space-md);
  }

  .newsletter__copy,
  .newsletter__form-wrap {
    min-width: 100%;
  }
}

/* Mobile: ≤ 640px */
@media (max-width: 640px) {

  /* Hide desktop nav items; show toggle */
  .main-nav,
  .social-icons--header {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* Stack product card image above body on small screens */
  .product-card {
    grid-template-columns: 1fr;
  }

  .product-card__image-wrap {
    min-height: 380px;
    padding: var(--space-sm);
  }

  .hero__content {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .footer__legal {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .newsletter__field-group {
    flex-direction: column;
  }

  .newsletter__input {
    border-right: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
  }

  .newsletter__submit {
    border-radius: var(--radius-sm);
    width: 100%;
    justify-content: center;
  }
}
