/* =========================================================================
   TIMEPIECE MAN — Design tokens
   Palette: deep ink, bone ivory, brushed gold, oxblood accent, steel.
   Display face: Cormorant Garamond (horological, engraved-plate feel)
   Body face: Jost (clean geometric sans)
   Utility/mono: JetBrains Mono (chronograph numerals — used for all prices)
   ========================================================================= */
:root{
  --ink: #0b0c0e;
  --ink-2: #131418;
  --ink-3: #1c1d22;
  --bone: #efe9dd;
  --bone-dim: #b9b3a6;
  --gold: #b08d57;
  --gold-light: #d8b679;
  --oxblood: #5c1a1b;
  --oxblood-light: #8a2c2d;
  --steel: #3a3d42;
  --steel-line: rgba(239,233,221,0.10);
  --radius: 2px;
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--ink);
  color:var(--bone);
  font-family:var(--body);
  font-weight:300;
  -webkit-font-smoothing:antialiased;
  line-height:1.6;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
h1,h2,h3{ font-family:var(--display); font-weight:600; margin:0 0 .4em; letter-spacing:.01em; }
p{ margin:0 0 1em; color:var(--bone-dim); }
.price-mono{ font-family:var(--mono); color:var(--gold-light); font-weight:500; }

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}

::selection{ background:var(--gold); color:var(--ink); }

/* =========================================================================
   HEADER / NAV
   ========================================================================= */
.site-header{
  position:sticky; top:0; z-index:100;
  background:rgba(11,12,14,0.86);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--steel-line);
}
.header-inner{
  max-width:1280px; margin:0 auto; padding:14px 28px;
  display:flex; align-items:center; justify-content:space-between;
}
.brand-logo{ height:120px; width:auto; max-width:100%; object-fit:contain; }
.main-nav{ display:flex; gap:36px; }
.nav-link{
  font-family:var(--body); font-size:13px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--bone-dim); padding:6px 0; position:relative; transition:color .25s ease;
}
.nav-link::after{
  content:''; position:absolute; left:0; right:0; bottom:-2px; height:1px;
  background:var(--gold); transform:scaleX(0); transform-origin:left; transition:transform .3s ease;
}
.nav-link:hover, .nav-link.active{ color:var(--bone); }
.nav-link:hover::after, .nav-link.active::after{ transform:scaleX(1); }

.nav-toggle{
  display:none; background:none; border:none; width:32px; height:22px;
  flex-direction:column; justify-content:space-between; padding:0;
}
.nav-toggle span{ display:block; height:1px; background:var(--bone); width:100%; }

