/* Surin Silks — hand-loomed mudmee from northeast Thailand */
/* Last updated: 2026-07-18 */

:root {
  --paper: #f4ede0;
  --paper-warm: #ede4d2;
  --ink: #1a1410;
  --ink-soft: #5a4e3e;
  --gold: #b8924e;
  --gold-bright: #d8b06e;
  --oxblood: #5a1818;
  --emerald: #1a3d2e;
  --sapphire: #0e2545;
  --night: #0c0907;

  --font-display: 'Libre Caslon Display', 'Caslon', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-meta: 'Inter Tight', 'Inter', sans-serif;

  --header-h: 68px;
  --pad-x: clamp(1.5rem, 4vw, 5rem);
  --maxw: 1480px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (min-width: 1100px) {
  body { font-size: 17px; }
}

img, picture, svg, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* film-grain overlay — gives the whole page a quiet shimmer */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.7  0 0 0 0 0.6  0 0 0 0 0.4  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 320px 320px;
}

/* layout helpers */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.fullbleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  color: inherit;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 { font-size: clamp(4rem, 11vw, 11rem); }
h2 { font-size: clamp(2.4rem, 5vw, 4.6rem); }
h3 { font-size: clamp(1.4rem, 1.8vw, 1.8rem); }
h4 {
  font-family: var(--font-meta);
  font-style: normal;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
  max-width: 56ch;
}
p:last-child { margin-bottom: 0; }

.meta {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.price {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* sticky header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  background: transparent;
  color: var(--paper);
  transition: background 300ms ease, color 300ms ease, border-color 300ms ease, backdrop-filter 300ms ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(244, 237, 224, 0.92);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  color: var(--ink);
  border-bottom-color: rgba(26, 20, 16, 0.08);
}
.site-header .container {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.nav-right { justify-content: flex-end; }

.icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
  transition: color 200ms ease;
}
.icon-btn:hover { color: var(--gold); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.2; }
/* over the transparent header the icons sit on photography — a whisper of shadow keeps them legible */
.site-header:not(.is-solid) .icon-btn svg { filter: drop-shadow(0 1px 2px rgba(12, 9, 7, 0.5)); }

.wordmark {
  font-family: var(--font-meta);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 50%, var(--gold) 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: shimmer 7s ease-in-out infinite;
}
.site-header.is-solid .wordmark {
  /* once the header goes cream, hold the mark steady in ink — no shimmer */
  background: none;
  color: var(--ink);
  animation: none;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* hero cinematic */
.hero-cinematic {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: var(--night);
  color: var(--paper);
}
.hero-cinematic picture,
.hero-cinematic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  animation: kenburns 18s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  0%   { transform: scale(1)    translate3d(0,0,0); }
  100% { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}
.hero-cinematic::before {
  /* bottom vignette so type sits cleanly */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(12,9,7,0.35) 0%,
    rgba(12,9,7,0) 28%,
    rgba(12,9,7,0) 52%,
    rgba(12,9,7,0.55) 100%);
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 0 var(--pad-x) clamp(3rem, 8vh, 6rem);
}
.hero-overlay .eyebrow {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.hero-overlay h1 {
  color: var(--paper);
  font-size: clamp(3.4rem, 9vw, 9rem);
  max-width: 14ch;
  line-height: 1;
}
.hero-overlay .hero-rule {
  width: 1px;
  height: 36px;
  background: var(--gold);
  margin: 1.6rem auto;
  opacity: 0.85;
}
.hero-overlay .hero-meta {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(244, 237, 224, 0.82);
}

/* sparkle — 4-point gold star */
.spark {
  display: inline-block;
  width: 8px;
  height: 8px;
  color: var(--gold-bright);
  animation: twinkle 3.4s ease-in-out infinite;
}
.spark.delay-1 { animation-delay: 0.6s; }
.spark.delay-2 { animation-delay: 1.2s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50%      { opacity: 1;    transform: scale(1.05); }
}

/* chapter section — full-bleed editorial */
.chapter-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: stretch;
  color: var(--paper);
  background: var(--night);
  overflow: hidden;
}
.chapter-section .chapter-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.chapter-section .chapter-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chapter-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(12,9,7,0.45) 0%,
    rgba(12,9,7,0.1) 35%,
    rgba(12,9,7,0.1) 60%,
    rgba(12,9,7,0.7) 100%);
  z-index: 1;
}
.chapter-section .chapter-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 8rem) var(--pad-x);
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.chapter-no {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.9;
  color: var(--gold-bright);
  align-self: start;
}
.chapter-copy {
  align-self: end;
  justify-self: end;
  max-width: 36rem;
  text-align: left;
}
.chapter-copy .eyebrow {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.chapter-copy h2 {
  color: var(--paper);
  margin-bottom: 1.4rem;
  max-width: 14ch;
}
.chapter-copy p {
  color: rgba(244, 237, 224, 0.88);
  max-width: 44ch;
  font-size: 1rem;
  line-height: 1.7;
}

/* collection — heading + horizontal rail */
.collection-block {
  padding: clamp(5rem, 10vw, 9rem) 0 clamp(3rem, 6vw, 5rem);
  background: var(--paper);
  color: var(--ink);
}
.collection-head {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.collection-head .eyebrow {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.collection-head h2 {
  max-width: 22ch;
}
.collection-head .collection-lede {
  max-width: 44ch;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}

.rail-wrap { position: relative; }
.rail {
  display: flex;
  gap: clamp(1rem, 2vw, 1.6rem);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--pad-x);
  padding: 0 var(--pad-x) 2.5rem;
  margin: 0 calc(50% - 50vw);
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 0; }
.rail::-webkit-scrollbar-track { background: transparent; }

.rail-card {
  flex: 0 0 380px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}
.rail-card .photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-warm);
}
.rail-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.2,.6,.2,1);
  will-change: transform;
}
.rail-card:hover .photo img { transform: scale(1.04); }

