/* ============================================================
   DARIX LAB — The Art of the Appetizer
   Compiled stylesheet (replaces the Tailwind CDN).
   Implements exactly the utilities used by index.html plus the
   custom design system. Breakpoints: sm 640 / md 768 / lg 1024.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --ink:    #0C0A08;
  --coal:   #161310;
  --bone:   #EFE7DB;
  --stone:  #9A8F81;
  --copper: #C08A5A;
  --gold:   #E4C289;
  --hairline: rgba(228, 194, 137, .22);
}

/* ---------- Reset (minimal, Tailwind-preflight equivalent) ---------- */
*, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body { line-height: 1.5; text-rendering: optimizeLegibility; }
img, svg, iframe { display: block; vertical-align: middle; max-width: 100%; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, li { list-style: none; }
h1, h2, h3, p { font-weight: inherit; font-size: inherit; }

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

.scroll-smooth { scroll-behavior: smooth; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ---------- Typography ---------- */
.font-sans    { font-family: "Instrument Sans", system-ui, sans-serif; }
.font-display { font-family: "Cormorant", Georgia, serif; }
.font-normal  { font-weight: 400; }
.font-medium  { font-weight: 500; }
.italic       { font-style: italic; }
.uppercase    { text-transform: uppercase; }
.tracking-menu{ letter-spacing: .22em; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

.text-\[10px\] { font-size: 10px; line-height: 1.5; }
.text-\[11px\] { font-size: 11px; line-height: 1.5; }
.text-sm   { font-size: .875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem; line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl  { font-size: 2.25rem; line-height: 2.5rem; }
.text-\[15vw\] { font-size: 15vw; }

.leading-\[0\.95\] { line-height: .95; }
.leading-\[1\.15\] { line-height: 1.15; }
.leading-snug    { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }

/* ---------- Colors ---------- */
.bg-ink  { background-color: var(--ink); }
.bg-coal { background-color: var(--coal); }
.bg-gold { background-color: var(--gold); }
.bg-ink\/70 { background-color: rgba(12,10,8,.7); }
.bg-ink\/90 { background-color: rgba(12,10,8,.9); }

.text-ink    { color: var(--ink); }
.text-bone   { color: var(--bone); }
.text-stone  { color: var(--stone); }
.text-copper { color: var(--copper); }
.text-gold   { color: var(--gold); }
.text-gold\/70  { color: rgba(228,194,137,.7); }
.text-stone\/40 { color: rgba(154,143,129,.4); }
.text-stone\/60 { color: rgba(154,143,129,.6); }
.text-stone\/70 { color: rgba(154,143,129,.7); }

.opacity-25 { opacity: .25; }

/* Gradients (Tailwind stop-composition mechanism) */
.bg-gradient-to-t { background-image: linear-gradient(to top, var(--g-stops)); }
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--g-stops)); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--g-stops)); }
.from-ink      { --g-from: var(--ink);           --g-stops: var(--g-from), var(--g-to, transparent); }
.from-ink\/60  { --g-from: rgba(12,10,8,.6);     --g-stops: var(--g-from), var(--g-to, transparent); }
.from-gold\/70 { --g-from: rgba(228,194,137,.7); --g-stops: var(--g-from), var(--g-to, transparent); }
.via-ink\/55     { --g-stops: var(--g-from), rgba(12,10,8,.55), var(--g-to, transparent); }
.via-ink\/70     { --g-stops: var(--g-from), rgba(12,10,8,.7),  var(--g-to, transparent); }
.via-transparent { --g-stops: var(--g-from), transparent,       var(--g-to, transparent); }
.to-ink        { --g-to: var(--ink); }
.to-ink\/25    { --g-to: rgba(12,10,8,.25); }
.to-transparent{ --g-to: transparent; }

/* ---------- Borders & hairlines ---------- */
.border   { border-width: 1px; border-color: var(--hairline); }
.border-l { border-left-width: 1px; border-color: var(--hairline); }
.hairline   { border-color: var(--hairline); }
.hairline-b { border-bottom: 1px solid var(--hairline); }
.hairline-t { border-top: 1px solid var(--hairline); }

