/* ==========================================================================
   ACCD - Concept A: Atelier
   Near-black precision-craft microsite. Fraunces (display) + Archivo (body).
   ========================================================================== */

:root {
  --ink: #0A0A0B;
  --graphite: #1C1C1F;
  --graphite-2: #232327;
  --bone: #F4EFE8;
  --bone-dim: #C9C3B8;
  --gold: #C6A15B;
  --gold-bright: #D9BC7E;
  --hairline: rgba(244, 239, 232, 0.14);
  --hairline-dark: rgba(10, 10, 11, 0.12);

  --serif: "Fraunces", Georgia, serif;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
  font-weight: 600;
}

.sec-title {
  font-family: var(--serif);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.sec-note { color: var(--bone-dim); font-size: 0.98rem; margin: 0; }

.gold-italic { color: var(--gold); font-style: italic; }

/* film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* section markers (configurator numbering) */
.sec { position: relative; }
.sec-marker {
  position: absolute;
  top: 2.2rem;
  left: 2.2rem;
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--bone-dim);
  border: 1px solid var(--hairline);
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  z-index: 5;
}
.sec-marker.dark-marker { color: var(--graphite); border-color: var(--hairline-dark); }

.sec-head { max-width: 720px; margin: 0 auto 3.5rem; padding: 0 2rem; text-align: center; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: transform 0.4s var(--ease), background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn span { position: relative; z-index: 2; }
.btn-gold { background: var(--gold); color: var(--ink); border: 1px solid var(--gold); }
.btn-gold:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn-gold-outline { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn-gold-outline:hover { background: var(--gold); color: var(--ink); }
.btn-line { background: transparent; color: var(--bone); border: 1px solid var(--hairline); }
.btn-line:hover { border-color: var(--gold); color: var(--gold); }
.btn-line-dark { background: transparent; color: var(--graphite); border: 1px solid var(--hairline-dark); }
.btn-line-dark:hover { border-color: var(--gold); color: #8a6e34; }

/* ===================== NAV ===================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 800;
  background: linear-gradient(to bottom, rgba(10,10,11,0.85), transparent);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.4rem 2.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img { height: 34px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2.2rem; }
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-dim);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.35s var(--ease);
}
.nav-links a:not(.nav-cta):hover { color: var(--bone); }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  border: 1px solid var(--gold);
  color: var(--gold) !important;
  padding: 0.6rem 1.2rem;
  border-radius: 2px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--gold); color: var(--ink) !important; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
}
.nav-burger span {
  display: block;
  width: 18px; height: 1px;
  background: var(--bone);
  margin: 0 auto;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  position: fixed;
  top: 0; right: 0;
  width: min(84vw, 380px);
  height: 100vh;
  background: var(--graphite);
  border-left: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding: 6.5rem 2.2rem 2.2rem;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  z-index: 799;
}
.nav-mobile.open { transform: translateX(0); }
.nav-mobile a {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--bone);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1rem;
}
.nav-mobile-cta {
  margin-top: 1rem;
  background: var(--gold);
  color: var(--ink) !important;
  text-align: center;
  padding: 1rem;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: none;
}
.nav-mobile-phone { text-align: center; color: var(--gold); border-bottom: none; font-family: var(--sans); font-size: 1rem; }

/* ===================== 01 HERO ===================== */
.hero {
  height: 100svh;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.12);
  will-change: transform;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10,10,11,0.96) 5%, rgba(10,10,11,0.55) 45%, rgba(10,10,11,0.35) 100%),
    linear-gradient(to right, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0.05) 55%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 2.2rem 6.5rem;
  max-width: 900px;
}
.hero-h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 1.6rem;
}
.mask-line { display: block; overflow: hidden; }
.mask-inner { display: block; }
.hero-sub {
  font-size: clamp(0.98rem, 1.4vw, 1.15rem);
  color: var(--bone-dim);
  max-width: 560px;
  margin: 0 0 2.2rem;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-scroll-cue {
  position: absolute;
  bottom: 2rem; right: 2.2rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.hero-scroll-cue span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-dim);
  writing-mode: vertical-rl;
}
.scroll-line { width: 1px; height: 50px; background: var(--hairline); position: relative; overflow: hidden; }
.scroll-line::after {
  content: "";
  position: absolute; top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--gold);
  animation: scrollDrop 2.2s ease-in-out infinite;
}
@keyframes scrollDrop { 0% { top: -100%; } 60% { top: 100%; } 100% { top: 100%; } }

