/* =========================================================
   BHUTAN WOOD
   Palette: paper, bark ink, forest (from the logo), moss, sapwood edge
   Type: Bricolage Grotesque (display + UI), Newsreader (botanical names, mission)
   Signature: the hero plywood stack — face veneer over cross-banded cores
========================================================= */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/bricolage.woff2') format('woff2-variations'), url('../fonts/bricolage.woff2') format('woff2');
  font-weight: 200 800; font-stretch: 75% 100%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader.woff2') format('woff2-variations'), url('../fonts/newsreader.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader-italic.woff2') format('woff2-variations'), url('../fonts/newsreader-italic.woff2') format('woff2');
  font-weight: 200 800; font-style: italic; font-display: swap;
}

:root {
  --paper: #FBFAF7;
  --paper-2: #F2F0EA;
  --ink: #1C1814;
  --ink-2: #4E4740;
  --muted: #7A726A;
  --line: #E3DED4;
  --forest: #1F4D3A;
  --forest-2: #163A2B;
  --moss: #A9C0A1;
  --sap: #E6CFA6;
  --sap-dark: #BF9A68;

  --sans: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  --wrap: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 72px;
  --inner: calc(var(--wrap) - 2 * var(--gutter));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
address { font-style: normal; }

:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 4px; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 6px;
}
.skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 3rem; padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 500; font-size: .98rem;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn--solid { background: var(--forest); color: var(--paper); }
.btn--solid:hover { background: var(--forest-2); transform: translateY(-1px); }
.btn--ghost { border: 1px solid var(--line); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(251, 250, 247, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner {
  max-width: var(--wrap); margin: 0 auto; height: var(--nav-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: .7rem; transition: opacity .4s var(--ease), transform .4s var(--ease); }
.nav:not(.is-scrolled):not(.menu-open) .brand { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.brand img { width: 74px; height: auto; }
.brand span {
  font-weight: 600; font-size: 1.3rem; letter-spacing: -.015em;
  font-stretch: 90%;
  color: var(--forest);
}
.nav__links { display: flex; align-items: center; gap: 2rem; font-size: .96rem; }
.nav__links a:not(.nav__cta) { position: relative; color: var(--ink-2); transition: color .25s; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav__links a:not(.nav__cta):hover { color: var(--ink); }
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  padding: .55rem 1.1rem; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  transition: background .3s var(--ease);
}
.nav__cta:hover { background: var(--forest); }

.nav__burger { display: none; width: 44px; height: 44px; position: relative; }
.nav__burger span {
  position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink);
  transition: transform .4s var(--ease);
}
.nav__burger span:first-child { top: 18px; }
.nav__burger span:last-child { top: 25px; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.nav__mobile {
  display: grid; gap: .25rem; padding: 0 var(--gutter);
  max-height: 0; overflow: hidden;
  background: var(--paper);
  transition: max-height .5s var(--ease), padding .5s var(--ease);
}
.nav__mobile a {
  font-size: 1.6rem; font-weight: 500; letter-spacing: -.02em; padding: .35rem 0;
  border-bottom: 1px solid var(--line);
}
.nav__mobile.is-open { max-height: 22rem; padding: .5rem var(--gutter) 1.5rem; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--wrap); margin: 0 auto;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--nav-h) + 3rem) var(--gutter) 4rem;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: clamp(2rem, 5vw, 5rem);
}
.hero__logo { display: flex; align-items: flex-end; gap: 1.25rem; margin-bottom: 2.25rem; }
.hero__logo img { width: clamp(170px, 18vw, 240px); height: auto; }
.hero__brandline {
  font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.2;
  color: var(--forest); padding: 0 0 .35rem 1.25rem; border-left: 1px solid var(--line);
}
.hero__title {
  font-size: clamp(2.5rem, 5.2vw, 4.9rem);
  line-height: 1.04; letter-spacing: -.022em; font-weight: 500;
  font-stretch: 92%;
  font-variation-settings: "opsz" 96;
  margin-bottom: 1.75rem;
  text-wrap: balance;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.hero__title .line > span { display: inline-block; }
.hero__sub { max-width: 34rem; color: var(--ink-2); font-size: 1.12rem; margin-bottom: 2.25rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero__visual { position: relative; display: grid; justify-items: center; }

/* The plywood stack */
.stack-scene {
  position: relative; width: min(540px, 100%); aspect-ratio: 1 / .92;
  perspective: 1800px; perspective-origin: 50% 20%;
}
.stack {
  --t: 11px;
  --rx: 56deg; --rz: -34deg;
  position: absolute; left: 50%; top: 52%;
  width: 62%; aspect-ratio: 1.38 / 1;
  transform: translate(-50%, -50%) rotateX(var(--rx)) rotateZ(var(--rz));
  transform-style: preserve-3d;
}
.sheet {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: translateZ(calc(var(--i) * var(--t)));
  transform-style: preserve-3d;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12);
  transition: transform 1.1s var(--ease), opacity .6s var(--ease);
  transition-delay: calc(var(--i) * 110ms + 150ms);
}
.sheet::before,
.sheet::after { content: ""; position: absolute; }
/* front edge */
.sheet::before {
  left: 0; top: 100%; width: 100%; height: var(--t);
  transform-origin: top; transform: rotateX(-90deg);
  background: linear-gradient(180deg, var(--sap) 0 70%, var(--sap-dark) 100%);
}
/* side edge */
.sheet::after {
  top: 0; left: 100%; width: var(--t); height: 100%;
  transform-origin: left; transform: rotateY(90deg);
  background: linear-gradient(90deg, #D9BC8C 0 70%, #A8835A 100%);
}
.sheet--cross::before { background: repeating-linear-gradient(90deg, #E2C697 0 3px, #D2B07F 3px 5px); }
.sheet--cross::after { background: linear-gradient(90deg, #CFAE7E 0 70%, #9F7B52 100%); }
.sheet--top { box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .15), inset 0 0 60px rgba(0, 0, 0, .12); }
.sheet__swap {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  clip-path: inset(0 100% 0 0);
}
.sheet__swap.is-laying { transition: clip-path .9s var(--ease); clip-path: inset(0 0 0 0); }

/* Ground shadow */
.stack-scene::after {
  content: ""; position: absolute; left: 18%; right: 14%; bottom: 10%; height: 16%;
  background: radial-gradient(closest-side, rgba(28, 24, 20, .22), transparent);
  filter: blur(8px); z-index: -1;
  transition: opacity 1.2s var(--ease) .6s;
}

/* Pre-build state (only when JS is running) */
.js .stack:not(.is-built) .sheet { transform: translateZ(calc(var(--i) * var(--t) + 280px)); opacity: 0; }
.js .stack-scene:not(.is-built)::after { opacity: 0; }

.stack-notes { position: absolute; inset: 0; pointer-events: none; font-size: .82rem; }
.note {
  position: absolute; display: grid; gap: .1rem;
  opacity: 0; transform: translateY(6px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.note span { color: var(--muted); }
.note b { font-weight: 500; color: var(--ink); }
.note::before { content: ""; position: absolute; background: var(--ink); opacity: .35; }
.note--face { top: 6%; right: 0; text-align: right; }
.note--face::before { width: 1px; height: 38px; right: 12px; top: calc(100% + 6px); }
.note--core { left: 0; bottom: 24%; }
.note--core::before { height: 1px; width: 40px; left: calc(100% + 8px); top: 50%; }
.is-built .note, .hero__visual.is-built .note { opacity: 1; transform: none; }
.hero__visual.is-built .note--core { transition-delay: .2s; }

.swatches { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; }
.swatches p { font-size: .85rem; color: var(--muted); }
.swatches__row { display: flex; gap: .5rem; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%;
  background-size: 300%; background-position: center;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .1);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.swatch:hover { transform: translateY(-2px); }
.swatch.is-active { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }

/* Hero load sequence */
.js [data-load] { opacity: 0; transform: translateY(14px); }
.js .hero__title[data-load] { opacity: 1; transform: none; }
.js .hero__title .line > span { transform: translateY(105%); }
.is-loaded [data-load] {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.is-loaded .hero__title .line > span { transform: none; transition: transform 1.1s var(--ease); }
.is-loaded .hero__title .line:nth-child(2) > span { transition-delay: .08s; }
.is-loaded .hero__title .line:nth-child(3) > span { transition-delay: .16s; }
.is-loaded .hero__sub { transition-delay: .35s; }
.is-loaded .hero__actions { transition-delay: .45s; }

/* ---------- About ---------- */
.about { padding: clamp(5rem, 11vw, 9rem) var(--gutter); border-top: 1px solid var(--line); }
.about__inner {
  max-width: var(--inner); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(2rem, 6vw, 6rem);
}
.about__figure {
  grid-column: 1 / -1; margin-bottom: clamp(3rem, 7vw, 5.5rem);
  border-radius: 18px; overflow: hidden; aspect-ratio: 1560 / 501; background: var(--paper-2);
}
.about__figure img { width: 100%; height: 116%; object-fit: cover; will-change: transform; }
.about__text { display: contents; }
.about__label { font-size: .95rem; font-weight: 500; color: var(--forest); margin-bottom: 1.5rem; }
.mission {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.55rem, 2.7vw, 2.35rem);
  line-height: 1.32; letter-spacing: -.01em;
  max-width: 34ch;
}
.mission .w { transition: color .35s linear; color: rgba(28, 24, 20, .2); }
.mission .w.on { color: var(--ink); }
.no-js-words .mission .w { color: var(--ink); }

/* ---------- Values ---------- */
.values {
  position: relative; isolation: isolate;
  background: var(--ink); color: var(--paper);
  padding: clamp(5rem, 10vw, 8rem) var(--gutter);
  overflow: hidden;
}
.values::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url('../assets/bark-texture.jpg') center / 440px repeat;
  opacity: .16; mix-blend-mode: luminosity;
}
.values__inner { max-width: var(--inner); margin: 0 auto; }
.values__title {
  font-size: .95rem; font-weight: 500; color: var(--moss); margin-bottom: 3rem;
}
.values__grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(251, 250, 247, .18); }
.value { padding: 2.25rem 2rem 0 0; }
.value + .value { padding-left: 2rem; border-left: 1px solid rgba(251, 250, 247, .18); }
.value h3 {
  font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 400; letter-spacing: -.025em; line-height: 1;
  font-stretch: 88%; font-variation-settings: "opsz" 96;
  margin-bottom: 1rem;
}
.value p { font-family: var(--serif); font-size: 1.3rem; color: rgba(251, 250, 247, .72); max-width: 18ch; }

/* ---------- Products ---------- */
.products { max-width: var(--wrap); margin: 0 auto; padding: clamp(5rem, 10vw, 8rem) var(--gutter); }
.products__head {
  display: grid; grid-template-columns: 1fr minmax(0, 26rem); gap: 2rem; align-items: end;
  margin-bottom: 3rem;
}
.products__title {
  font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 500; letter-spacing: -.03em; line-height: .95;
  font-stretch: 88%; font-variation-settings: "opsz" 96;
}
.products__intro { color: var(--ink-2); }

.tabs {
  position: relative; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; padding: .9rem 1.1rem; font-size: 1rem; color: var(--muted);
  transition: color .3s;
}
.tab sup { font-size: .68em; margin-left: .15rem; color: var(--muted); }
.tab:hover, .tab.is-active { color: var(--ink); }
.tabs__ink {
  position: absolute; bottom: -1px; left: 0; height: 2px; width: 0; background: var(--forest);
  transition: transform .5s var(--ease), width .5s var(--ease);
}
.range-note { margin: 1.5rem 0 2rem; color: var(--muted); font-size: .95rem; min-height: 1.6em; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.75rem 1.75rem; }
.card[hidden] { display: none; }
.js .grid:not(.has-entered) .card { opacity: 0; }
.card--wide { grid-column: span 1; }
.grid[data-active="ply"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card__img {
  position: relative; overflow: hidden; border-radius: 14px;
  aspect-ratio: 858 / 436; background: var(--paper-2);
}
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .card__img img { transform: scale(1.045); }
.badge {
  position: absolute; left: .8rem; top: .8rem;
  font-size: .78rem; font-weight: 500; padding: .3rem .7rem; border-radius: 999px;
  background: rgba(251, 250, 247, .92); color: var(--forest);
}
.card__body { padding-top: 1.1rem; }
.card h3 { font-size: 1.22rem; font-weight: 500; letter-spacing: -.015em; line-height: 1.25; }
.card h3 i {
  display: block; font-family: var(--serif); font-weight: 400; font-size: 1.02rem;
  color: var(--muted); letter-spacing: 0; margin-top: .1rem;
}
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .8rem 0 .75rem; }
.chips li {
  font-size: .78rem; padding: .2rem .6rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.card p { color: var(--ink-2); font-size: .98rem; max-width: 40ch; }

/* card entrance when a tab opens */
.card.is-in { animation: cardIn .8s var(--ease) both; animation-delay: calc(var(--n, 0) * 70ms); }
.card.is-in .card__img { animation: imgIn 1s var(--ease) both; animation-delay: calc(var(--n, 0) * 70ms); }
.card.is-out { transition: opacity .2s ease, transform .2s ease; opacity: 0; transform: translateY(6px); }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } }
@keyframes imgIn { from { clip-path: inset(0 0 100% 0 round 14px); } to { clip-path: inset(0 0 0 0 round 14px); } }

/* ---------- Contact ---------- */
.contact { background: var(--forest); color: var(--paper); padding: clamp(5rem, 10vw, 8rem) var(--gutter) 0; }
.contact__inner {
  max-width: var(--inner); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 3rem; align-items: end;
  padding-bottom: clamp(4rem, 8vw, 6rem);
}
.contact__lead h2 {
  font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 400; letter-spacing: -.02em; line-height: 1.08;
  font-stretch: 94%; font-variation-settings: "opsz" 96;
  max-width: 17ch; margin-bottom: 2.25rem;
}
.contact__email {
  display: inline-block; font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: .15rem;
  transition: background-size .5s var(--ease), color .3s;
}
.contact__email:hover { background-size: 0 1px; background-position: 100% 100%; color: var(--moss); }
.contact__meta { display: grid; gap: 1.75rem; }
.contact__meta h3 { font-size: .9rem; font-weight: 500; color: var(--moss); margin-bottom: .4rem; }
.contact__meta a:hover { color: var(--moss); }
.contact__meta address, .contact__meta a { color: rgba(251, 250, 247, .85); }
.contact__foot {
  max-width: var(--inner); margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
  padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(251, 250, 247, .16);
  font-size: .88rem; color: rgba(251, 250, 247, .65);
}
.contact__foot img { width: 110px; }
.totop { margin-left: auto; }
.totop:hover { color: var(--paper); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: calc(var(--nav-h) + 2.5rem); }
  .hero__title { font-size: clamp(2.5rem, 10vw, 5rem); }
  .hero__visual { order: 2; }
  .about__inner { grid-template-columns: 1fr; }
  .about__figure { aspect-ratio: 16 / 9; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .products__head { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav.menu-open { background: var(--paper); }
  .values__grid { grid-template-columns: 1fr; }
  .value, .value + .value { padding: 2rem 0; border-left: 0; border-bottom: 1px solid rgba(251, 250, 247, .18); }
  .value:last-child { border-bottom: 0; }
  .stack { --t: 8px; }
  .hero { padding-top: calc(var(--nav-h) + 1.75rem); gap: 1.5rem; }
  .hero__logo { flex-direction: column; align-items: flex-start; gap: .9rem; margin-bottom: 1.75rem; }
  .hero__logo img { width: min(210px, 60vw); }
  .hero__brandline { border-left: 0; padding: 0; }
  .hero__title { font-size: clamp(2.1rem, 12.8vw, 3.6rem); letter-spacing: -.018em; line-height: 1.06; margin-bottom: 1.25rem; }
  .hero__sub { font-size: 1.05rem; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .brand img { width: 60px; }
  .brand span { font-size: 1.15rem; }
  .note { font-size: .74rem; }
  .note::before { display: none; }
  .note--core { bottom: 14%; }
  .swatches { flex-direction: column; gap: .6rem; }
}

@media (max-width: 560px) {
  .grid, .grid[data-active="ply"] { grid-template-columns: 1fr; }
  .contact__foot { flex-wrap: wrap; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .grid:not(.has-entered) .card { opacity: 1; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
  .mission .w { color: var(--ink) !important; }
}