@media (max-width:860px){
  .nav-toggle{ display:flex; }
  .brand-logo{ height:44px; }
  .main-nav{
    position:fixed; inset:0 0 0 auto; width:78%; max-width:340px; height:100vh;
    background:var(--ink-2); flex-direction:column; gap:0; padding:90px 32px;
    transform:translateX(100%); transition:transform .35s ease; border-left:1px solid var(--steel-line);
  }
  .main-nav.open{ transform:translateX(0); }
  .nav-link{ padding:16px 0; border-bottom:1px solid var(--steel-line); font-size:15px; }
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero{
  position:relative; overflow:hidden;
  padding:120px 28px 90px;
  text-align:center;
  border-bottom:1px solid var(--steel-line);
}
.hero-inner{ max-width:760px; margin:0 auto; position:relative; z-index:2; }
.eyebrow, .section-eyebrow{
  font-family:var(--body); font-size:12px; letter-spacing:.22em; text-transform:uppercase;
  color:var(--gold); margin-bottom:18px; display:block;
}
.hero-title{ font-size:clamp(40px,7vw,76px); line-height:1.04; margin-bottom:22px; }
.hero-sub{ font-size:17px; max-width:560px; margin:0 auto; color:var(--bone-dim); }
.hero-sweep{
  position:absolute; top:-50%; left:-20%; width:60%; height:200%;
  background:linear-gradient(100deg, transparent 40%, rgba(216,182,121,0.06) 50%, transparent 60%);
  animation:sweep 9s ease-in-out infinite;
  pointer-events:none;
}
@keyframes sweep{
  0%,100%{ transform:translateX(-10%); }
  50%{ transform:translateX(220%); }
}

/* =========================================================================
   MODEL GRID (home page)
   ========================================================================= */
.model-grid-section{ max-width:1280px; margin:0 auto; padding:20px 28px 120px; text-align:center; }
.section-eyebrow{ text-align:center; }
.model-grid{
  display:grid; grid-template-columns:repeat(2,1fr); gap:28px; margin-top:30px; text-align:left;
}
@media (max-width:760px){ .model-grid{ grid-template-columns:1fr; } }

.model-card{
  background:linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border:1px solid var(--steel-line);
  border-radius:var(--radius);
  overflow:hidden;
  display:block;
  transition:border-color .3s ease, transform .3s ease;
}
.model-card:hover{ border-color:var(--gold); transform:translateY(-4px); }

.model-card-frame{
  position:relative; aspect-ratio:1/1; background:radial-gradient(circle at 50% 40%, #1a1b20, #0b0c0e);
  overflow:hidden;
}
.model-thumb{ width:100%; height:100%; object-fit:contain; padding:30px; user-select:none; -webkit-user-drag:none; }
.model-card-sweep{
  position:absolute; top:0; left:-60%; width:40%; height:100%;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,0.07), transparent);
  transition:left .7s ease;
}
.model-card:hover .model-card-sweep{ left:120%; }

.model-card-info{ padding:22px 24px 26px; border-top:1px solid var(--steel-line); }
.model-card-info h2{ font-size:24px; margin-bottom:6px; }
.model-tagline{ font-size:13px; margin-bottom:14px; }
.model-price{ font-size:13px; color:var(--bone-dim); margin-bottom:14px; }
.model-cta{
  font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--gold-light);
  display:inline-flex; align-items:center; gap:6px;
}
.model-cta .arrow{ transition:transform .25s ease; }
.model-card:hover .arrow{ transform:translateX(5px); }

/* =========================================================================
   GENERIC PAGE HEADER (inspiration / how-it-works / faq)
   ========================================================================= */
.page-header{ max-width:760px; margin:0 auto; padding:90px 28px 50px; text-align:center; }
.page-header h1{ font-size:clamp(36px,5vw,54px); }
.page-lede{ font-size:16px; }

/* =========================================================================
   GALLERY / INSPIRATION
   ========================================================================= */
.gallery-grid{
  max-width:1280px; margin:0 auto; padding:0 28px 120px;
  display:grid; grid-template-columns:repeat(4,1fr); gap:16px;
}
@media (max-width:960px){ .gallery-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:520px){ .gallery-grid{ grid-template-columns:1fr 1fr; gap:10px; } }

.gallery-item{
  border:none; padding:0; background:var(--ink-3); aspect-ratio:1/1; overflow:hidden;
  border-radius:var(--radius); border:1px solid var(--steel-line);
}
.gallery-thumb{ width:100%; height:100%; object-fit:cover; transition:transform .4s ease; user-select:none; -webkit-user-drag:none; }
.gallery-item:hover .gallery-thumb{ transform:scale(1.06); }

.lightbox{
  position:fixed; inset:0; background:rgba(6,6,7,0.94); z-index:300;
  display:flex; align-items:center; justify-content:center; padding:40px;
}
.lightbox[hidden]{ display:none; }
#lightbox-canvas{ max-width:90vw; max-height:85vh; user-select:none; -webkit-user-drag:none; }
.lightbox-close{
  position:absolute; top:24px; right:30px; background:none; border:none; color:var(--bone);
  font-size:34px; line-height:1;
}

