@property --spot-inner {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 0px;
}

@property --spot-outer {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 0px;
}

:root {
  --cream: #f7f3eb;
  --paper: #fffdf9;
  --oat: #ede6d9;
  --oat-deep: #e3dac9;
  --ink: #2a1e17;
  --espresso: #211711;
  --espresso-soft: #31231b;
  --muted: #6b5e54;
  --accent: #9b4426;
  --accent-hover: #7c331b;
  --crema: #cf8a4c;
  --line: #ddd4c6;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 96px;
  interpolate-size: allow-keywords;
  timeline-scope: --story-1, --story-2, --story-3, --story-4;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
  overflow-x: clip;
}

body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

a,
button {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
.gallery-track:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

button:disabled {
  cursor: default;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

p {
  margin: 0 0 1.15em;
  color: var(--muted);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
}

h1 {
  font-size: clamp(40px, 5vw, 76px);
  letter-spacing: -0.035em;
}

h1 em,
h2 em {
  font-weight: 400;
  color: var(--accent);
  font-style: italic;
}

h2 {
  font-size: clamp(29px, 3.2vw, 46px);
  letter-spacing: -0.028em;
  margin-bottom: 18px;
}

h3 {
  font-size: clamp(23px, 2.1vw, 29px);
  letter-spacing: -0.018em;
}

h4 {
  font-size: 15px;
  font-weight: 600;
}

em {
  font-family: var(--serif);
}

[hidden] {
  display: none !important;
}

.container {
  width: min(1280px, calc(100% - 96px));
  margin-inline: auto;
}

.section {
  padding-block: 88px;
}

.compact {
  padding-top: 24px;
}

.reading {
  max-width: 860px;
}

.measure {
  max-width: 720px;
}

.small {
  font-size: 13px;
  line-height: 1.7;
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.intro {
  font-size: 17px;
  line-height: 1.78;
  max-width: 590px;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 60;
  background: linear-gradient(90deg, var(--accent), var(--crema));
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes grow-progress {
      from {
        transform: scaleX(0);
      }
      to {
        transform: scaleX(1);
      }
    }

    .scroll-progress {
      animation: grow-progress auto linear;
      animation-timeline: scroll(root block);
    }
  }
}

/* Skip Link */
.skip-link {
  position: fixed;
  top: -120px;
  left: 20px;
  z-index: 70;
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  transition: top 0.2s var(--ease-spring);
}

.skip-link:focus {
  top: 12px;
}

/* Shrinking Glassmorphic Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 40;
  background: rgba(247, 243, 235, 0.86);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  view-transition-name: site-header;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(42, 30, 23, 0.07);
  background: rgba(247, 243, 235, 0.94);
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    @keyframes shrink-header {
      to {
        height: 70px;
        box-shadow: 0 10px 30px rgba(42, 30, 23, 0.08);
      }
    }

    .site-header {
      animation: shrink-header auto linear both;
      animation-timeline: scroll(block root);
      animation-range: 0px 110px;
    }
  }
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(221, 212, 198, 0.85);
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand > svg {
  width: 38px;
  height: 46px;
  color: var(--accent);
  transition: transform 0.35s var(--ease-spring);
}

.brand:hover > svg {
  transform: translateY(-2px) rotate(-4deg);
}

.brand > span {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.brand > span > span {
  display: block;
}

/* Ambient Steam Motion */
@keyframes float-steam {
  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.85;
  }
  50% {
    transform: translateY(-3px) translateX(1.5px);
    opacity: 0.45;
  }
}

.steam {
  transform-box: fill-box;
  transform-origin: center bottom;
}

@media (prefers-reduced-motion: no-preference) {
  .steam-1 {
    animation: float-steam 3.4s ease-in-out infinite;
  }
  .steam-2 {
    animation: float-steam 3.4s ease-in-out 1.4s infinite;
  }
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  margin-right: 24px;
  font-size: 13px;
  font-weight: 500;
}

.desktop-nav a {
  padding: 12px 0;
  position: relative;
  transition: color 0.22s ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.32s var(--ease-spring);
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--accent);
}

.desktop-nav a:hover::after,
.desktop-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.header-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}

.language {
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.7);
  color: var(--muted);
  white-space: nowrap;
  transition: border-color 0.25s ease, transform 0.25s var(--ease-spring);
}

.language:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.language .selected {
  font-weight: 750;
  color: var(--ink);
}

.divider {
  opacity: 0.45;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  width: 42px;
  height: 42px;
  padding: 9px;
}

.menu-toggle span {
  height: 1.5px;
  background: var(--ink);
  display: block;
  margin: 7px 0;
  transition: transform 0.28s var(--ease-spring);
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4.2px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4.2px) rotate(-45deg);
}

/* Mobile Nav Discrete Entry/Exit */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 16px 28px 22px;
  box-shadow: 0 20px 40px rgba(42, 30, 23, 0.12);
  opacity: 1;
  translate: 0 0;
  transition:
    display 0.28s,
    opacity 0.28s var(--ease-out),
    translate 0.28s var(--ease-spring);
  transition-behavior: allow-discrete;
}

@starting-style {
  .mobile-nav {
    opacity: 0;
    translate: 0 -12px;
  }
}

.mobile-nav:where([hidden], [data-closing]) {
  opacity: 0;
  translate: 0 -12px;
}

.mobile-nav a {
  display: block;
  padding: 13px 4px;
  font-family: var(--serif);
  font-size: 20px;
  border-bottom: 1px solid rgba(221, 212, 198, 0.55);
}

.mobile-nav a:last-child {
  border-bottom: 0;
}

/* Buttons & Links */
.button {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  padding: 15px 24px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--accent);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(155, 68, 38, 0.22);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    transform 0.3s var(--ease-spring),
    box-shadow 0.3s var(--ease-spring);
}