/* ---------- Layout ---------- */
.fixed    { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.sticky   { position: sticky; }
.inset-0   { inset: 0; }
.inset-x-0 { left: 0; right: 0; }
.top-0    { top: 0; }
.top-28   { top: 7rem; }
.-top-3   { top: -.75rem; }
.bottom-0 { bottom: 0; }
.bottom-6 { bottom: 1.5rem; }
.right-6  { right: 1.5rem; }
.left-1\/2{ left: 50%; }
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.block  { display: block; }
.hidden { display: none; }
.flex        { display: flex; }
.inline-flex { display: inline-flex; }
.grid        { display: grid; }
.flex-col { flex-direction: column; }
.flex-1   { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.min-w-0  { min-width: 0; }
.items-start    { align-items: flex-start; }
.items-center   { align-items: center; }
.items-end      { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid-cols-2  { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-cols-3  { grid-template-columns: repeat(3, minmax(0,1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }

.gap-2  { gap: .5rem; }
.gap-3  { gap: .75rem; }
.gap-4  { gap: 1rem; }
.gap-5  { gap: 1.25rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }

/* ---------- Sizing ---------- */
.w-9    { width: 2.25rem; }
.w-44   { width: 11rem; }
.w-px   { width: 1px; }
.w-full { width: 100%; }
.h-14   { height: 3.5rem; }
.h-16   { height: 4rem; }
.h-full { height: 100%; }
.min-h-\[100svh\] { min-height: 100svh; }
.max-w-xs  { max-width: 20rem; }
.max-w-md  { max-width: 28rem; }
.max-w-xl  { max-width: 36rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-\[220px\] { max-width: 220px; }

.aspect-square   { aspect-ratio: 1 / 1; }
.aspect-video    { aspect-ratio: 16 / 9; }
.aspect-\[3\/4\] { aspect-ratio: 3 / 4; }
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; }
.aspect-\[5\/7\] { aspect-ratio: 5 / 7; }

/* ---------- Spacing ---------- */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-auto { margin-top: auto; }
.mt-1  { margin-top: .25rem; }
.mt-2  { margin-top: .5rem; }
.mt-3  { margin-top: .75rem; }
.mt-5  { margin-top: 1.25rem; }
.mt-6  { margin-top: 1.5rem; }
.mt-8  { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-14 { margin-top: 3.5rem; }
.mb-1  { margin-bottom: .25rem; }
.mb-3  { margin-bottom: .75rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-5  { margin-bottom: 1.25rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mb-8  { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-14 { margin-bottom: 3.5rem; }

.p-3 { padding: .75rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1   { padding-top: .25rem; padding-bottom: .25rem; }
.py-2\.5{ padding-top: .625rem; padding-bottom: .625rem; }
.py-3\.5{ padding-top: .875rem; padding-bottom: .875rem; }
.py-4  { padding-top: 1rem; padding-bottom: 1rem; }
.py-5  { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.py-28 { padding-top: 7rem; padding-bottom: 7rem; }
.pt-6  { padding-top: 1.5rem; }
.pt-36 { padding-top: 9rem; }
.pb-16 { padding-bottom: 4rem; }
.pl-4  { padding-left: 1rem; }
.pr-4  { padding-right: 1rem; }

/* ---------- Effects & misc ---------- */
.overflow-hidden   { overflow: hidden; }
.overflow-x-hidden { overflow-x: hidden; }
.object-cover { object-fit: cover; }
.pointer-events-none { pointer-events: none; }
.cursor-default { cursor: default; }
.backdrop-blur-md { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* Transforms (composable, Tailwind-style) */
.rotate-90, .translate-y-6, .translate-y-full, .-translate-x-1\/2 {
  transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--rot, 0deg));
}
.rotate-90          { --rot: 90deg; }
.translate-y-6      { --ty: 1.5rem; }
.translate-y-full   { --ty: 100%; }
.-translate-x-1\/2  { --tx: -50%; }
.origin-center { transform-origin: center; }

/* Transitions */
.transition-colors    { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(.4,0,.2,1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(.4,0,.2,1); transition-duration: 150ms; }
.duration-500 { transition-duration: 500ms; }
.ease-out { transition-timing-function: cubic-bezier(0,0,.2,1); }

/* Hover utilities */
.hover\:bg-gold:hover   { background-color: var(--gold); }
.hover\:text-ink:hover  { color: var(--ink); }
.hover\:text-gold:hover { color: var(--gold); }
.hover\:text-bone:hover { color: var(--bone); }

/* ============================================================
   Responsive variants
   ============================================================ */
@media (min-width: 640px) {
  .sm\:hidden       { display: none; }
  .sm\:inline-block { display: inline-block; }
  .sm\:flex-row     { flex-direction: row; }
  .sm\:text-7xl     { font-size: 4.5rem; line-height: 1; }
}

@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:flex  { display: flex; }
  .md\:flex-row { flex-direction: row; }
  .md\:items-end { align-items: flex-end; }
  .md\:justify-between { justify-content: space-between; }
  .md\:grid-cols-2  { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .md\:grid-cols-3  { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0,1fr)); }
  .md\:col-span-3 { grid-column: span 3 / span 3; }
  .md\:col-span-4 { grid-column: span 4 / span 4; }
  .md\:col-span-5 { grid-column: span 5 / span 5; }
  .md\:col-span-7 { grid-column: span 7 / span 7; }
  .md\:col-span-9 { grid-column: span 9 / span 9; }
  .md\:gap-5  { gap: 1.25rem; }
  .md\:gap-6  { gap: 1.5rem; }
  .md\:gap-8  { gap: 2rem; }
  .md\:gap-10 { gap: 2.5rem; }
  .md\:aspect-auto     { aspect-ratio: auto; }
  .md\:aspect-square   { aspect-ratio: 1 / 1; }
  .md\:aspect-\[16\/10\] { aspect-ratio: 16 / 10; }
  .md\:mb-16 { margin-bottom: 4rem; }
  .md\:mb-20 { margin-bottom: 5rem; }
  .md\:p-10  { padding: 2.5rem; }
  .md\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
  .md\:py-6  { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
  .md\:py-36 { padding-top: 9rem; padding-bottom: 9rem; }
  .md\:py-40 { padding-top: 10rem; padding-bottom: 10rem; }
  .md\:pb-24 { padding-bottom: 6rem; }
  .md\:right-10 { right: 2.5rem; }
  .md\:w-52 { width: 13rem; }
  .md\:text-xs   { font-size: .75rem; line-height: 1rem; }
  .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .md\:text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
  .md\:text-xl   { font-size: 1.25rem; line-height: 1.75rem; }
  .md\:text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:text-5xl  { font-size: 3rem; line-height: 1.1; }
  .md\:text-6xl  { font-size: 3.75rem; line-height: 1.05; }
  .md\:text-8xl  { font-size: 6rem; line-height: 1; }
}

@media (min-width: 1024px) {
  .lg\:block { display: block; }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0,1fr)); }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:text-\[7\.5rem\] { font-size: 7.5rem; line-height: 1; }
}

/* ============================================================
   Custom design system (previously inline <style>)
   ============================================================ */

/* Hero image: slow cinematic drift */
@keyframes heroDrift { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-drift { animation: heroDrift 9s cubic-bezier(.16,1,.3,1) forwards; transform-origin: 55% 40%; }

/* Load-in reveal states (GSAP animates; visible fallback if JS fails) */
.js .rv { opacity: 0; transform: translateY(28px); }
.no-js .rv, .rm .rv { opacity: 1 !important; transform: none !important; }

/* Lite YouTube facade */
.yt-lite { position: relative; cursor: pointer; overflow: hidden; background: var(--coal); }
.yt-lite::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,10,8,.15), rgba(12,10,8,.45)); transition: opacity .5s ease; pointer-events: none; }
.yt-lite:hover::after { opacity: .55; }
.yt-lite[data-loaded] { cursor: default; }
.yt-lite[data-loaded]::after { display: none; }
.yt-lite[data-loaded]:hover img { transform: none; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.16,1,.3,1), opacity .6s ease; }
.yt-lite:hover img { transform: scale(1.04); }
.yt-lite iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; }
.yt-play span {
  display: flex; align-items: center; justify-content: center;
  width: 76px; height: 76px; border-radius: 9999px;
  border: 1px solid rgba(239,231,219,.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  background: rgba(12,10,8,.35); transition: all .45s ease;
}
.yt-lite:hover .yt-play span { border-color: var(--gold); background: rgba(192,138,90,.28); transform: scale(1.06); }

/* Tasting-menu index rows */
.carta-row { transition: color .4s ease, padding-left .5s cubic-bezier(.16,1,.3,1); }
@media (min-width: 1024px) {
  .carta-row:hover { color: var(--gold); padding-left: .75rem; }
}

/* Dotted leader between chapter title and page number */
.carta-lead { flex: 1 1 auto; min-width: 1.5rem; margin: 0 .9rem; border-bottom: 1px dotted rgba(228,194,137,.35); transform: translateY(-5px); }

/* Index hover image (desktop only) */
#carta-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease, transform 1.4s cubic-bezier(.16,1,.3,1); transform: scale(1.05); }
#carta-visual img.is-active { opacity: 1; transform: scale(1); }

/* Edition cards */
.edition-card { transition: transform .6s cubic-bezier(.16,1,.3,1), border-color .5s ease; }
.edition-card:hover { transform: translateY(-6px); border-color: rgba(228,194,137,.5); }

/* ---- 3D book object ---- */
.book-scene { position: relative; width: 12.5rem; perspective: 1400px; }
@media (min-width: 768px) { .book-scene { width: 14.5rem; } }

/* Ambient golden glow behind the book */
.book-scene::before {
  content: ''; position: absolute; inset: -14% -20%;
  background: radial-gradient(55% 55% at 50% 52%, rgba(228,194,137,.20), transparent 72%);
  pointer-events: none;
}
/* Floor shadow (on the unrotated plane, so it stays grounded) */
.book-scene::after {
  content: ''; position: absolute; left: 8%; right: -4%; bottom: -7%; height: 9%;
  background: radial-gradient(50% 100% at 50% 50%, rgba(0,0,0,.6), transparent 75%);
  filter: blur(7px); pointer-events: none;
}

.book3d {
  --t: 26px; /* book thickness */
  position: relative; width: 100%; aspect-ratio: 5 / 7;
  transform-style: preserve-3d;
  transform: rotateY(-22deg) rotateX(2deg);
  transition: transform .8s cubic-bezier(.16,1,.3,1);
  animation: bookFloat 7s ease-in-out infinite;
}
.edition-card:hover .book3d { transform: rotateY(-12deg) rotateX(1deg) scale(1.03); }
@keyframes bookFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -7px; } }

/* Front cover */
.book-cover-wrap { position: absolute; inset: 0; z-index: 2; overflow: hidden; box-shadow: 0 24px 50px -18px rgba(0,0,0,.7); }
.book-cover-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Hinge crease near the spine + subtle edge definition */
.book-cover-wrap::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.16) 0, rgba(0,0,0,0) 4%, rgba(255,255,255,.14) 5.5%, rgba(0,0,0,0) 8%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
/* Soft light sweep so the cover reads as lit, not scanned */
.book-cover-wrap::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 38%, rgba(0,0,0,.10) 100%);
}

