/* ── Design Tokens ────────────────────────────────────────────── */
:root {
  --bg:        #F8F7F4;
  --bg-alt:    #EFEDE8;
  --dark:      #1C1C1C;
  --mid:       #6B6B6B;
  --light:     #9E9E9E;
  --accent:    #C4A882;
  --accent-dk: #9B7F60;
  --white:     #FFFFFF;
  --font-head: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────────────── */
h1,h2,h3,h4,h5 { font-family: var(--font-head); font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(3rem, 8vw, 7rem); font-weight: 200; }
h2 { font-size: clamp(2rem, 5vw, 4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); font-weight: 400; }
p  { color: var(--mid); line-height: 1.75; }
.accent { color: var(--accent); }
.label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn-dark {
  background: var(--dark); color: #fff;
  padding: 0.85rem 2rem; border-radius: 3px;
  text-decoration: none; font-size: 0.82rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: background 0.3s; display: inline-block;
}
.btn-dark:hover { background: var(--accent); }
.btn-outline {
  border: 1px solid rgba(28,28,28,0.25); color: var(--dark);
  padding: 0.85rem 2rem; border-radius: 3px;
  text-decoration: none; font-size: 0.82rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: all 0.3s; display: inline-block;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-accent {
  background: var(--accent); color: #fff;
  padding: 0.85rem 2.2rem; border-radius: 3px;
  text-decoration: none; font-size: 0.82rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: background 0.3s; display: inline-block;
}
.btn-accent:hover { background: var(--accent-dk); }

/* ── Page Hero ────────────────────────────────────────────────── */
.page-hero { padding: 10rem 4rem 6rem; }
.page-hero-text > * + * { margin-top: 1rem; }


/* ── Navigation ───────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 4rem;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s;
}
#navbar.scrolled {
  background: rgba(248,247,244,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(196,168,130,0.15);
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--dark);
  letter-spacing: 0.1em;
  text-decoration: none;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--mid);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--dark); }
.nav-links a.nav-active { color: var(--accent) !important; }

.nav-cta {
  background: var(--dark);
  color: var(--white) !important;
  padding: 0.55rem 1.4rem !important;
  border-radius: 2px;
  transition: background 0.3s !important;
}
.nav-cta:hover { background: var(--accent) !important; color: var(--white) !important; }
.nav-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.nav-burger span { display: block; width: 24px; height: 1.5px; background: var(--dark); transition: 0.3s; }

/* ── 3D Scene ─────────────────────────────────────────────────── */
#scene-container {
  position: relative;
  height: 700vh;
}
#scene-wrapper {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}
#cylinder-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: block;
}

/* ── Scene Panels ─────────────────────────────────────────────── */
.scene-panel {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.scene-panel.active { opacity: 1; pointer-events: auto; }

/* Text content wrapper — white frosted glass backdrop */
.scene-panel > div:not(.scroll-hint) {
  position: relative;
  z-index: 2;
}
.panel-glass {
  background: rgba(248,247,244,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 10px;
  padding: 2rem 2.2rem;
  border: 1px solid rgba(196,168,130,0.18);
  box-shadow: 0 8px 40px rgba(0,0,0,0.07);
  max-width: 440px;
}

#panel-hero {
  align-items: flex-start;
  padding: 0 4rem;
  padding-top: 6rem;
}
#panel-hero h1 { color: var(--dark); }
#panel-hero p {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  max-width: 360px;
  margin-top: 1.2rem;
  color: var(--mid);
}
.scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}
.scroll-hint span { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--light); }
.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100%{opacity:0.3;transform:scaleY(0.5)} 50%{opacity:1;transform:scaleY(1)} }

/* ── Panel: minimal (no backdrop) ────────────────────────────── */
.panel-minimal {
  position: relative; z-index: 2;
  max-width: 400px;
}
.panel-minimal h2 { color: var(--dark); text-shadow: 0 1px 20px rgba(248,247,244,0.8); }
.panel-minimal p  { color: var(--mid);  text-shadow: 0 1px 12px rgba(248,247,244,0.7); }
.panel-minimal .label { color: var(--accent); }
.panel-link {
  display: inline-block; margin-top: 1.2rem;
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid var(--accent); padding-bottom: 2px;
  transition: opacity 0.3s;
}
.panel-link:hover { opacity: 0.7; }