.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(155, 68, 38, 0.3);
}

.button:active {
  transform: translateY(0) scale(0.985);
}

.button-light {
  background: #fff8ee;
  color: var(--espresso);
  border-color: #fff8ee;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.button-light:hover {
  background: #f5e6d0;
  border-color: #f5e6d0;
  color: var(--espresso);
}

.text-link {
  font-size: 13.5px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  line-height: 1.5;
  transition: gap 0.28s var(--ease-spring), color 0.2s ease;
}

.text-link:hover {
  gap: 17px;
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* Hero & Page Intro Motion */
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-photo-reveal {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .motion-hero-copy {
    animation: hero-rise 0.75s var(--ease-out) both;
  }
  .motion-hero-visual {
    animation: hero-photo-reveal 0.9s var(--ease-spring) 0.1s both;
  }
}

.tiny-bean {
  width: 12px;
  height: 17px;
  transform: rotate(35deg);
  border: 1.4px solid currentColor;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.tiny-bean::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  border-left: 1.2px solid currentColor;
  transform: rotate(10deg);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1.06fr;
  gap: 56px;
  padding-top: 42px;
  padding-bottom: 52px;
  align-items: center;
}

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

.hero .intro {
  max-width: 500px;
  margin-bottom: 30px;
  font-size: 16.5px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.secondary {
  font-size: 13.5px;
}

.hero-footnote {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  margin: 30px 0 0;
  color: var(--muted);
}

.hero-footnote svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.hero-figure {
  margin: 0;
  position: relative;
  height: 560px;
  min-width: 0;
}

.hero-image-wrap {
  width: 100%;
  height: 100%;
  border-radius: 130px 16px 16px 16px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(42, 30, 23, 0.16);
  position: relative;
}

.hero-image-wrap::after {
  content: "";
  position: absolute;
  inset: 52% 0 0;
  background: linear-gradient(transparent, rgba(28, 18, 12, 0.68));
  pointer-events: none;
}

.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 49% center;
  transition: transform 0.9s var(--ease-out);
}

.hero-figure:hover img {
  transform: scale(1.035);
}

.hero-glass-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 14px;
  background: rgba(33, 23, 17, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 248, 238, 0.18);
  color: #fff8ee;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.badge-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e9a35e;
  box-shadow: 0 0 0 4px rgba(233, 163, 94, 0.25);
  flex-shrink: 0;
}

.hero-glass-badge strong {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #f0c08d;
}

.hero-glass-badge span {
  font-size: 12px;
  color: #fff8ee;
}

.hero-figure figcaption {
  position: absolute;
  bottom: 24px;
  left: 28px;
  right: 95px;
  z-index: 2;
  color: #fff8ee;
  font-size: 13.5px;
  font-family: var(--serif);
  font-style: italic;
}

.photo-mark {
  position: absolute;
  right: 24px;
  bottom: 20px;
  color: #fff8ee;
  z-index: 2;
  font-family: var(--serif);
  font-size: 24px;
}

.photo-mark > span {
  font-style: italic;
}

/* Promise & Golden Ratios Strip */
.promise-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-block: 1px solid var(--line);
  padding: 24px 0;
}

.strip-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.strip-item strong {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--accent);
  white-space: nowrap;
}

.strip-item span {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* Page Intro with Editorial Photo */
.page-intro {
  padding-top: 44px;
  padding-bottom: 58px;
}

.page-intro-simple {
  padding-top: 56px;
}

.page-intro-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 54px;
  align-items: center;
}

.page-intro h1 {
  margin-bottom: 22px;
  max-width: 780px;
}

.page-intro .intro {
  margin-bottom: 0;
}

.page-intro-visual {
  margin: 0;
  position: relative;
}

.arch-frame {
  border-radius: 96px 16px 16px 16px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  box-shadow: 0 24px 50px rgba(42, 30, 23, 0.14);
  background: var(--oat);
}

.arch-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.page-intro-visual:hover .arch-frame img {
  transform: scale(1.04);
}

.floating-caption {
  margin-top: 12px;
  font-size: 12.5px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  padding-left: 6px;
}

/* Scrollytelling Section ("Du grain à la tasse") */
.story-section {
  padding-block: 92px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--oat) 100%);
}

.story-header {
  margin-bottom: 48px;
}

.story-layout {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 64px;
  align-items: start;
}

.story-stage {
  position: sticky;
  top: 108px;
  height: min(540px, calc(100vh - 140px));
}

.story-stage-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(33, 23, 17, 0.2);
  background: var(--espresso);
}

.story-visual {
  position: absolute;
  inset: 0;
  background: var(--espresso);
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.6s var(--ease-out);
}

.story-visual-1 {
  clip-path: inset(0 0 0 0);
  z-index: 1;
}

.story-visual-2 {
  z-index: 2;
}

.story-visual-3 {
  z-index: 3;
}

.story-visual-4 {
  z-index: 4;
}

.story-visual.is-active {
  clip-path: inset(0 0 0 0);
}

.story-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-visual-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px;
  background: linear-gradient(transparent, rgba(25, 16, 11, 0.82));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #fff8ee;
}

.story-pill {
  font-family: var(--serif);
  font-size: 16px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.16);
  backdrop-filter: blur(8px);
}

.story-badge {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f3c697;
  font-weight: 700;
}

.story-steps {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.story-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 36px;
  box-shadow: 0 12px 30px rgba(42, 30, 23, 0.04);
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s var(--ease-spring);
}

.story-step:hover,
.story-step.is-active {
  border-color: rgba(155, 68, 38, 0.45);
  box-shadow: 0 20px 42px rgba(42, 30, 23, 0.09);
}

.story-step-1 {
  view-timeline: --story-1 block;
}