/* Page block (right edge, folding back from the front cover to the back cover) */
.book-pages {
  position: absolute; top: 1%; bottom: 1.2%; right: 0; width: var(--t);
  transform-origin: 100% 50%;
  transform: rotateY(-90deg);
  background:
    linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,0) 12%, rgba(0,0,0,0) 88%, rgba(0,0,0,.14)),
    repeating-linear-gradient(90deg, #F3ECDD 0 2px, #DDD5C2 2px 3px);
}
/* Back cover (adds depth when the book turns) */
.book-back {
  position: absolute; inset: 0;
  transform: translateZ(calc(var(--t) * -1));
  background: #DDD5C2;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
}

.btn-amazon { transition: background .4s ease, color .4s ease, letter-spacing .4s ease; }
.btn-amazon:hover { background: var(--gold); color: var(--ink); letter-spacing: .26em; }

/* Language toggle */
.lang-btn[aria-pressed="true"] { color: var(--gold); }
.lang-btn[aria-pressed="true"]::after { content: ''; display: block; height: 1px; background: var(--gold); margin-top: 2px; }

/* Gallery hover */
.g-item { overflow: hidden; }
.g-item img { transition: transform 1.4s cubic-bezier(.16,1,.3,1); }
.g-item:hover img { transform: scale(1.05); }

/* Reduced motion: kill all decorative motion */
@media (prefers-reduced-motion: reduce) {
  .hero-drift { animation: none; transform: none; }
  .book3d { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