/* =========================================================================
   PROCESS / HOW IT WORKS
   ========================================================================= */
.process-list{ max-width:760px; margin:0 auto; padding:0 28px 120px; }
.process-step{ display:flex; gap:26px; padding:28px 0; border-bottom:1px solid var(--steel-line); }
.process-step:last-child{ border-bottom:none; }
.process-num{ font-family:var(--mono); color:var(--gold); font-size:14px; padding-top:4px; min-width:30px; }
.process-step h3{ font-size:21px; margin-bottom:8px; }

/* =========================================================================
   FAQ
   ========================================================================= */
.faq-list{ max-width:760px; margin:0 auto; padding:0 28px 120px; }
.faq-item{ border-bottom:1px solid var(--steel-line); }
.faq-question{
  width:100%; background:none; border:none; color:var(--bone);
  display:flex; justify-content:space-between; align-items:center;
  padding:22px 0; font-family:var(--display); font-size:18px; text-align:left;
}
.faq-arrow{ color:var(--gold); font-size:12px; transition:transform .3s ease; flex-shrink:0; margin-left:18px; }
.faq-question[aria-expanded="true"] .faq-arrow{ transform:rotate(180deg); }
.faq-answer{
  max-height:0; overflow:hidden; transition:max-height .35s ease, padding .35s ease;
}
.faq-answer p{ padding-bottom:22px; margin:0; font-size:14.5px; }
.faq-item.open .faq-answer{ max-height:300px; }

/* =========================================================================
   CONFIGURATOR
   ========================================================================= */
.configurator{
  max-width:1320px; margin:0 auto; padding:40px 28px 140px;
  display:grid; grid-template-columns:1fr 1fr; gap:48px;
}
@media (max-width:980px){ .configurator{ grid-template-columns:1fr; } }

.configurator-preview{ position:static; top:90px; align-self:start; }
@media (max-width:980px){ .configurator-preview{ position:static; } }

.back-link{ font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--gold-light); display:inline-block; margin-bottom:18px; }
.config-watch-name{ font-size:clamp(30px,4vw,44px); margin-bottom:6px; }
.config-watch-tagline{ font-size:14px; margin-bottom:24px; }

.preview-stage{
  position:relative; aspect-ratio:1/1; max-width:560px;
  background:radial-gradient(circle at 50% 38%, #1d1e23, #0b0c0e 72%);
  border:1px solid var(--steel-line); border-radius:50%;
  overflow:hidden;
}
.preview-layers{ position:absolute; inset:0; }
.preview-layers canvas{
  position:absolute; inset:0; width:100%; height:100%; object-fit:contain; padding:10%;
  user-select:none; -webkit-user-drag:none;
}
.preview-glass{
  position:absolute; inset:0; border-radius:50%; pointer-events:none; z-index:10;
  box-shadow:inset 0 0 60px rgba(0,0,0,.6), inset 0 0 2px rgba(255,255,255,.25);
}
.preview-sweep{
  position:absolute; top:-30%; left:-40%; width:55%; height:160%; z-index:11; pointer-events:none;
  background:linear-gradient(100deg, transparent 40%, rgba(255,255,255,0.08) 50%, transparent 60%);
  animation:sweep 7s ease-in-out infinite;
}
.preview-hint{ font-size:12px; color:var(--bone-dim); margin-top:16px; }

.configurator-panel{ display:flex; flex-direction:column; gap:18px; }

.part-tabs, .category-tabs{ display:flex; flex-wrap:wrap; gap:8px; }
.tab-pill{
  padding:9px 18px; border:1px solid var(--steel-line); border-radius:30px;
  background:var(--ink-3); color:var(--bone-dim); font-size:12.5px; letter-spacing:.06em; text-transform:uppercase;
  transition:all .2s ease;
}
.tab-pill:hover{ border-color:var(--gold); color:var(--bone); }
.tab-pill.active{ background:var(--gold); border-color:var(--gold); color:var(--ink); font-weight:500; }
.category-tabs{ margin-top:-4px; }
.category-tabs .tab-pill{ font-size:11.5px; padding:7px 14px; background:transparent; }
.category-tabs .tab-pill.active{ background:var(--oxblood); border-color:var(--oxblood-light); color:var(--bone); }

.swatch-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(86px,1fr)); gap:10px;
  max-height:380px; overflow-y:auto; padding:6px 4px 6px 0;
  border-top:1px solid var(--steel-line); border-bottom:1px solid var(--steel-line); padding-top:16px; padding-bottom:16px;
}
.swatch{
  position:relative; aspect-ratio:1/1; background:var(--ink-3); border:1px solid var(--steel-line);
  border-radius:var(--radius); overflow:hidden; padding:0;
}
.swatch canvas{ width:100%; height:100%; object-fit:contain; padding:8px; user-select:none; -webkit-user-drag:none; }
.swatch:hover{ border-color:var(--gold-light); }
.swatch.selected{ border-color:var(--gold); box-shadow:0 0 0 1px var(--gold); }
.swatch-price{
  position:absolute; left:0; right:0; bottom:0; font-family:var(--mono); font-size:9.5px;
  background:rgba(0,0,0,.65); color:var(--gold-light); text-align:center; padding:3px 0;
}