.story-step-2 {
  view-timeline: --story-2 block;
}

.story-step-3 {
  view-timeline: --story-3 block;
}

.story-step-4 {
  view-timeline: --story-4 block;
}

@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    @keyframes story-layer-reveal {
      from {
        clip-path: inset(100% 0 0 0);
      }
      to {
        clip-path: inset(0 0 0 0);
      }
    }

    .story-visual-2 {
      animation: story-layer-reveal auto linear both;
      animation-timeline: --story-2;
      animation-range: entry 18% cover 48%;
    }

    .story-visual-3 {
      animation: story-layer-reveal auto linear both;
      animation-timeline: --story-3;
      animation-range: entry 18% cover 48%;
    }

    .story-visual-4 {
      animation: story-layer-reveal auto linear both;
      animation-timeline: --story-4;
      animation-range: entry 18% cover 48%;
    }
  }
}

.story-step-mobile-img {
  display: none;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  aspect-ratio: 3 / 2;
}

.story-step-mobile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-step-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.story-step-meta .eyebrow {
  margin: 0;
}

.story-num {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
}

.story-step h3 {
  margin-bottom: 14px;
}

.story-tip {
  margin: 16px 0 0;
  padding: 13px 16px;
  border-left: 3px solid var(--accent);
  background: var(--cream);
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  color: var(--ink);
}

/* Horizontal Sensory Gallery (Carousel Slide Effects) */
.gallery-section {
  padding-block: 88px;
  background: var(--espresso);
  color: #f9f2e7;
}

.gallery-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
}

.gallery-header h2 {
  color: #fff8ee;
  max-width: 650px;
}

.gallery-header p:not(.eyebrow) {
  color: #cbbba8;
  max-width: 560px;
  margin-bottom: 0;
}

.gallery-header .eyebrow {
  color: #e7a468;
}

.gallery-controls {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.carousel-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 248, 238, 0.24);
  background: rgba(255, 248, 238, 0.07);
  color: #fff8ee;
  font-size: 18px;
  display: grid;
  place-items: center;
  transition: background-color 0.25s ease, transform 0.25s var(--ease-spring), border-color 0.25s ease;
}

.carousel-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
}

.gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(390px, 80vw);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-inline: max(20px, calc((100vw - 1280px) / 2 + 48px));
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(231, 164, 104, 0.45) transparent;
}

.gallery-card {
  scroll-snap-align: center;
  background: var(--espresso-soft);
  border: 1px solid rgba(255, 248, 238, 0.11);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.35s var(--ease-spring);
}

.gallery-card:hover {
  border-color: rgba(231, 164, 104, 0.5);
  transform: translateY(-4px);
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes gallery-focus {
      0% {
        scale: 0.93;
        opacity: 0.72;
      }
      50% {
        scale: 1;
        opacity: 1;
      }
      100% {
        scale: 0.93;
        opacity: 0.72;
      }
    }

    .gallery-track > .gallery-card {
      animation: gallery-focus auto linear both;
      animation-timeline: view(inline);
    }
  }
}

.gallery-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gallery-img-wrap {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease-out);
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.06);
}

.gallery-meta-pill {
  position: absolute;
  bottom: 12px;
  left: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(25, 16, 11, 0.78);
  backdrop-filter: blur(8px);
  color: #fff8ee;
}

.gallery-card-body {
  padding: 24px 24px 28px;
}

.gallery-card-body .eyebrow {
  color: #e7a468;
  margin-bottom: 10px;
  font-size: 9.5px;
}

.gallery-card-body h3 {
  color: #fff8ee;
  font-size: 24px;
  margin-bottom: 10px;
}

.gallery-card-body p:last-child {
  color: #cbbfb2;
  font-size: 13.5px;
  margin: 0;
}

/* Topic Explorer Cards */
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 40px;
}

.section-heading h2 {
  max-width: 640px;
  margin-bottom: 0;
}

.section-heading > p {
  max-width: 340px;
  font-size: 14px;
  margin-bottom: 4px;
}

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

.topic-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 26px;
  transition:
    transform 0.38s var(--ease-spring),
    box-shadow 0.38s var(--ease-spring),
    border-color 0.3s ease;
}

.topic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(42, 30, 23, 0.09);
  border-color: rgba(155, 68, 38, 0.4);
}

.topic-photo {
  position: relative;
  border-radius: 11px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--oat);
}

.topic-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease-out);
}

.topic-card:hover .topic-photo img {
  transform: scale(1.06);
}

.topic-number {
  position: absolute;
  left: 14px;
  top: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.88);
  color: var(--ink);
  backdrop-filter: blur(6px);
}

.topic-icon-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(33, 23, 17, 0.78);
  color: #fff8ee;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  transition: transform 0.35s var(--ease-spring), background-color 0.3s ease;
}

.topic-icon-badge svg {
  width: 28px;
  height: 28px;
}

.topic-card:hover .topic-icon-badge {
  background: var(--accent);
  transform: scale(1.08) rotate(-5deg);
}

.topic-card h3 {
  margin: 22px 10px 10px;
  font-size: 27px;
}

.topic-card p {
  margin: 0 10px 20px;
  font-size: 14px;
  line-height: 1.72;
  flex-grow: 1;
}

.topic-card .text-link {
  margin-inline: 10px;
}

/* Interactive Spotlight Surface */
.spotlight-surface {
  position: relative;
  overflow: hidden;
}

.spotlight-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(235, 165, 98, 0.22), transparent 55%);
  -webkit-mask-image: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    black var(--spot-inner, 0px),
    transparent var(--spot-outer, 0px)
  );
  mask-image: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    black var(--spot-inner, 0px),
    transparent var(--spot-outer, 0px)
  );
  mask-repeat: no-repeat;
  transition: --spot-inner 0.35s ease, --spot-outer 0.35s ease;
}