/* ===================== 02 BEFORE/AFTER CONFIGURATOR ===================== */
.ba { background: var(--bone); color: var(--ink); padding: 7.5rem 0 6rem; }
.ba .sec-title, .ba .sec-note { color: var(--ink); }
.ba .sec-note { color: #63594a; }

.configurator { max-width: 980px; margin: 0 auto; padding: 0 2rem; }

.config-readout {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--hairline-dark);
  border-bottom: 1px solid var(--hairline-dark);
  padding: 0.9rem 0;
  margin-bottom: 1.4rem;
  font-family: var(--sans);
}
.config-readout-row { display: flex; gap: 0.6rem; align-items: baseline; }
.config-label { font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase; color: #8a8171; }
.config-value { font-family: var(--serif); font-size: 1rem; font-weight: 600; color: var(--ink); }

.ba-slider-wrap { position: relative; }
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  overflow: hidden;
  cursor: ew-resize;
  background: var(--graphite);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.35);
}
.ba-after, .ba-before {
  position: absolute; inset: 0;
}
.ba-after img, .ba-before img {
  width: 100%; height: 100%; object-fit: cover;
}
.ba-before { clip-path: inset(0 50% 0 0); }
.ba-tag {
  position: absolute;
  top: 1rem;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: 2px;
  font-weight: 700;
}
.ba-tag-after { right: 1rem; background: var(--gold); color: var(--ink); }
.ba-tag-before { left: 1rem; background: rgba(10,10,11,0.7); color: var(--bone); }
.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 0;
  transform: translateX(-50%);
  pointer-events: none;
}
.ba-handle-line { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--gold); transform: translateX(-1px); }
.ba-handle-grip {
  position: absolute;
  top: 50%; left: 0;
  width: 42px; height: 42px;
  transform: translate(-50%, -50%);
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  gap: 3px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
#baRange {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

.ba-selector {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.6rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}
.ba-thumb {
  flex: 0 0 auto;
  width: 76px; height: 76px;
  border-radius: 2px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}
.ba-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ba-thumb.active, .ba-thumb:hover { opacity: 1; border-color: var(--gold); }

.ba-cta { text-align: center; margin-top: 2.8rem; }

/* ===================== 03 THE ATELIER ===================== */
.atelier { background: var(--ink); padding: 7.5rem 0; }
.atelier-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
}
.atelier-panel {
  padding: 2.4rem 2rem;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
.atelier-panel:last-child { border-right: none; }
.atelier-panel-media {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 2px;
  margin-bottom: 1.4rem;
  filter: grayscale(0.25) contrast(1.05);
}
.atelier-panel-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.atelier-panel:hover .atelier-panel-media img { transform: scale(1.05); }
.atelier-panel-num { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1rem; margin-bottom: 0.6rem; }
.atelier-panel h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin: 0 0 0.7rem; }
.atelier-panel p { color: var(--bone-dim); font-size: 0.94rem; margin: 0; }

/* ===================== 04 SIGNATURE SERVICES ===================== */
.services { background: var(--bone); color: var(--ink); padding: 7.5rem 0; }
.services .sec-title { color: var(--ink); }
.services-list { max-width: 980px; margin: 0 auto; padding: 0 2rem; }
.service-row {
  display: grid;
  grid-template-columns: 70px 280px 1fr;
  gap: 1.6rem;
  align-items: baseline;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--hairline-dark);
  transition: background 0.3s ease;
}
.service-row:hover { background: rgba(198,161,91,0.06); }
.service-idx { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1.1rem; }
.service-name { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; margin: 0; }
.service-desc { color: #5c5343; font-size: 0.95rem; margin: 0; }
.service-row-support { opacity: 0.82; }

/* ===================== 05 SMILE SIMULATOR ===================== */
.sim {
  min-height: 68vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.sim-media { position: absolute; inset: 0; z-index: 1; }
.sim-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.sim-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(10,10,11,0.94) 15%, rgba(10,10,11,0.55) 60%, rgba(10,10,11,0.3) 100%);
}
.sim-content { position: relative; z-index: 2; padding: 5rem 2.2rem; max-width: 620px; }
.sim-body { color: var(--bone-dim); font-size: 1.05rem; margin: 0 0 2rem; max-width: 460px; }
.sim-disclaimer { font-size: 0.76rem; color: rgba(244,239,232,0.5); margin-top: 1.4rem; max-width: 480px; line-height: 1.5; }