/* ── Panel: Lid Open specs (dark pill, right side) ───────────── */
.panel-lid-details {
  position: relative; z-index: 2;
  background: rgba(28,28,28,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(196,168,130,0.3);
  border-radius: 12px;
  padding: 2rem 2.2rem;
  margin-right: 4rem;
  max-width: 360px;
}
.lid-badge {
  display: inline-block;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(196,168,130,0.4);
  padding: 0.3rem 0.8rem; border-radius: 20px;
  margin-bottom: 1.2rem;
  animation: lidPulse 2s ease-in-out infinite;
}
@keyframes lidPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(196,168,130,0); }
  50%      { box-shadow: 0 0 0 6px rgba(196,168,130,0.15); }
}
.lid-specs-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.lid-spec {
  display: flex; flex-direction: column; gap: 0.2rem;
}
.lid-spec-value {
  font-family: var(--font-head); font-size: 1.9rem; font-weight: 200;
  color: #fff; line-height: 1;
}
.lid-spec-label {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--accent);
}

#panel-about    { align-items: flex-start; padding: 0 4rem; justify-content: center; }
#panel-tilt     { align-items: flex-start; padding: 0 4rem; }
#panel-lid-close { align-items: flex-start; padding: 0 4rem; }
#panel-cta-teaser { align-items: center; text-align: center; padding: 0 2rem; }

/* ── Finish Cards ─────────────────────────────────────────────── */
.finish-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 1.5rem; }
.finish-card {
  background: var(--white);
  border: 1px solid rgba(196,168,130,0.2);
  border-radius: 4px;
  padding: 0.9rem 1rem;
}
.finish-card h4 { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.2rem; color: var(--dark); }
.finish-card p  { font-size: 0.72rem; color: var(--light); line-height: 1.4; }
.finish-card .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-bottom: 0.5rem; }

/* ── Divider ──────────────────────────────────────────────────── */
.divider { width: 60px; height: 1px; background: var(--accent); margin: 1.2rem 0; }
.divider-center { margin: 1.2rem auto; }

/* ── Sections (after sticky) ──────────────────────────────────── */
.section { padding: 8rem 4rem; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark); color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.55); }
.section-dark .divider { background: var(--accent); }
.container { max-width: 1200px; margin: 0 auto; }

/* ── Sizes Grid ───────────────────────────────────────────────── */
.sizes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5rem; margin-top: 3rem; }
.size-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 6px;
  padding: 2rem 1.2rem;
  text-align: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.size-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.size-visual {
  margin: 0 auto 1.2rem;
  background: linear-gradient(160deg, #e8e4dc, #f8f7f4);
  border: 1px solid rgba(196,168,130,0.3);
  border-radius: 4px 4px 2px 2px;
}
.size-card h4 { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.3rem; }
.size-card p  { font-size: 0.72rem; color: var(--light); }

/* ── Process ──────────────────────────────────────────────────── */
.process-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2rem; margin-top: 3rem; }
.process-step { position: relative; padding-left: 1.5rem; border-left: 1px solid rgba(196,168,130,0.3); }
.step-num {
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 200;
  color: rgba(196,168,130,0.25);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.process-step h4 { font-size: 1rem; font-weight: 500; margin-bottom: 0.5rem; color: var(--white); }
.process-step p  { font-size: 0.82rem; color: rgba(255,255,255,0.45); }

/* ── Gallery ──────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 1rem;
  margin-top: 3rem;
}
.gallery-item {
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid rgba(0,0,0,0.06);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item:nth-child(1) { grid-column: span 2; aspect-ratio: 2/1; }
.gallery-item:nth-child(5) { grid-column: span 2; aspect-ratio: 2/1; }
.gallery-swatch {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 0.5rem;
}
.gallery-icon { font-size: 2rem; opacity: 0.3; }
.gallery-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(28,28,28,0.75) 0%, transparent 100%);
  padding: 1.2rem 1rem 0.9rem;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ── Quote Form ───────────────────────────────────────────────── */
#quote {
  background: var(--bg);
  padding: 8rem 4rem;
}
.quote-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  align-items: start;
}
.quote-info h2 { font-size: clamp(2rem,4vw,3.2rem); }
.quote-info p  { margin-top: 1rem; }
.quote-specs { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.8rem; }
.quote-spec {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 0.82rem; color: var(--mid);
}
.quote-spec::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.quote-form { background: var(--white); border-radius: 8px; padding: 2.5rem; border: 1px solid rgba(0,0,0,0.07); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.form-group label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-family: var(--font-body);
  color: var(--dark);
  outline: none;
  transition: border-color 0.3s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; }