.spotlight-surface:hover .spotlight-glow {
  --spot-inner: 140px;
  --spot-outer: 360px;
}

/* Morning Ritual Section */
.ritual {
  background: var(--oat);
  padding: 84px 0;
}

.ritual-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}

.ritual-photo {
  margin: 24px 0 28px;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: 0 18px 40px rgba(42, 30, 23, 0.12);
}

.ritual-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ritual-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ritual-steps li {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #d4cbbd;
}

.ritual-steps li:first-child {
  padding-top: 0;
}

.ritual-steps li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ritual-steps li > span {
  font-family: var(--serif);
  color: var(--accent);
  font-size: 24px;
  padding-top: 2px;
}

.ritual-steps h3 {
  font-size: 24px;
  margin: 0 0 8px;
}

.ritual-steps p {
  font-size: 14px;
  margin: 0;
}

/* Interactive Method Finder (with View Transition Pill) */
.finder {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 56px;
  align-items: center;
}

.finder h2 {
  margin-bottom: 14px;
}

.finder-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.finder-buttons button,
.compass-tabs button,
.recipe-tabs button {
  position: relative;
  border: 1px solid #c9beb0;
  border-radius: 999px;
  padding: 11px 18px;
  color: var(--ink);
  background: var(--paper);
  font-size: 13px;
  font-weight: 550;
  transition: border-color 0.25s ease, transform 0.25s var(--ease-spring), color 0.2s ease, background-color 0.25s ease;
}

.finder-buttons button:hover,
.compass-tabs button:hover,
.recipe-tabs button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.finder-buttons button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
  view-transition-name: finder-pill;
}

.finder-result {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(42, 30, 23, 0.08);
  view-transition-name: finder-card;
}

.finder-card {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: stretch;
}

.finder-media {
  position: relative;
  min-height: 280px;
  background: var(--oat);
}

.finder-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.finder-svg-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.92);
  color: var(--accent);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.finder-svg-badge svg {
  width: 32px;
  height: 32px;
}

.finder-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.finder-stats {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.finder-body h3 {
  font-size: 27px;
  margin-bottom: 12px;
  outline: none;
}

.finder-body p {
  font-size: 14px;
  margin-bottom: 18px;
}

/* Machines Page: 3 Extraction Families */
.families-section {
  background: var(--oat);
  padding-block: 76px;
}

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

.family-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease;
}

.family-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(42, 30, 23, 0.08);
}

.family-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.family-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.family-card:hover .family-img img {
  transform: scale(1.05);
}

.family-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.family-body .eyebrow {
  margin-bottom: 8px;
  font-size: 9.5px;
}

.family-body h3 {
  margin-bottom: 12px;
}

.family-body p {
  font-size: 14px;
  flex-grow: 1;
}

.family-methods {
  display: inline-block;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

/* Machine Cards */
.machine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.machine-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  scroll-margin-top: 96px;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease, border-color 0.3s ease;
}

.machine-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(42, 30, 23, 0.08);
  border-color: rgba(155, 68, 38, 0.35);
}

.machine-art {
  height: 215px;
  background: #eae4d8;
  position: relative;
  display: grid;
  place-items: center;
}

.machine-card:nth-child(4n + 2) .machine-art {
  background: #e5e7da;
}

.machine-card:nth-child(4n + 3) .machine-art {
  background: #eedfce;
}

.machine-art svg {
  height: 150px;
  width: 170px;
  color: #74533c;
  transition: transform 0.4s var(--ease-spring);
}

.machine-card:hover .machine-art svg {
  transform: scale(1.06) translateY(-3px);
}

.machine-pills {
  position: absolute;
  bottom: 12px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.machine-pills span {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.88);
  color: var(--ink);
}

.machine-copy {
  padding: 28px 30px;
}

.machine-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.machine-meta-top .eyebrow {
  margin-bottom: 0;
  font-size: 9.5px;
}

.body-meter {
  display: inline-flex;
  gap: 4px;
}

.body-meter i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dfd6c8;
  display: block;
}

.body-meter i.is-filled {
  background: var(--accent);
}

.machine-copy > h2 {
  font-size: 30px;
  margin-bottom: 22px;
}

.machine-copy dl {
  font-size: 14px;
  margin: 0;
}

.machine-copy dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  margin-bottom: 5px;
  color: var(--accent);
  font-weight: 700;
}

.machine-copy dd {
  margin: 0 0 18px;
  color: var(--muted);
}

/* Smooth Intrinsic Accordions (<details>) */
details {
  border-top: 1px solid var(--line);
}

summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  font-size: 13.5px;
  font-weight: 600;
  list-style: none;
  transition: color 0.2s ease;
}

summary:hover {
  color: var(--accent);
}

summary::-webkit-details-marker {
  display: none;
}

.summary-icon {
  font-size: 24px;
  font-weight: 300;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.32s var(--ease-spring);
}

details[open] > summary > .summary-icon {
  transform: rotate(45deg);
}

details::details-content {
  block-size: 0;
  opacity: 0;
  overflow: clip;
  transition:
    block-size 0.38s var(--ease-spring),
    opacity 0.28s ease,
    content-visibility 0.38s;
  transition-behavior: allow-discrete;
}

details[open]::details-content {
  block-size: auto;
  opacity: 1;
}

.details-body {
  padding-bottom: 18px;
}

.machine-copy details h3 {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 700;
  margin: 10px 0 6px;
}

.machine-copy details p {
  font-size: 14px;
  margin-bottom: 10px;
}

.machine-copy details p:last-child {
  margin-bottom: 0;
}

/* Milk Microfoam Feature Section */
.milk-section {
  background: var(--espresso);
  color: #f9f2e7;
  padding-block: 84px;
}

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

