/* ==========================================================================
   HiFi — Highest Fidelity — Übungsfirma Website
   Apple-inspired minimal design system
   ========================================================================== */

:root {
  --black: #000000;
  --white: #ffffff;
  --yellow: #fee809;
  --yellow-ink: #4d4400;

  --ink: #1d1d1f;
  --ink-soft: #424245;
  --gray-600: #6e6e73;
  --gray-300: #d2d2d7;
  --gray-100: #f5f5f7;
  --gray-50: #fbfbfd;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --container: 1180px;
  --header-h: 64px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.06), 0 20px 40px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.noise-overlay { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--yellow);
  color: var(--black);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.btn-primary:hover { box-shadow: 0 8px 20px rgba(254,232,9,0.35); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--gray-300);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { padding: 10px 20px; font-size: 14px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: rgba(0,0,0,0.08);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand { display: flex; align-items: center; height: 100%; }
.brand-logo { height: 38px; width: auto; }

.main-nav { display: flex; gap: 28px; margin-left: 8px; flex: 1; }
.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--yellow);
  transition: width 0.25s var(--ease);
}
.main-nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
  margin-left: auto;
}
.nav-toggle span { display: block; width: 20px; height: 1.6px; background: var(--ink); margin: 0 auto; transition: transform 0.25s var(--ease), opacity 0.25s var(--ease); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  min-height: 92dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 40px) 24px 80px;
  background:
    radial-gradient(60% 50% at 50% 0%, #ffffff 0%, #fcfcfd 55%, var(--gray-100) 100%);
}
.hero-inner { max-width: 780px; display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: min(320px, 60vw); height: auto; margin-bottom: 40px; }
.hero-title {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--ink);
}
.hero-sub {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  color: var(--gray-600);
  max-width: 560px;
  margin: 0 0 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ==========================================================================
   Intro strip
   ========================================================================== */
.intro-strip {
  border-top: 1px solid var(--gray-300);
  border-bottom: 1px solid var(--gray-300);
  background: var(--white);
}
.intro-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 36px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.intro-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.intro-num { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.intro-label { font-size: 13.5px; color: var(--gray-600); font-weight: 500; }
.intro-divider { width: 1px; height: 36px; background: var(--gray-300); }
@media (max-width: 640px) { .intro-divider { display: none; } }

/* ==========================================================================
   Category sections
   ========================================================================== */
.category { padding: 96px 24px; scroll-margin-top: var(--header-h); }
.category.alt { background: var(--gray-100); }
.category-inner { max-width: var(--container); margin: 0 auto; }

.category-head { max-width: 640px; margin: 0 0 56px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.tag-chip { width: 12px; height: 12px; background: var(--yellow); border-radius: 3px; display: inline-block; }
.category-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 12px;
}
.category-head p {
  font-size: 18px;
  line-height: 1.5;
  color: var(--gray-600);
  margin: 0;
}

/* ---------- Product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.product-grid-single { grid-template-columns: minmax(260px, 480px); justify-content: start; }

.product-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 0 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  will-change: transform;
  overflow: hidden;
}
.category.alt .product-card { background: var(--white); }
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}

.product-media {
  aspect-ratio: 4 / 3;
  width: calc(100% + 56px);
  margin: 0 -28px 24px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 80%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, black 80%, transparent 100%);
}
.product-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s var(--ease);
}
.product-card:hover .product-media img { transform: scale(1.04); }

.product-category {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.product-name {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  line-height: 1.25;
}
.product-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--gray-600);
  margin: 0 0 20px;
  flex-grow: 1;
}
.product-price {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  background: var(--black);
  color: var(--white);
  padding: 100px 24px;
  text-align: center;
}
.cta-inner { max-width: 640px; margin: 0 auto; }
.cta-band h2 {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.cta-band p {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  margin: 0 0 32px;
}
.cta-band .btn-primary:hover { box-shadow: 0 8px 24px rgba(254,232,9,0.25); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--gray-100); padding: 64px 24px 32px; }
.footer-inner { max-width: var(--container); margin: 0 auto; }
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--gray-300);
}
.footer-logo { height: 32px; width: auto; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.footer-nav a:hover { color: var(--ink); }

.disclaimer {
  margin: 32px 0;
  padding: 22px 24px;
  background: #fffbe0;
  border: 1.5px solid var(--yellow);
  border-radius: var(--radius-md);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.disclaimer-icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--yellow-ink); margin-top: 2px; }
.disclaimer p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #3a3300; }
.disclaimer strong { color: #211d00; }

.footer-bottom {
  padding-top: 16px;
  font-size: 13px;
  color: var(--gray-600);
  text-align: center;
}

/* ==========================================================================
   Scroll-reveal base state (animated via GSAP; fallback visible without JS)
   ========================================================================== */
.reveal { opacity: 1; }
.js-ready .reveal { opacity: 0; transform: translateY(28px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-300);
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--gray-100); font-size: 16px; }
  .main-nav a::after { display: none; }
  .site-header.nav-open .main-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .header-inner .btn-primary { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
  .site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }
}

@media (max-width: 640px) {
  .category { padding: 72px 20px; }
  .category-head { margin-bottom: 40px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}