.price-summary{
  background:var(--ink-3); border:1px solid var(--steel-line); border-radius:var(--radius);
  padding:22px;
}
.price-summary-row{ display:flex; justify-content:space-between; align-items:center; font-size:14px; }
.total-row{ font-family:var(--display); font-size:22px; margin-bottom:16px; }
.btn{
  display:block; width:100%; text-align:center; padding:13px 18px; margin-top:10px;
  border-radius:30px; font-size:13px; letter-spacing:.08em; text-transform:uppercase; border:1px solid var(--gold);
  transition:all .2s ease;
}
.btn-primary{ background:var(--gold); color:var(--ink); font-weight:500; }
.btn-primary:hover{ background:var(--gold-light); }
.btn-ghost{ background:transparent; color:var(--bone); border-color:var(--steel-line); }
.btn-ghost:hover{ border-color:var(--gold); color:var(--gold-light); }
.price-breakdown{ list-style:none; margin:18px 0 0; padding-top:14px; border-top:1px solid var(--steel-line); }
.price-breakdown li{ display:flex; justify-content:space-between; font-size:12px; color:var(--bone-dim); padding:4px 0; }
.price-breakdown li span:last-child{ font-family:var(--mono); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer{ border-top:1px solid var(--steel-line); padding:50px 28px; text-align:center; }
.footer-logo{ height:76px; margin:0 auto 14px; opacity:.7; }
.site-footer p{ font-size:12px; }

/* =========================================================================
   BUTTONS PREV/NEXT
   ========================================================================= */

.preview-nav {
  position: relative;
  display: flex;
  justify-content: center;
}

.preview-stage {
  width: 100%;
}

.preview-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 40px;
  height: 40px;
  background: rgba(11, 12, 14, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid var(--steel-line);
  border-radius: 50%;
  color: var(--gold-light);
  font-size: 22px;
  line-height: 1;
  padding: 0;
  transition: border-color .2s ease, color .2s ease;
}

#preview-prev { left: 8px; }
#preview-next { right: 8px; }

.preview-arrow:hover { border-color: var(--gold); color: var(--gold); }
.preview-arrow:disabled { opacity: 0.25; pointer-events: none; }

.preview-nav {
  position: relative;
  z-index: 1; /* establishes its own context above default stacking */
}

.preview-stage {
  z-index: 0;
  position: relative;
}

.preview-arrow {
  z-index: 50; /* now correctly wins inside .preview-nav's stacking context */
}

.preview-layers canvas {
  pointer-events: none;
}