.milk-photo {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.milk-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.milk-copy .eyebrow {
  color: #e7a468;
}

.milk-copy h2 {
  color: #fff8ee;
}

.milk-copy > p {
  color: #d2c5b6;
}

.milk-steps {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.milk-step {
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(255, 248, 238, 0.06);
  border: 1px solid rgba(255, 248, 238, 0.1);
}

.milk-step h3 {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 650;
  color: #fff8ee;
  margin-bottom: 6px;
}

.milk-step p {
  font-size: 13.5px;
  color: #cbbfb2;
  margin: 0;
}

/* Note Blocks & Next Guide */
.note-block {
  border-left: 4px solid var(--accent);
  padding: 28px 34px;
  border-radius: 0 14px 14px 0;
  background: var(--oat);
  margin-top: 60px;
  margin-bottom: 30px;
}

.note-block h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.note-block p {
  font-size: 14.5px;
  max-width: 920px;
  margin-bottom: 0;
}

.note-block-split {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 36px;
  align-items: center;
}

.note-photo {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.note-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.next-guide {
  border-top: 1px solid var(--line);
  padding-block: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 44px;
}

.next-guide > span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.next-guide a {
  font-family: var(--serif);
  font-size: 29px;
  display: inline-flex;
  align-items: center;
  gap: 28px;
  transition: gap 0.3s var(--ease-spring), color 0.2s ease;
}

.next-guide a:hover {
  color: var(--accent);
  gap: 38px;
}

/* Beans Page: Species, Roasts & Aroma Families */
.species-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.species {
  background: #efe6d8;
  padding: 34px;
  border-radius: 16px;
  display: flex;
  gap: 28px;
  align-items: center;
  border: 1px solid rgba(155, 68, 38, 0.12);
}

.species:nth-child(2) {
  background: #e8e6db;
}

.species p {
  font-size: 14px;
}

.species-notes {
  font-size: 13px !important;
  color: var(--ink) !important;
  font-weight: 550;
  margin: 0 !important;
}

.species h3 {
  font-size: 33px;
}

.species .latin {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  margin-top: 6px;
}

.bean-illustration {
  min-width: 86px;
  height: 150px;
  position: relative;
}

.bean-illustration span,
.roast-swatch span {
  position: absolute;
  background: #92613e;
  border-radius: 50%;
  height: 58px;
  width: 36px;
  box-shadow: inset -5px -4px 8px rgba(68, 36, 17, 0.4);
  transform: rotate(35deg);
}

.bean-illustration span::after,
.roast-swatch span::after {
  content: "";
  border-left: 2.5px solid rgba(236, 209, 174, 0.55);
  position: absolute;
  left: 48%;
  top: 7%;
  bottom: 7%;
  width: 10px;
  border-radius: 50%;
  transform: rotate(6deg);
}

.bean-illustration span:nth-child(1) {
  top: 0;
  left: 30px;
}
.bean-illustration span:nth-child(2) {
  top: 56px;
  left: 0;
  transform: rotate(-30deg);
}
.bean-illustration span:nth-child(3) {
  top: 88px;
  left: 40px;
  transform: rotate(65deg);
}

.robusta span {
  width: 42px;
  height: 48px;
  background: #5f3e29;
}

.inset-note {
  border-left: 2.5px solid var(--accent);
  padding-left: 18px;
  margin: 28px 0 0;
}

.roast-section {
  background: var(--oat);
  padding: 80px 0;
}

.roast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 38px;
  margin-bottom: 28px;
}

.roast-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.roast-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.roast-swatch {
  height: 112px;
  width: 175px;
  position: relative;
  background: #ebdfcc;
  border-radius: 999px;
  flex-shrink: 0;
}

.roast-swatch span {
  height: 46px;
  width: 29px;
  left: 20px;
  top: 30px;
  background: #a97342;
}
.roast-swatch span:nth-child(2) {
  left: 56px;
  top: 12px;
  transform: rotate(-25deg);
}
.roast-swatch span:nth-child(3) {
  left: 92px;
  top: 50px;
  transform: rotate(55deg);
}
.roast-swatch span:nth-child(4) {
  left: 126px;
  top: 20px;
  transform: rotate(25deg);
}
.roast-swatch span:nth-child(5) {
  left: 58px;
  top: 56px;
  transform: rotate(75deg);
}

.roast-1 {
  background: #e2d3bd;
}
.roast-1 span {
  background: #774d2e;
}
.roast-2 {
  background: #d8c6b0;
}
.roast-2 span {
  background: #3a261c;
}

.roast-temp {
  text-align: right;
}

.roast-temp span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.roast-temp strong {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--accent);
}

.roast-card h3 {
  margin: 22px 0 8px;
  font-size: 28px;
}

.roast-card h4 {
  margin-bottom: 12px;
  color: var(--accent);
}

.roast-card > p {
  font-size: 14px;
  flex-grow: 1;
}

.roast-bars {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.roast-bar-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted);
}

.bar-track {
  height: 6px;
  border-radius: 999px;
  background: var(--oat);
  overflow: hidden;
}

.bar-track i {
  display: block;
  height: 100%;
  width: var(--fill, 50%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--crema), var(--accent));
}

.source-link {
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Aroma Wheel Cards */
.aroma-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 34px;
}

.aroma-card {
  padding: 28px 30px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease;
}

.aroma-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(42, 30, 23, 0.07);
}

.aroma-0 {
  background: #f5ece0;
}
.aroma-1 {
  background: #f4e6e3;
}
.aroma-2 {
  background: #f2efe0;
}
.aroma-3 {
  background: #ebe4dc;
}

.aroma-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 10px;
}

.aroma-card h3 {
  margin-bottom: 10px;
}

.aroma-card p {
  font-size: 14px;
}