.rail-card .caption {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 0.1rem;
}
.rail-card .caption .num {
  font-family: var(--font-meta);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.rail-card .caption h3 {
  font-size: 1.4rem;
  transition: color 280ms ease;
}
.rail-card:hover .caption h3 { color: var(--gold); }
.rail-card .caption .price-row {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
}
.rail-card .caption .price-row .price { color: var(--ink-soft); }

.rail-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 0.6rem;
  color: var(--ink-soft);
}
.rail-foot .meta { color: var(--ink-soft); }
.rail-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.rail-nav {
  display: flex;
  gap: 0.5rem;
}
.rail-nav button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(26, 20, 16, 0.25);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  transition: border-color 220ms ease, color 220ms ease;
}
.rail-nav button:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.rail-nav svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.2; }
.rail-foot .pageline {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* color block — full-bleed jewel-tone pull-quote */
.color-block {
  position: relative;
  padding: clamp(6rem, 14vh, 10rem) var(--pad-x);
  text-align: center;
  color: var(--paper);
  overflow: hidden;
}
.color-block.oxblood { background: var(--oxblood); }
.color-block.sapphire { background: var(--sapphire); }
.color-block.emerald { background: var(--emerald); }

.color-block::before {
  /* brass hairline framing the quote */
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: clamp(3rem, 6vh, 5rem);
  background: var(--gold);
  opacity: 0.7;
}

.color-block .ornament {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold-bright);
  margin-bottom: 1.6rem;
  font-family: var(--font-meta);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.color-block blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.15;
  margin: 0 auto;
  max-width: 22ch;
  color: var(--paper);
}
.color-block blockquote::before,
.color-block blockquote::after {
  display: none;
}
.color-block .attribution {
  display: inline-block;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--gold);
  font-family: var(--font-meta);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-meta);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
  position: relative;
  transition: color 260ms ease, background 260ms ease, border-color 260ms ease;
}
.btn:hover {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}
.btn.btn-gold {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--gold);
}
.btn.btn-gold:hover {
  background: conic-gradient(from 0deg, var(--gold), var(--gold-bright), var(--gold));
  color: var(--ink);
  border-color: var(--gold-bright);
}
.btn.btn-ghost-light {
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(244, 237, 224, 0.55);
}
.btn.btn-ghost-light:hover {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}