/* ===================== 06 PROOF ===================== */
.proof { background: var(--graphite); padding: 7.5rem 0 5rem; text-align: center; }
.proof .sec-head { margin-bottom: 3.5rem; }
.proof-stats {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.proof-stat {
  padding: 2.4rem 1.4rem;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.proof-stat:last-child { border-right: none; }
.proof-num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 3.6vw, 3.2rem);
  color: var(--gold);
  line-height: 1;
}
.proof-num-text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  color: var(--gold);
  line-height: 1.15;
}
.proof-label { font-size: 0.82rem; color: var(--bone-dim); max-width: 220px; }
.proof-media-line { margin: 2.6rem auto 0; color: var(--bone-dim); font-size: 0.92rem; }
.awards-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2.6rem;
  padding: 0 2rem;
}
.awards-bar img { height: 52px; width: auto; opacity: 0.82; filter: grayscale(0.15); }

/* ===================== 07 CONSULTATION CTA ===================== */
.consult { background: var(--ink); padding: 8rem 0; text-align: center; position: relative; }
.consult::before {
  content: "";
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 1px; height: 60px; background: var(--gold);
}
.consult-inner { max-width: 720px; margin: 0 auto; padding: 0 2.2rem; }
.consult-title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.14; margin: 0 0 1.2rem; }
.consult-body { color: var(--bone-dim); font-size: 1rem; max-width: 560px; margin: 0 auto 2.4rem; }
.consult-ctas { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ===================== FOOTER ===================== */
.footer { background: var(--graphite); border-top: 1px solid var(--hairline); padding: 4.5rem 2.2rem 2rem; }
.footer-top { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--hairline); }
.footer-logo { height: 30px; opacity: 0.9; }
.footer-cols { display: flex; gap: 3.2rem; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin: 0 0 0.8rem; }
.footer-col p { font-size: 0.88rem; color: var(--bone-dim); margin: 0; line-height: 1.7; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; padding-top: 1.6rem; font-size: 0.75rem; color: rgba(244,239,232,0.4); flex-wrap: wrap; gap: 0.5rem; }

/* ===================== reveal defaults (JS toggles .is-visible) ===================== */
.reveal-up { opacity: 0; transform: translateY(24px); }
.reveal-up.is-visible { opacity: 1; transform: translateY(0); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .atelier-grid { grid-template-columns: 1fr; }
  .atelier-panel { border-right: none; }
  .service-row { grid-template-columns: 44px 1fr; }
  .service-desc { grid-column: 2 / 3; }
  .proof-stats { grid-template-columns: repeat(2, 1fr); }
  .proof-stat:nth-child(2) { border-right: none; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .hero-content { padding-bottom: 5rem; }
  .hero-scroll-cue { display: none; }
  .sec-marker { top: 1.2rem; left: 1.2rem; font-size: 0.72rem; padding: 0.24rem 0.55rem; }
  .sec-head { padding: 0 1.4rem; margin-bottom: 2.4rem; }
  .configurator { padding: 0 1.4rem; }
  .atelier-grid, .services-list { padding: 0 1.4rem; }
  .service-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .service-desc { grid-column: auto; }
  .proof-stats { grid-template-columns: 1fr; padding: 0 1.4rem; }
  .proof-stat { border-right: none !important; border-bottom: 1px solid var(--hairline); }
  .proof-stat:last-child { border-bottom: none; }
  .awards-bar { gap: 1.6rem; }
  .awards-bar img { height: 38px; }
  .footer-top { flex-direction: column; gap: 2rem; }
  .footer-bottom { flex-direction: column; }
  .sim-content { padding: 3.5rem 1.4rem; }
  .consult-inner { padding: 0 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.2s !important; }
  .hero-media img { transform: none !important; }
  .reveal-up { opacity: 1; transform: none; }
}