.aroma-origins {
  margin: 0 !important;
  font-size: 12.5px !important;
  font-weight: 600;
  color: var(--ink) !important;
}

.accordions {
  margin-top: 28px;
}

.accordions details:last-child {
  border-bottom: 1px solid var(--line);
}

.accordions summary {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  padding: 20px 0;
}

.accordions details p {
  font-size: 15px;
  max-width: 740px;
  padding-right: 28px;
  margin-bottom: 0;
}

/* Grind Scale & Burr Grinder Section */
.grind-scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-top: 38px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper);
}

.grind-card {
  padding: 26px 16px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  transition: background-color 0.25s ease;
}

.grind-card:hover {
  background: #faf5eb;
}

.grind-card:last-child {
  border-right: 0;
}

.grounds {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background-color: #dbc5a8;
  margin: 0 auto 20px;
  background-image: radial-gradient(#613820 42%, transparent 46%);
  background-size: 2px 2px;
  border: 6px solid #eee5d8;
  transition: transform 0.35s var(--ease-spring);
}

.grind-card:hover .grounds {
  transform: scale(1.08);
}

.grounds-1 {
  background-size: 3px 3px;
}
.grounds-2 {
  background-size: 4px 4px;
}
.grounds-3 {
  background-size: 5.5px 5.5px;
}
.grounds-4 {
  background-size: 7.5px 7.5px;
}
.grounds-5 {
  background-size: 10.5px 10.5px;
}

.grind-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.grind-card h3 {
  font-size: 20px;
  margin-top: 10px;
}

.grind-card p {
  font-size: 12.5px;
  margin-bottom: 0;
}

.grind-card .texture {
  font-style: italic;
  margin: 6px 0 8px;
  color: var(--ink);
}

.grind-card .grind-time {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.grinder {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 54px;
  align-items: center;
  background: var(--oat);
  border-radius: 20px;
  padding: 40px;
  margin-block: 24px;
}

.grinder-photo {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  box-shadow: 0 18px 36px rgba(42, 30, 23, 0.12);
}

.grinder-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grinder-list {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--ink);
  font-size: 14px;
}

.grinder-list li {
  margin-bottom: 8px;
}

/* Interactive Extraction Compass */
.compass-section {
  background: var(--espresso);
  color: #f9f2e7;
  padding-block: 84px;
  margin-top: 64px;
}

.compass-header .eyebrow {
  color: #e7a468;
}

.compass-header h2 {
  color: #fff8ee;
}

.compass-header p {
  color: #cbbfb2;
}

.compass-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 26px;
}

.compass-tabs button {
  background: rgba(255, 248, 238, 0.08);
  border-color: rgba(255, 248, 238, 0.2);
  color: #f7efe2;
}

.compass-tabs button[aria-pressed="true"] {
  background: #e7a468;
  border-color: #e7a468;
  color: var(--espresso);
  font-weight: 700;
  view-transition-name: compass-pill;
}

.compass-panel {
  background: rgba(255, 253, 249, 0.06);
  border: 1px solid rgba(255, 248, 238, 0.14);
  border-radius: 18px;
  padding: 34px 36px;
  max-width: 880px;
  view-transition-name: compass-card;
}

.compass-meter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 280px;
  margin-bottom: 18px;
}

.compass-meter span {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.16);
}

.compass-meter span.is-lit {
  background: #e7a468;
}

.compass-panel .eyebrow {
  color: #e7a468;
  margin-bottom: 10px;
}

.compass-panel h3 {
  color: #fff8ee;
  font-size: 30px;
  margin-bottom: 12px;
  outline: none;
}

.compass-panel > p {
  color: #d6cabd;
  max-width: 720px;
}

.compass-action {
  margin-top: 20px;
  padding: 18px 22px;
  border-radius: 12px;
  background: rgba(255, 248, 238, 0.09);
}

.compass-action strong {
  display: block;
  color: #f6c492;
  font-size: 16px;
  margin-bottom: 6px;
}

.compass-action p {
  color: #e6dcd0;
  font-size: 13.5px;
  margin: 0;
}

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

.fix-grid h3 {
  font-size: 24px;
  line-height: 1.25;
  margin: 18px 0 12px;
}

.fix-grid p {
  font-size: 14px;
}

.fix-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ece0d0;
  color: var(--accent);
  font-size: 26px;
}

/* Brewing Page: Calculator, Recipe Tabs & Live Brew Timer */
.calculator {
  background: var(--oat);
  border: 1px solid #d9d0c0;
  padding: 46px;
  border-radius: 20px;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 54px;
  align-items: center;
}

.calc-presets-group {
  margin: 20px 0 18px;
}

.presets-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 9px;
}

.calc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid #c8beb0;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 550;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease-spring);
}

.preset-chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.preset-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.calc-form {
  background: var(--paper);
  padding: 30px;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(42, 30, 23, 0.06);
  position: relative;
  z-index: 1;
}

.calc-form label {
  display: flex;
  flex-direction: column;
  font-size: 11.5px;
  font-weight: 650;
  gap: 8px;
  margin-bottom: 18px;
}

.calc-form input,
.calc-form select {
  background: #fff;
  border: 1px solid #cdc4b7;
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  height: 46px;
  font-size: 13.5px;
}

.field-row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}

.calc-output {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  margin: 8px 0 16px;
  border-top: 1px solid var(--line);
  gap: 10px;
}

.calc-output > div {
  display: flex;
  flex-direction: column;
}

.calc-output output {
  font-family: var(--serif);
  color: var(--accent);
  font-size: 38px;
  white-space: nowrap;
  line-height: 1.1;
}

.calc-output span {
  font-size: 11.5px;
  color: var(--muted);
}

.calc-output .plus {
  font-size: 24px;
  color: var(--muted);
}