.btn-submit {
  width: 100%;
  background: var(--dark);
  color: var(--white);
  border: none;
  padding: 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
.btn-submit:hover { background: var(--accent); transform: translateY(-1px); }
.form-alert {
  padding: 0.85rem 1rem;
  border-radius: 4px;
  font-size: 0.84rem;
  margin-bottom: 1.2rem;
}
.form-alert.success { background: #f0faf0; border: 1px solid #86c98e; color: #2d6a34; }
.form-alert.error   { background: #fff0f0; border: 1px solid #f0a0a0; color: #8b2020; }

/* ── Footer ───────────────────────────────────────────────────── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.5);
  padding: 4rem 4rem 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer-brand .nav-logo { color: var(--white); font-size: 1.6rem; }
.footer-brand p { margin-top: 1rem; font-size: 0.82rem; line-height: 1.7; color: rgba(255,255,255,0.4); }
.footer-col h5 { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 1.2rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a { font-size: 0.82rem; color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.3s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
}

/* ── Animations ───────────────────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  #navbar { padding: 1.2rem 1.5rem; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 1.5rem;
    position: fixed; inset: 0; background: var(--bg);
    align-items: center; justify-content: center;
    z-index: 999; font-size: 1.3rem;
  }
  .section { padding: 5rem 1.5rem; }
  #quote { padding: 5rem 1.5rem; }
  .quote-inner { grid-template-columns: 1fr; gap: 3rem; }
  .form-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(5) { grid-column: span 2; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  footer { padding: 3rem 1.5rem 1.5rem; }
}

/* ── Mobile 3D Scene ──────────────────────────────────────────── */
@media (max-width: 768px) {
  #scene-container { height: 800vh; }

  /* Canvas takes top 55% of sticky viewport */
  #cylinder-canvas {
    height: 58%;
  }

  /* All panels: text anchored to bottom of viewport */
  .scene-panel {
    justify-content: flex-end;
    align-items: stretch !important;
    padding-bottom: 2rem;
  }

  /* Only hero panel gets glass pill */
  #panel-hero {
    align-items: stretch !important;
  }
  #panel-hero .panel-glass {
    margin: 0 1rem;
    padding: 1.4rem 1.3rem;
  }
  #panel-hero h1 { font-size: clamp(2rem, 9vw, 3.5rem); }

  /* Other text panels: minimal style, bottom bar */
  .panel-minimal {
    max-width: 100%;
    margin: 0 !important;
    padding: 1.2rem 1.4rem;
    background: rgba(248,247,244,0.10);
    border-top: 1px solid rgba(196,168,130,0.2);
    backdrop-filter: blur(4px);
  }
  .panel-minimal h2 { font-size: clamp(1.6rem, 7vw, 2.4rem); }

  /* Lid-open panel: full width at bottom */
  .panel-lid-details {
    margin: 0 1rem !important;
    max-width: 100%;
  }
  .lid-specs-grid { grid-template-columns: repeat(4,1fr); gap: 0.6rem; }
  .lid-spec-value { font-size: 1.2rem; }

  /* CTA */
  #panel-cta-teaser .panel-glass { margin: 0 1rem; padding: 1.4rem 1.3rem; }
}

@media (max-width: 480px) {
  .sizes-grid { grid-template-columns: repeat(2, 1fr); }
  .finish-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(5) { grid-column: span 1; aspect-ratio: 1; }
  .footer-inner { grid-template-columns: 1fr; }
  .lid-specs-grid { grid-template-columns: repeat(2,1fr); }
}
