/*
  Layout wrapper shared by every header/section/footer:
  <header|section|footer> > .container > .header|section|footer-inner > content
*/
.container {
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 10px;
}

/* ==========================================================================
   HEADER
   Sticky, frosted — the blur lives on ::before (not .site-header itself) so
   it doesn't become the containing block for the mobile drawer's fixed
   positioning (CONVENTIONS.md §19/§20).
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(23, 20, 15, 0.1);
}

main {
  padding-top: var(--header-height, 88px);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height, 88px);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
  transition: padding-top 0.3s ease, padding-bottom 0.3s ease;
}

/* Header compacts slightly once the page has scrolled — toggled via
   .is-scrolled by main.js's initHeaderScroll(). */
.site-header.is-scrolled .header-inner {
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo img {
  display: block;
  height: 36px;
  width: auto;
}

.nav {
  display: flex;
  gap: 34px;
  align-items: center;
}

.nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.nav a:not(.nav-cta):hover {
  color: var(--color-main-2);
}

.nav-cta {
  height: 42px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  background: var(--color-main-1);
  color: var(--color-background) !important;
  border-radius: 2px;
  transition: background-color 0.25s ease;
}

.nav-cta:hover {
  background: var(--color-main-2);
}

/* Out of flow on desktop too — otherwise, even empty, it's still a flex
   item in .header-inner and throws off justify-content: space-between. */
.nav-overlay,
.nav-close {
  display: none;
}

/* Mobile nav: a full-height side drawer, not a top dropdown — slides in
   from the right and covers the full screen height (including over the
   header), with a dimmed backdrop behind it. */
@media (max-width: 1024px) {
  .nav-toggle {
    display: flex;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 105;
    background: rgba(23, 20, 15, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .nav-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    width: min(360px, 85vw);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 28px;
    background: var(--color-background);
    box-shadow: -12px 0 36px rgba(23, 20, 15, 0.14);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav-close {
    display: flex;
    align-self: flex-end;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-text);
    cursor: pointer;
  }

  .nav a {
    padding: 16px 0;
    border-bottom: 1px solid rgba(23, 20, 15, 0.1);
    font-size: 15px;
  }

  .nav-cta {
    margin-top: 20px;
    justify-content: center;
    text-align: center;
    border-bottom: none;
  }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section {
  padding-top: 120px;
  padding-bottom: 120px;

  @media (max-width: 1360px) {
    padding-top: 60px;
    padding-bottom: 60px;
  }
}

.section-eyebrow-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-title-wrap {
  max-width: 640px;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  margin-top: calc(-1 * var(--header-height, 88px));
  padding-top: calc(var(--header-height, 88px) + 90px);
  padding-bottom: 100px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  margin-bottom: 24px;
}

.hero-title-wrap {
  max-width: 620px;
}

.hero h1 {
  margin-bottom: 30px;
}

.hero-text-wrap {
  max-width: 480px;
}

.hero-lede {
  color: var(--color-text);
  opacity: 0.72;
}

.hero-ctas {
  margin-top: 42px;
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }
}

/* ==========================================================================
   TURNTABLE — a real, textured 3D garment (glTF, converted from the
   supplied FBX + PBR textures — see ref/example/) rendered with
   <model-viewer> (assets/libs/model-viewer/), rather than faked with CSS.
   Three CSS-only approaches were tried first (a 12-facet lathe, a
   front/back flat pair, a single flat clip-path silhouette) and none
   read as real cloth up close — model-viewer gives actual geometry,
   material shading and drag-to-orbit for free.
   Markup:
   <div class="turntable-stage">
     <model-viewer class="turntable-model" src="assets/models/dress.glb" ...></model-viewer>
   </div>
   ========================================================================== */

.turntable-stage {
  position: relative;
  height: 560px;
  background: var(--color-main-1);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.turntable-tag {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 1;
  color: rgba(247, 245, 240, 0.55);
}

.turntable-hint {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(247, 245, 240, 0.55);
}

.turntable-hint i {
  margin-right: 6px;
  vertical-align: -2px;
}

.turntable-model {
  width: 100%;
  height: 100%;
  --poster-color: transparent;
}

@media (max-width: 767px) {
  .turntable-stage {
    height: 440px;
  }
}

/* ==========================================================================
   MARQUEE
   Continuous scrolling ticker of tracked words, duplicated in markup for a
   seamless loop; pauses on hover.
   ========================================================================== */

.marquee {
  border-top: 1px solid rgba(23, 20, 15, 0.1);
  border-bottom: 1px solid rgba(23, 20, 15, 0.1);
  background: var(--color-background-2);
  overflow: hidden;
  padding: 28px 0;
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee-scroll 36s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 24px;
  white-space: nowrap;
  padding: 0 28px;
  opacity: 0.8;
}

.marquee-dot {
  font-size: 14px;
  color: var(--color-main-2);
  opacity: 1;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}

/* ==========================================================================
   PROCESS
   ========================================================================== */

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 42px;
}

.process-step {
  padding-top: 24px;
  border-top: 1px solid rgba(23, 20, 15, 0.16);
}

.process-step .eyebrow {
  display: block;
  margin-bottom: 14px;
}

.process-step h3 {
  font-size: 28px;
  margin-bottom: 14px;
}

.process-step p {
  opacity: 0.72;
}

@media (max-width: 1024px) {
  .process-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ==========================================================================
   BODY SCAN
   ========================================================================== */

.bi-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
  align-items: center;
}

.bi-section.bi-reverse {
  grid-template-columns: 1.1fr 0.9fr;
}

.bi-section.bi-reverse .bi-media {
  order: 2;
}

.blueprint-panel {
  position: relative;
  background: var(--color-background-2);
  border-radius: 2px;
  padding: 36px;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blueprint-panel svg {
  width: 100%;
  height: 100%;
}

.measurement-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 36px 0;
  padding: 24px 0;
  border-top: 1px solid rgba(23, 20, 15, 0.14);
  border-bottom: 1px solid rgba(23, 20, 15, 0.14);
}

.measurement-row dt {
  margin-bottom: 8px;
}

.measurement-row dd {
  font-family: var(--font-title);
  font-size: 24px;
}

.bi-note {
  opacity: 0.65;
  font-size: 14px;
  margin-bottom: 30px;
}

.bi-note a {
  color: var(--color-text);
}

@media (max-width: 1024px) {
  .bi-section,
  .bi-section.bi-reverse {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .bi-section.bi-reverse .bi-media {
    order: -1;
  }

  .measurement-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   FABRICS
   ========================================================================== */

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pill {
  height: 38px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(23, 20, 15, 0.22);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-pill:hover {
  border-color: var(--color-main-1);
}

.filter-pill.is-active {
  background: var(--color-main-2);
  border-color: var(--color-main-2);
  color: var(--color-background);
}

.fabric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 42px;
}

.fabric-card {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.fabric-card.is-hidden {
  display: none;
}

.fabric-swatch {
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.fabric-swatch::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%);
}

.swatch-silk    { background: center / cover no-repeat url("../img/fabrics/silk.jpg"); }
.swatch-wool    { background: center / cover no-repeat url("../img/fabrics/wool.jpg"); }
.swatch-linen   { background: center / cover no-repeat url("../img/fabrics/linen.jpg"); }
.swatch-cotton  { background: center / cover no-repeat url("../img/fabrics/cotton.jpg"); }
.swatch-denim   { background: center / cover no-repeat url("../img/fabrics/denim.jpg"); }
.swatch-leather { background: center / cover no-repeat url("../img/fabrics/leather.jpg"); }

.fabric-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.fabric-name-row h3 {
  font-size: 22px;
}

.fabric-price {
  font-family: var(--font-mono);
  white-space: nowrap;
}

.fabric-tags-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.fabric-tags-row .eyebrow {
  color: var(--color-main-2);
}

@media (max-width: 1024px) {
  .fabric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .fabric-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   TAILORS
   ========================================================================== */

.tailor-list {
  display: flex;
  flex-direction: column;
}

.tailor-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.7fr;
  gap: 24px;
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid rgba(23, 20, 15, 0.14);
}

.tailor-list .tailor-row:last-child {
  border-bottom: 1px solid rgba(23, 20, 15, 0.14);
}

.tailor-note {
  margin-top: 24px;
  opacity: 0.65;
  font-size: 14px;
}

.tailor-city {
  display: block;
  margin-bottom: 8px;
}

.tailor-name {
  font-size: 26px;
  margin-bottom: 8px;
}

.tailor-specialty {
  color: var(--color-main-2);
}

.tailor-meta span {
  display: block;
  opacity: 0.7;
  margin-bottom: 6px;
}

.tailor-rating {
  text-align: right;
}

.tailor-rating strong {
  display: block;
  font-family: var(--font-title);
  font-size: 26px;
}

.tailor-rating span {
  opacity: 0.6;
}

@media (max-width: 767px) {
  .tailor-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tailor-rating {
    text-align: left;
  }
}

/* ==========================================================================
   ASSISTANT
   ========================================================================== */

.ask-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.ask-chip {
  padding: 16px 20px;
  background: var(--color-background-2);
  border-radius: 2px;
  opacity: 0.85;
}

.assistant-card {
  background: #FBFAF7;
  border: 1px solid rgba(23, 20, 15, 0.1);
  border-radius: 2px;
  padding: 42px;
}

.assistant-card .eyebrow {
  display: block;
  margin-bottom: 20px;
}

.assistant-question {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 24px;
  margin-bottom: 20px;
}

.assistant-answer {
  padding-top: 20px;
  border-top: 1px solid rgba(23, 20, 15, 0.1);
  opacity: 0.75;
}

/* ==========================================================================
   PHILOSOPHY / PULL QUOTE
   ========================================================================== */

.philosophy-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.philosophy-quote {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 40px;
  line-height: 1.3;
  margin-bottom: 28px;
}

@media (max-width: 1024px) {
  .philosophy-quote {
    font-size: 28px;
  }
}

.philosophy-attribution {
  display: block;
}

/* ==========================================================================
   FINAL CTA (dark band)
   ========================================================================== */

.final-cta {
  background: var(--color-main-1);
  text-align: center;
}

.final-cta .eyebrow {
  color: rgba(247, 245, 240, 0.6);
}

.final-cta h2,
.final-cta p {
  color: var(--color-background);
}

.final-cta-title-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.final-cta-text-wrap {
  max-width: 480px;
  margin: 0 auto;
}

.final-cta p {
  opacity: 0.7;
}

.final-cta .button.btn-primary {
  margin: 36px auto 0;
  background: var(--color-background);
  border-color: var(--color-background);
  color: var(--color-main-1);
}

.final-cta .button.btn-primary:hover {
  background: var(--color-main-2);
  border-color: var(--color-main-2);
  color: var(--color-background);
}

/* ==========================================================================
   EARLY ACCESS FORM
   ========================================================================== */

.early-access {
  background: var(--color-background-2);
}

.early-access .section-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.early-access .contact-form-box {
  text-align: left;
  margin-top: 12px;
}

/* Legal pages (privacy policy, cookies policy, terms of use) */
.legal-page .section-inner {
  max-width: 760px;
  margin: 0 auto;
}

.legal-page h1 {
  margin-bottom: 20px;
}

.legal-page .eyebrow {
  display: block;
  margin-bottom: 16px;
}

.legal-page .legal-intro {
  opacity: 0.72;
  margin-bottom: 54px;
  padding-bottom: 42px;
  border-bottom: 1px solid rgba(23, 20, 15, 0.14);
}

.legal-page .legal-clause {
  margin-bottom: 54px;
}

.legal-page .legal-clause .eyebrow {
  margin-bottom: 6px;
}

.legal-page h2 {
  font-size: 30px;
  margin-bottom: 14px;
}

.legal-page p + p {
  margin-top: 14px;
}

.legal-page p a {
  color: var(--color-text);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  padding: 90px 0 28px;
  background: var(--color-main-1);
}

.site-footer h3,
.site-footer p,
.site-footer a {
  color: var(--color-background);
}

.footer-inner {
  display: flex;
  flex-direction: column;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 42px;
  padding-bottom: 42px;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(247, 245, 240, 0.16);
}

.footer-col-brand .logo {
  display: inline-block;
  margin-bottom: 16px;
}

.footer-description {
  max-width: 260px;
  opacity: 0.6;
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 16px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  text-decoration: none;
  opacity: 0.85;
}

.footer-nav a:hover {
  opacity: 1;
  color: var(--color-background) !important;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-bottom p {
  opacity: 0.5;
  font-size: 14px;
}

.current-year {
  color: inherit;
  font-size: inherit;
}

.legal-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.legal-nav a {
  text-decoration: none;
  opacity: 0.6;
  font-size: 14px;
}

.legal-nav a:hover {
  opacity: 1;
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ==========================================================================
   COOKIE CONSENT
   ========================================================================== */

.accept-cookies-block {
  position: fixed;
  left: 10px;
  bottom: 10px;
  display: flex;
  max-width: 750px;
  border-radius: 2px;
  padding: 30px;
  flex: 1 0 0;
  background: var(--color-main-1);
  box-shadow: 0 12px 36px rgba(23, 20, 15, 0.24);
  z-index: 999;
}

.accept-cookies-block .content-inner {
  display: flex;
  gap: 24px;
  align-items: center;
}

.accept-cookies-block .content-text p {
  color: var(--color-background);
  font-size: 14px;
  font-weight: 400;
  line-height: 160%;
}

.accept-cookies-block .content-text a {
  color: var(--color-background);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.accept-cookies-block .content-inner .button {
  height: 42px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--color-background);
  color: var(--color-main-1);
  cursor: pointer;
  transition: 0.3s;
}

.accept-cookies-block .content-inner .button:hover {
  background: var(--color-background-2);
}

@media (max-width: 450px) {
  .accept-cookies-block {
    max-width: calc(100vw - 20px);
  }

  .accept-cookies-block .content-inner {
    flex-direction: column;
  }

  .accept-cookies-block .content-inner p {
    text-align: center;
  }
}