.ratio-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #dbe6ea;
  margin-bottom: 16px;
  gap: 2px;
}

.ratio-bar-coffee {
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.35s var(--ease-spring);
}

.ratio-bar-water {
  flex: 1;
  background: #c7d9e2;
  border-radius: 999px;
}

.calc-form > .small {
  font-size: 11.5px;
  margin-bottom: 0;
}

.error {
  font-size: 12.5px;
  color: #a32320;
  font-weight: 600;
}

/* Recipe Companion & Live Timer */
.recipe-heading {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-end;
  margin-bottom: 28px;
}

.print-button {
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  flex-shrink: 0;
  transition: border-color 0.2s ease, transform 0.25s var(--ease-spring);
}

.print-button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.recipe-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.recipe-tabs button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
  view-transition-name: recipe-pill;
}

.recipe-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px;
  margin-bottom: 24px;
  box-shadow: 0 18px 40px rgba(42, 30, 23, 0.05);
}

.recipe-hero-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 38px;
  align-items: center;
  margin-bottom: 34px;
}

.recipe-photo {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.recipe-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-summary h3 {
  font-size: 32px;
  margin-bottom: 10px;
  outline: none;
}

.recipe-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.recipe-stats span {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--oat);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}

.recipe-protip {
  margin: 0;
  padding: 12px 16px;
  border-left: 3px solid var(--crema);
  background: var(--cream);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: var(--ink);
}

/* Interactive Pour-Over Timer */
.brew-timer {
  background: var(--espresso);
  color: #f9f2e7;
  border-radius: 16px;
  padding: 28px 30px;
  margin-bottom: 34px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: center;
}

.timer-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.timer-ring-wrap {
  position: relative;
  width: 126px;
  height: 126px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.timer-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring-bg {
  fill: none;
  stroke: rgba(255, 248, 238, 0.14);
  stroke-width: 6;
}

.timer-ring-fg {
  fill: none;
  stroke: #e7a468;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s linear;
}

.timer-clock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
}

.timer-digits {
  font-family: var(--serif);
  font-size: 28px;
  color: #fff8ee;
  line-height: 1;
}

.timer-clock small {
  font-size: 9.5px;
  color: #cbbba8;
  margin-top: 5px;
  line-height: 1.2;
}

.timer-Info h4 {
  color: #fff8ee;
  font-size: 17px;
  margin-bottom: 6px;
}

.timer-Info p {
  color: #cbbfb2;
  font-size: 13px;
  margin-bottom: 14px;
}

.timer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.timer-toggle {
  padding: 10px 18px;
  font-size: 12.5px;
}

.timer-reset {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 248, 238, 0.25);
  background: transparent;
  color: #f9f2e7;
  font-size: 12px;
}

.timer-reset:hover {
  border-color: #fff8ee;
}

.timer-phases {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.timer-phase {
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255, 248, 238, 0.05);
  border: 1px solid transparent;
  opacity: 0.65;
  transition: opacity 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease-spring);
}

.timer-phase.is-current {
  opacity: 1;
  background: rgba(231, 164, 104, 0.16);
  border-color: rgba(231, 164, 104, 0.55);
  transform: translateX(4px);
}

.phase-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 3px;
}

.phase-head strong {
  font-size: 12.5px;
  color: #fff8ee;
}

.phase-weight {
  font-size: 11px;
  font-weight: 700;
  color: #f3c492;
  white-space: nowrap;
}

.timer-phase p {
  font-size: 12px;
  color: #d6cabd;
  margin: 0;
  line-height: 1.45;
}

.recipe-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.recipe-steps li {
  padding: 20px;
  border-radius: 14px;
  background: var(--cream);
}

.recipe-steps li > span {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--accent);
}

.recipe-steps h4 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  margin: 10px 0 8px;
}

.recipe-steps p {
  font-size: 13.5px;
  margin: 0;
}

.basics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 34px;
}

.basics-grid article {
  background: var(--paper);
  padding: 28px 30px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.basics-grid h3 {
  font-size: 25px;
  margin-bottom: 12px;
}

.basics-grid p {
  font-size: 14px;
  margin: 0;
}

/* Sources */
.sources {
  padding-bottom: 72px;
}

.source-list {
  list-style: none;
  padding: 0;
  margin: 34px 0 56px;
}

.source-list li {
  border-bottom: 1px solid var(--line);
}

.source-list li:first-child {
  border-top: 1px solid var(--line);
}

.source-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 4px;
  gap: 28px;
  transition: padding-left 0.25s var(--ease-spring), color 0.2s ease;
}

.source-list a:hover {
  color: var(--accent);
  padding-left: 12px;
}

.source-list small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* Footer */
.site-footer {
  background: var(--espresso);
  color: #f7f0e3;
  padding: 62px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 46px;
}

.site-footer p,
.site-footer .brand svg {
  color: #c7bbac;
}

.site-footer .brand {
  color: #f7f0e3;
}

.footer-statement {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
  margin: 22px 0 0;
  color: #eee4d7 !important;
}

.footer-grid nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
}

.footer-grid > div:last-child {
  font-size: 13px;
}

.footer-grid > div:last-child a {
  display: block;
  margin-bottom: 12px;
}

.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer-bottom {
  border-top: 1px solid #48392f;
  display: flex;
  justify-content: space-between;
  padding: 22px 0;
  font-size: 11px;
  color: #c7bbac;
  gap: 20px;
}

/* Scroll-Driven Entry Animations & JS Fallback */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-up {
      from {
        opacity: 0.12;
        transform: translateY(28px) scale(0.985);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .motion-reveal {
      animation: reveal-up auto linear both;
      animation-timeline: view(block);
      animation-range: entry 0% cover 24%;
    }
  }

  html.js-reveal-fallback .motion-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-spring);
  }

  html.js-reveal-fallback .motion-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Directional Cross-Document View Transitions */