/* footer */
.site-footer {
  background: var(--night);
  color: rgba(244, 237, 224, 0.78);
  padding: clamp(4rem, 8vw, 6rem) 0 2rem;
  margin-top: 0;
  font-size: 0.88rem;
}
.site-footer .container {
  display: grid;
  gap: clamp(2rem, 4vw, 3.4rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: clamp(1.6rem, 3vw, 3rem);
  align-items: start;
}
.footer-col h4 {
  color: var(--gold-bright);
  font-family: var(--font-meta);
  font-style: normal;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.footer-col p {
  max-width: 28ch;
  color: rgba(244, 237, 224, 0.7);
  line-height: 1.65;
  margin: 0 0 0.6em;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.footer-col a {
  color: rgba(244, 237, 224, 0.8);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 200ms ease, border-color 200ms ease;
}
.footer-col a:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}
.footer-col .brand-mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--paper);
  margin-bottom: 0.6rem;
}

.footer-bottom {
  border-top: 1px solid rgba(244, 237, 224, 0.08);
  padding-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: rgba(244, 237, 224, 0.55);
  font-family: var(--font-meta);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.footer-bottom .copy em {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.95rem;
  color: var(--paper);
  margin-right: 0.6rem;
}
.locale-select {
  display: inline-flex;
  gap: 1.2rem;
}
.locale-select span {
  position: relative;
  padding-right: 1.2rem;
}
.locale-select span + span::before {
  content: "·";
  position: absolute;
  left: -0.85rem;
  top: -1px;
  color: var(--gold);
}

/* reveal animation hooks — opacity only, long and quiet, no slide */
.reveal {
  opacity: 0;
  transition: opacity 900ms cubic-bezier(.25, .1, .25, 1);
  will-change: opacity;
}
.reveal.in-view {
  opacity: 1;
}
.reveal.delay-1 { transition-delay: 120ms; }
.reveal.delay-2 { transition-delay: 240ms; }
.reveal.delay-3 { transition-delay: 360ms; }

/* mobile menu panel — visual only */
.menu-panel {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(244, 237, 224, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  z-index: 90;
  display: none;
  padding: 3rem var(--pad-x);
}
.menu-panel.is-open { display: block; }
.menu-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.4rem;
  max-width: 24rem;
}
.menu-panel a {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--ink);
  transition: color 220ms ease;
}
.menu-panel a:hover { color: var(--gold); }

/* responsive */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .site-header .container { grid-template-columns: 1fr auto 1fr; }
  .wordmark { font-size: 0.7rem; letter-spacing: 0.3em; }
  .nav-left, .nav-right { gap: 0.6rem; }

  .hero-cinematic { min-height: 560px; }
  .hero-overlay h1 { font-size: clamp(2.6rem, 13vw, 5rem); }

  .chapter-section { min-height: 78vh; }
  .chapter-section .chapter-inner {
    grid-template-rows: auto auto;
    gap: 2rem;
  }
  .chapter-copy { justify-self: start; }
  .chapter-no { font-size: clamp(3.4rem, 14vw, 6rem); }

  .rail-card { flex-basis: 78vw; }
  .rail-nav { display: none; } /* touch scrolls the rail natively */

  .color-block { padding: 5rem var(--pad-x); }
  .color-block blockquote { font-size: clamp(1.6rem, 6vw, 2.4rem); }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-cinematic img { animation: none; }
}

/* ---- add-to-bag + shared cart drawer hooks (store, 2026-07-18) ---- */

.add-btn {
  margin-top: 0.9rem;
  font-family: var(--font-meta, 'Inter', sans-serif);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 0.7rem 1.3rem;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.add-btn:hover {
  background: var(--gold);
  color: var(--paper);
}

.icon-btn .sc-badge {
  font-size: 0.65rem;
  vertical-align: super;
}