@keyframes vt-fade-out-left {
  to {
    opacity: 0;
    transform: translateX(-28px);
  }
}
@keyframes vt-fade-in-right {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
}
@keyframes vt-fade-out-right {
  to {
    opacity: 0;
    transform: translateX(28px);
  }
}
@keyframes vt-fade-in-left {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  :active-view-transition-type(forward)::view-transition-old(root) {
    animation: 0.28s var(--ease-out) both vt-fade-out-left;
  }
  :active-view-transition-type(forward)::view-transition-new(root) {
    animation: 0.34s var(--ease-spring) both vt-fade-in-right;
  }
  :active-view-transition-type(backward)::view-transition-old(root) {
    animation: 0.28s var(--ease-out) both vt-fade-out-right;
  }
  :active-view-transition-type(backward)::view-transition-new(root) {
    animation: 0.34s var(--ease-spring) both vt-fade-in-left;
  }
}

/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .container {
    width: calc(100% - 56px);
  }
  .desktop-nav {
    gap: 20px;
    margin-right: 8px;
  }
  .hero,
  .page-intro-grid,
  .story-layout,
  .ritual-grid,
  .finder,
  .milk-grid,
  .calculator {
    gap: 36px;
  }
  .hero-figure {
    height: 490px;
  }
  .promise-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 28px;
  }
  .roast-grid,
  .families-grid {
    grid-template-columns: 1fr;
  }
  .grind-scale {
    grid-template-columns: repeat(3, 1fr);
  }
  .grind-card:nth-child(3) {
    border-right: 0;
  }
  .grind-card:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
  .brew-timer,
  .recipe-hero-card {
    grid-template-columns: 1fr;
  }
  .recipe-steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 82px;
  }
  .desktop-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .hero,
  .page-intro-grid,
  .story-layout,
  .ritual-grid,
  .finder,
  .finder-card,
  .milk-grid,
  .grinder,
  .calculator,
  .note-block-split,
  .species-grid,
  .machine-grid,
  .aroma-grid,
  .basics-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 28px;
    padding-bottom: 36px;
    gap: 32px;
  }
  .hero-figure {
    height: 400px;
  }
  .story-stage {
    display: none;
  }
  .story-step-mobile-img {
    display: block;
  }
  .topic-grid,
  .fix-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .section {
    padding-block: 64px;
  }
  .section-heading,
  .gallery-header,
  .recipe-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  :root {
    --header-h: 74px;
  }
  .container {
    width: calc(100% - 32px);
  }
  .brand > span {
    font-size: 20px;
  }
  .brand > svg {
    width: 32px;
    height: 38px;
  }
  .header-actions {
    gap: 8px;
  }
  .language {
    padding: 5px 9px;
    font-size: 10.5px;
  }
  .hero-figure {
    height: 320px;
  }
  .hero-image-wrap {
    border-radius: 76px 12px 12px 12px;
  }
  .hero-glass-badge {
    top: 12px;
    right: 12px;
    left: 12px;
    padding: 9px 12px;
  }
  .hero-figure figcaption {
    left: 16px;
    bottom: 16px;
    font-size: 12px;
  }
  .photo-mark {
    right: 16px;
    bottom: 14px;
    font-size: 20px;
  }
  .promise-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .story-section,
  .gallery-section,
  .ritual,
  .roast-section,
  .compass-section,
  .milk-section,
  .families-section {
    padding-block: 54px;
  }
  .story-step,
  .compass-panel,
  .recipe-panel,
  .calculator,
  .grinder {
    padding: 22px 18px;
  }
  .calc-form {
    padding: 20px 16px;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .calc-output {
    flex-wrap: wrap;
  }
  .calc-output output {
    font-size: 30px;
  }
  .grind-scale {
    grid-template-columns: 1fr 1fr;
  }
  .grind-card:nth-child(3) {
    border-right: 1px solid var(--line);
  }
  .grind-card:nth-child(even) {
    border-right: 0;
  }
  .grind-card:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }
  .timer-left {
    flex-direction: column;
    align-items: flex-start;
  }
  .recipe-steps {
    grid-template-columns: 1fr;
  }
  .species {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
  }
  .roast-card-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .roast-temp {
    text-align: left;
  }
  .next-guide {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .next-guide a {
    font-size: 24px;
    width: 100%;
    justify-content: space-between;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
  }
}

/* Reduced Motion Accessibility Overrides (Case-by-Case) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .mobile-nav,
  .mobile-nav:where([hidden], [data-closing]) {
    translate: none;
    transition-duration: 0.08s;
  }
  @starting-style {
    .mobile-nav {
      translate: none;
    }
  }
  details::details-content,
  .spotlight-glow,
  .button,
  .topic-card,
  .machine-card,
  .family-card,
  .aroma-card,
  .gallery-card,
  .hero-figure img,
  .topic-photo img,
  .arch-frame img {
    transition: none !important;
  }
  .story-visual {
    transition: none !important;
    transform: none !important;
  }
}

/* Print Stylesheet */
@media print {
  body {
    background: #fff;
    color: #000;
    padding-top: 0;
    font-size: 11pt;
  }
  .container {
    width: 100%;
  }
  .scroll-progress,
  .site-header,
  .site-footer,
  .next-guide,
  .print-button,
  .skip-link,
  .finder,
  .gallery-section,
  .timer-buttons {
    display: none !important;
  }
  .recipe-panel[hidden] {
    display: block !important;
  }
  .page-intro,
  .section,
  .ritual {
    padding: 14px 0;
  }
  .recipe-steps {
    grid-template-columns: 1fr 1fr;
  }
  .recipe-steps li,
  .machine-card,
  .species,
  .recipe-panel {
    break-inside: avoid;
  }
}
