/* ==========================================================================
   FORMA CAFÉ — styles.css
   ========================================================================== */

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; }
  body { min-height: 100svh; }
  img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: none; cursor: pointer; }
  ul, ol { list-style: none; }
  a { color: inherit; text-decoration: none; }
}

@layer tokens {
  :root {
    --color-ink: #17100c;
    --color-espresso: #291710;
    --color-roast: #623824;
    --color-copper: #b9653f;
    --color-crema: #dfbd91;
    --color-milk: #f3ede4;
    --color-paper: #f7f3ec;
    --color-sage: #777d6d;
    --color-line: rgba(23, 16, 12, 0.16);
    --color-line-light: rgba(247, 243, 236, 0.18);

    --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-serif: "Fraunces", Georgia, "Times New Roman", serif;

    --gutter: clamp(1.25rem, 4vw, 4rem);
    --container-max: 90rem;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-soft: cubic-bezier(0.65, 0, 0.35, 1);

    --radius-sm: 0.375rem;
    --radius-md: 0.875rem;
    --radius-lg: 1.75rem;
    --radius-pill: 999px;

    --header-h: clamp(3.75rem, 6vw, 5.25rem);

    --btn-solid-bg: var(--color-milk);
    --btn-solid-fg: var(--color-ink);
    --btn-ghost-fg: var(--color-milk);
    --btn-ghost-line: rgba(247, 243, 236, 0.5);

    --fg: var(--color-ink);
    --muted: rgba(23, 16, 12, 0.64);
  }
}

@layer base {
  html { scroll-behavior: auto; }
  body {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 1.25vw, 1.2rem);
    line-height: 1.62;
    color: var(--fg);
    background: var(--color-paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
  }
  ::selection { background: var(--color-copper); color: var(--color-milk); }
  html.scroll-lock, body.scroll-lock { overflow: hidden; }
  section { scroll-margin-top: calc(var(--header-h) + 1rem); }

  .visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
  }

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

@layer typography {
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-copper);
  }
  .eyebrow::before { content: ""; width: 2.25rem; height: 1px; background: currentColor; opacity: 0.7; }
  .eyebrow--light { color: var(--color-crema); }

  .section-title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(2.8rem, 6vw, 6.5rem);
    line-height: 0.92;
    letter-spacing: -0.02em;
    color: var(--fg);
    margin-top: 1.25rem;
  }
  .section-lede {
    max-width: 46ch;
    font-size: clamp(1.05rem, 1.4vw, 1.3rem);
    line-height: 1.6;
    color: var(--muted);
    margin-top: 1.5rem;
  }
}

@layer layout {
  .container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .section { position: relative; padding-block: clamp(5rem, 12vw, 10rem); }
  .section-head { max-width: 64ch; }
  .line-mask { display: block; overflow: hidden; padding-block: 0.06em; margin-block: -0.06em; }
  .line-mask__inner { display: inline-block; will-change: transform; }
}

@layer components {
  .btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0.9rem 1.9rem;
    border-radius: var(--radius-pill);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: transform 0.4s var(--ease-soft), background-color 0.4s var(--ease-soft), color 0.4s var(--ease-soft), border-color 0.4s var(--ease-soft);
  }
  .btn--solid { background: var(--btn-solid-bg); color: var(--btn-solid-fg); }
  .btn--solid:hover { transform: translateY(-2px); }
  .btn--ghost {
    background: transparent;
    color: var(--btn-ghost-fg);
    border: 1px solid var(--btn-ghost-line);
    backdrop-filter: blur(2px);
  }
  .btn--ghost:hover { background: rgba(247, 243, 236, 0.1); }
  .btn--line {
    min-height: 2.5rem;
    padding: 0.5rem 0;
    border-radius: 0;
    background: none;
    color: var(--fg);
    border-bottom: 1px solid var(--color-line);
    justify-content: flex-start;
  }
  .btn--line .btn__arrow { display: inline-block; transition: transform 0.35s var(--ease-out); }
  .btn--line:hover .btn__arrow, .btn--line:focus-visible .btn__arrow { transform: translateX(6px); }
  .btn--small { min-height: 2.5rem; padding: 0.55rem 1.25rem; }

  .btn--submit { width: 100%; overflow: hidden; min-height: 3.25rem; }
  .btn__spinner {
    display: none;
    width: 1.1rem; height: 1.1rem;
    border-radius: 50%;
    border: 2px solid rgba(23, 16, 12, 0.3);
    border-top-color: currentColor;
    animation: spin 0.8s linear infinite;
  }
  .btn--submit.is-loading .btn__label { opacity: 0; }
  .btn--submit.is-loading .btn__spinner { display: inline-block; }
  .btn--submit.is-success { background: var(--color-sage); color: var(--color-milk); }
  .btn--submit.is-error { animation: shake 0.4s var(--ease-soft); }

  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
  }

  .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem; height: 3rem;
    border: 1px solid var(--color-line);
    border-radius: 50%;
    color: var(--fg);
    background: transparent;
    transition: background-color 0.35s var(--ease-soft), color 0.35s var(--ease-soft), transform 0.35s var(--ease-soft);
  }
  .icon-btn svg { width: 1.4rem; height: 1.4rem; }
  .icon-btn:hover { background: var(--color-ink); color: var(--color-milk); transform: translateY(-1px); }
  .icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
  .icon-btn:disabled:hover { background: transparent; color: var(--fg); transform: none; }
}

@layer components {
  .preloader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-espresso);
    color: var(--color-milk);
  }
  .preloader__inner { display: flex; flex-direction: column; align-items: center; gap: 2rem; text-align: center; }
  .preloader__logo {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: 0.12em;
  }
  .preloader__logo span { color: var(--color-copper); }
  .preloader__ring { position: relative; width: 96px; height: 96px; }
  .preloader__svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .preloader__track, .preloader__fill { fill: none; stroke-width: 2; }
  .preloader__track { stroke: rgba(247, 243, 236, 0.16); }
  .preloader__fill {
    stroke: var(--color-copper);
    stroke-linecap: round;
    stroke-dasharray: 276.46;
    stroke-dashoffset: 276.46;
  }
  .preloader__pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-crema);
  }
  .preloader__tag {
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(247, 243, 236, 0.5);
  }
}

@layer components {
  .cursor {
    position: fixed;
    top: 0; left: 0;
    z-index: 1200;
    pointer-events: none;
    will-change: transform;
    transform: translate(-50%, -50%);
    opacity: 0;
  }
  .cursor__dot {
    display: block;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid var(--color-crema);
    transition: width 0.3s var(--ease-soft), height 0.3s var(--ease-soft), background-color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
  }
  .cursor__label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #fff;
    opacity: 0;
    transition: opacity 0.25s, transform 0.3s var(--ease-soft);
  }
  .cursor.is-active { opacity: 1; }
  .cursor.is-hover .cursor__dot { width: 26px; height: 26px; background: rgba(223, 189, 145, 0.15); }
  .cursor.is-view .cursor__dot { width: 74px; height: 74px; background: rgba(23, 16, 12, 0.72); border-color: transparent; }
  .cursor.is-view .cursor__label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  .cursor.is-drag .cursor__dot { width: 58px; height: 58px; border-color: var(--color-copper); }
  @media (hover: none), (pointer: coarse) { .cursor { display: none; } }
}

@layer components {
  .page-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 3px;
    z-index: 900;
    pointer-events: none;
  }
  .page-progress__bar {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--color-copper);
    transform: scaleX(0);
    transform-origin: left center;
  }
  @media (max-width: 767px) { .page-progress { display: none; } }
}

@layer header {
  .header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 800;
    padding-top: 0.6rem;
    transition: transform 0.5s var(--ease-soft);
  }
  .header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-inline: auto;
    max-width: var(--container-max);
    padding: 0.5rem var(--gutter);
    min-height: var(--header-h);
    border-radius: var(--radius-md);
    transition: background-color 0.45s var(--ease-soft), border-color 0.45s var(--ease-soft), min-height 0.45s var(--ease-soft), box-shadow 0.45s var(--ease-soft);
    border: 1px solid transparent;
  }
  .header[data-scheme="dark"] { color: var(--color-milk); }
  .header[data-scheme="light"] { color: var(--color-ink); }
  .header.is-scrolled .header__inner {
    min-height: calc(var(--header-h) - 0.9rem);
    border-color: var(--color-line);
    box-shadow: 0 12px 32px -20px rgba(23, 16, 12, 0.35);
  }
  .header.is-scrolled[data-scheme="dark"] .header__inner {
    background: rgba(23, 16, 12, 0.72);
    border-color: var(--color-line-light);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
  }
  .header.is-scrolled[data-scheme="light"] .header__inner {
    background: rgba(247, 243, 236, 0.82);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
  }
  .header.is-hidden { transform: translateY(-110%); }

  .brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.15em;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.06em;
  }
  .brand__sub { font-weight: 400; font-size: 0.85em; }
  .brand__slash { color: var(--color-copper); }

  .header__nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.4rem); }
  .header__link {
    position: relative;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0.82;
    transition: opacity 0.3s;
    padding-block: 0.3rem;
  }
  .header__link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: var(--color-copper);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s var(--ease-out);
  }
  .header__link:hover, .header__link:focus-visible { opacity: 1; }
  .header__link:hover::after, .header__link:focus-visible::after { transform: scaleX(1); }
  .header__link.is-active { opacity: 1; }
  .header__link.is-active::after { transform: scaleX(1); }

  .header__actions { display: flex; align-items: center; gap: 1rem; }

  .menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 2.75rem; height: 2.75rem;
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    opacity: 0.9;
  }
  .menu-btn__line {
    display: block;
    width: 1.1rem; height: 1.5px;
    background: currentColor;
    transition: transform 0.4s var(--ease-soft);
  }
  .menu-btn[aria-expanded="true"] .menu-btn__line:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-btn__line:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

  @media (max-width: 1023px) {
    .header__nav { display: none; }
    .header__actions .btn--small { display: none; }
    .menu-btn { display: inline-flex; }
  }
}

@layer overlays {
  .mobile-menu { position: fixed; inset: 0; z-index: 850; display: none; }
  .mobile-menu.is-open { display: block; }
  .mobile-menu__bg {
    position: absolute; inset: 0;
    background: rgba(23, 16, 12, 0.4);
    opacity: 0;
    transition: opacity 0.4s;
  }
  .mobile-menu.is-open .mobile-menu__bg { opacity: 1; }
  .mobile-menu__panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(88vw, 26rem);
    background: var(--color-espresso);
    color: var(--color-milk);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2.5rem;
    clip-path: inset(0 0 0 100%);
    transition: clip-path 0.55s var(--ease-soft);
  }
  .mobile-menu.is-open .mobile-menu__panel { clip-path: inset(0 0 0 0%); }
  .mobile-menu__list { display: flex; flex-direction: column; }
  .mobile-menu__link {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding-block: 1rem;
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    line-height: 1;
    border-bottom: 1px solid var(--color-line-light);
    opacity: 0;
    transform: translateY(20px);
  }
  .mobile-menu.is-open .mobile-menu__link { animation: menuLinkIn 0.55s var(--ease-out) forwards; }
  .mobile-menu__idx {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--color-copper);
  }
  @keyframes menuLinkIn { to { opacity: 1; transform: translateY(0); } }
  .mobile-menu__foot { display: flex; flex-direction: column; gap: 1.25rem; }
  .mobile-menu__meta { font-size: 0.8rem; color: rgba(247, 243, 236, 0.55); }
}

@layer accessibility {
  .skip-link {
    position: fixed;
    top: 0.75rem; left: 0.75rem;
    z-index: 1300;
    padding: 0.7rem 1.2rem;
    background: var(--color-milk);
    color: var(--color-ink);
    font-weight: 700;
    border-radius: var(--radius-sm);
    transform: translateY(-200%);
    transition: transform 0.3s var(--ease-out);
  }
  .skip-link:focus { transform: translateY(0); }
}

@layer hero {
  .hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--color-milk);
    background: var(--color-espresso);
  }
  .hero__media { position: absolute; inset: 0; overflow: hidden; }
  .hero__video {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scale(1.08);
    will-change: transform;
  }
  .hero__overlay {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(23,16,12,0.55) 0%, rgba(23,16,12,0.35) 45%, rgba(23,16,12,0.72) 100%),
      linear-gradient(90deg, rgba(23,16,12,0.72) 0%, rgba(23,16,12,0.25) 60%, rgba(23,16,12,0.15) 100%);
  }
  .hero__grain {
    position: absolute; inset: 0; opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
  .hero__canvas { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
  .hero__canvas canvas { position: absolute; width: 100%; height: 100%; }

  .hero__content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-block: calc(var(--header-h) + 2rem) 4rem;
  }
  .hero__title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(4rem, 10vw, 10rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin-top: 1.5rem;
  }
  .hero__line--accent { color: var(--color-crema); font-style: italic; }
  .hero__text {
    max-width: 46ch;
    margin-top: 1.75rem;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: rgba(247, 243, 236, 0.85);
  }
  .hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }
  .hero__datum {
    margin-top: 2.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(247, 243, 236, 0.6);
  }
  .hero__scroll {
    position: absolute;
    left: var(--gutter);
    bottom: 2rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(247, 243, 236, 0.7);
  }
  .hero__scroll-line {
    position: relative;
    width: 1px; height: 3.5rem;
    background: rgba(247, 243, 236, 0.25);
    overflow: hidden;
  }
  .hero__scroll-line::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 50%;
    background: var(--color-crema);
    animation: scrollHint 2.2s var(--ease-soft) infinite;
  }
  @keyframes scrollHint {
    0% { transform: translateY(-100%); }
    55% { transform: translateY(200%); }
    100% { transform: translateY(200%); }
  }
  .hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -1px;
    height: clamp(4rem, 10vw, 8rem);
    background: var(--color-crema);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    z-index: 2;
    pointer-events: none;
  }
}

@layer slider {
  .slider { --fg: var(--color-ink); --muted: rgba(23, 16, 12, 0.64); background: var(--color-crema); }
  .slider__inner { display: flex; flex-direction: column; }
  .slider__head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); padding-inline: var(--gutter); }
  .slider__title { max-width: 14ch; }

  .slider__track-wrap { position: relative; }
  .slider__track {
    display: flex;
    gap: clamp(1.25rem, 3vw, 3.5rem);
    padding-inline: var(--gutter);
    width: max-content;
    will-change: transform;
  }

  .coffee-card {
    position: relative;
    display: flex;
    flex-shrink: 0;
    width: clamp(20rem, 62vw, 58rem);
    background: var(--color-paper);
    border: 1px solid var(--color-line);
    overflow: hidden;
    transform-origin: center center;
    transition: opacity 0.5s var(--ease-soft), transform 0.5s var(--ease-soft), filter 0.5s var(--ease-soft);
  }
  .coffee-card__media {
    position: relative;
    flex: 1 1 58%;
    overflow: hidden;
    background: linear-gradient(150deg, var(--color-roast), var(--color-espresso));
  }
  .coffee-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--ease-out);
  }
  .coffee-card__media::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(23,16,12,0) 55%, rgba(23,16,12,0.35) 100%);
  }
  .coffee-card__tag {
    position: absolute;
    top: 1rem; left: 1rem;
    z-index: 2;
    padding: 0.4rem 0.8rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(23, 16, 12, 0.55);
    color: var(--color-milk);
    border-radius: var(--radius-pill);
    backdrop-filter: blur(4px);
  }
  .coffee-card__body {
    flex: 1 1 42%;
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 3vw, 3rem);
  }
  .coffee-card__number {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--color-copper);
  }
  .coffee-card__name {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(2rem, 4.5vw, 4rem);
    line-height: 0.95;
    margin-top: 0.5rem;
    letter-spacing: -0.01em;
  }
  .coffee-card__phrase {
    margin-top: 0.75rem;
    font-size: 1.05rem;
    font-style: italic;
    color: var(--muted);
  }
  .coffee-card__specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem 1.25rem;
    margin-top: 1.5rem;
  }
  .coffee-card__specs div { display: flex; flex-direction: column; gap: 0.2rem; }
  .coffee-card__specs dt {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .coffee-card__specs dd { font-size: 0.95rem; font-weight: 600; }

  .coffee-card__notes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.4rem;
  }
  .coffee-card__notes li {
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-pill);
  }
  .coffee-card .btn--line { margin-top: 1.6rem; align-self: flex-start; }
  .coffee-card__disclaimer {
    margin-top: 1.25rem;
    font-size: 0.72rem;
    color: var(--muted);
  }

  .coffee-card--flip { flex-direction: row-reverse; }
  .coffee-card--stack { flex-direction: column; }
  .coffee-card--stack .coffee-card__media { flex: 1 1 52%; }
  .coffee-card--stack .coffee-card__body { flex: 1 1 48%; }

  .coffee-card__media--portrait { aspect-ratio: 4 / 5; }
  .coffee-card__media--square { aspect-ratio: 1 / 1; }
  .coffee-card__media--landscape { aspect-ratio: 16 / 10; }
  .coffee-card--stack .coffee-card__media { aspect-ratio: 16 / 9; }

  .coffee-card.is-inactive { opacity: 0.55; filter: saturate(0.7); transform: scale(0.9); }
  .coffee-card.is-active { opacity: 1; filter: none; transform: scale(1); }
  .coffee-card.is-active .coffee-card__media img { transform: scale(1.03); }

  .slider__controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: clamp(2rem, 4vw, 3.5rem);
    padding-inline: var(--gutter);
  }
  .slider__nav { display: flex; gap: 0.6rem; }
  .slider__count {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
  }
  .slider__count-sep { color: var(--color-copper); }
  .slider__progress {
    flex: 1;
    height: 1px;
    background: var(--color-line);
    overflow: hidden;
  }
  .slider__progress-bar {
    display: block;
    height: 100%;
    background: var(--color-copper);
    transform: scaleX(0);
    transform-origin: left center;
  }
  .slider__dots { display: flex; gap: 0.4rem; }
  .slider__dot {
    width: 0.5rem; height: 0.5rem;
    border-radius: 50%;
    background: var(--color-line);
    transition: background-color 0.3s, transform 0.3s;
  }
  .slider__dot.is-active { background: var(--color-copper); transform: scale(1.35); }

  @media (max-width: 1023px) {
    .slider__inner { display: block; }
    .slider__track-wrap {
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
    }
    .slider__track { width: auto; padding-inline: 0; gap: 1.25rem; }
    .coffee-card {
      width: clamp(84vw, 88vw, 92vw);
      flex-direction: column;
      scroll-snap-align: start;
    }
    .coffee-card--flip { flex-direction: column; }
    .coffee-card__media { flex: none; aspect-ratio: 4 / 3; }
    .coffee-card__body { flex: none; }
    .slider__controls { flex-wrap: wrap; }
    .slider__dots { display: none; }
  }
}

@layer features {
  .features { --fg: var(--color-ink); --muted: rgba(23, 16, 12, 0.64); background: var(--color-paper); }
  .features__layout {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    margin-top: clamp(3rem, 6vw, 5rem);
    align-items: start;
  }
  .features__sticky {
    position: sticky;
    top: 0;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding-inline: var(--gutter);
  }

  .cup {
    position: relative;
    width: min(100%, 26rem);
    aspect-ratio: 400 / 620;
  }
  .cup__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .cup__outline { stroke: var(--color-ink); stroke-width: 2.5; }
  .cup__rim { stroke: var(--color-ink); stroke-width: 2.5; }
  .cup__handle { stroke: var(--color-ink); stroke-width: 2.5; opacity: 0; transition: opacity 0.4s; }
  .cup--handled .cup__handle { opacity: 1; }
  .cup__layer { transition: fill 0.4s var(--ease-soft); }
  .cup__shine { opacity: 0.14; }
  .cup__ticks line { stroke: var(--color-copper); stroke-width: 1.5; stroke-dasharray: 18; stroke-dashoffset: 18; }

  .cup__labels { position: absolute; inset: 0; pointer-events: none; }
  .cup__label {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    transform: translateY(-50%);
  }
  .cup__label::before {
    content: "";
    width: 1.5rem; height: 1px;
    background: var(--color-copper);
  }
  .cup__label.is-right { left: auto; right: 0; flex-direction: row-reverse; }
  .cup__label.is-right::before { content: none; }
  .cup__label.is-right::after {
    content: "";
    width: 1.5rem; height: 1px;
    background: var(--color-copper);
  }

  .cup__info {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 0.5rem;
  }
  .cup__counter { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.2em; color: var(--color-copper); }
  .cup__name-wrap { overflow: hidden; height: 2.6rem; }
  .cup__name {
    display: block;
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1;
  }
  .cup__hint { font-size: 0.72rem; color: var(--muted); }

  .features__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
  }
  .features__nav button {
    padding: 0.4rem 0.8rem;
    font-size: 0.74rem;
    font-weight: 600;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-pill);
    color: var(--muted);
    transition: color 0.3s, border-color 0.3s, background-color 0.3s;
  }
  .features__nav button:hover { color: var(--color-ink); border-color: var(--color-ink); }
  .features__nav button.is-active { background: var(--color-ink); color: var(--color-milk); border-color: var(--color-ink); }

  .features__chapters { display: flex; flex-direction: column; }
  .feature {
    min-height: clamp(46rem, 82svh, 64rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 4rem;
    border-top: 1px solid var(--color-line);
    scroll-margin-top: calc(var(--header-h) + 1rem);
  }
  .feature__number { font-family: var(--font-serif); font-size: 1rem; letter-spacing: 0.2em; color: var(--color-copper); }
  .feature__name {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(2rem, 4.5vw, 4rem);
    line-height: 0.95;
    margin-top: 0.5rem;
  }
  .feature__desc { margin-top: 1.25rem; max-width: 52ch; color: var(--muted); }
  .feature__blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
  }
  .feature__block { border-left: 1px solid var(--color-copper); padding-left: 1rem; }
  .feature__block h4 {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .feature__block p { margin-top: 0.35rem; font-weight: 600; font-size: 0.95rem; }

  .feature__profile { margin-top: 2rem; }
  .feature__profile h4 {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
  }
  .meter {
    display: grid;
    grid-template-columns: 6.5rem 1fr 2.5rem;
    align-items: center;
    gap: 1rem;
    padding-block: 0.55rem;
  }
  .meter__label { font-size: 0.85rem; font-weight: 600; }
  .meter__track {
    position: relative;
    display: block;
    height: 3px;
    background: var(--color-line);
    overflow: hidden;
  }
  .meter__fill {
    display: block;
    height: 100%;
    width: calc(var(--v) / 5 * 100%);
    background: var(--color-copper);
  }
  .meter__value { font-size: 0.85rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
  .feature__texture {
    display: flex;
    justify-content: space-between;
    padding-block: 0.55rem;
    border-top: 1px solid var(--color-line);
  }
  .feature__texture span { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
  .feature__texture strong { font-size: 0.9rem; }

  .feature__notes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.75rem;
  }
  .feature__notes li {
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-pill);
  }
  .feature__moment {
    margin-top: 1.5rem;
    max-width: 46ch;
    font-style: italic;
    color: var(--muted);
  }
  .feature__moment span {
    display: block;
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-copper);
    margin-bottom: 0.25rem;
  }

  .dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
  }
  .dots::before {
    content: "";
    width: calc(var(--n) * 10px + (var(--n) - 1) * 4px);
    height: 8px;
    background-image:
      radial-gradient(circle at center, var(--color-copper) 0 3px, transparent 3px);
    background-size: 10px 8px;
    background-repeat: repeat-x;
    background-position: left center;
  }
  .dots::after {
    content: "";
    width: calc((5 - var(--n)) * 10px + (4 - var(--n)) * 4px);
    height: 8px;
    background-image:
      radial-gradient(circle at center, var(--color-line) 0 3px, transparent 3px);
    background-size: 10px 8px;
    background-repeat: repeat-x;
    background-position: left center;
  }

  @media (max-width: 1023px) {
    .features__layout { grid-template-columns: 1fr; gap: 0; }
    .features__sticky {
      position: sticky;
      top: var(--header-h);
      min-height: 0;
      height: 42svh;
      z-index: 5;
      padding-block: 1rem;
      background: var(--color-paper);
    }
    .cup { height: 38svh; width: auto; aspect-ratio: 400 / 620; max-width: 90vw; }
    .features__nav { display: none; }
    .feature { min-height: 0; padding-block: 2.5rem; }
    .feature__blocks { grid-template-columns: 1fr; }
  }
}

@layer faq {
  .faq { --fg: var(--color-ink); --muted: rgba(23, 16, 12, 0.64); background: var(--color-paper); position: relative; overflow: hidden; }
  .faq__glyph {
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-serif);
    font-size: clamp(20rem, 40vw, 38rem);
    line-height: 1;
    color: var(--color-copper);
    opacity: 0.06;
    pointer-events: none;
    user-select: none;
  }
  .faq__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
  }
  .faq__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
  .faq__title { max-width: 14ch; }

  .faq__list { border-top: 1px solid var(--color-line); }
  .faq__item { border-bottom: 1px solid var(--color-line); }
  .faq__q {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    padding-block: 1.5rem;
    text-align: left;
    color: var(--fg);
  }
  .faq__num { font-family: var(--font-serif); font-size: 0.85rem; color: var(--color-copper); transition: color 0.3s; }
  .faq__qtext { flex: 1; font-family: var(--font-serif); font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.2; }
  .faq__icon {
    position: relative;
    width: 1.1rem; height: 1.1rem;
    flex-shrink: 0;
  }
  .faq__icon::before, .faq__icon::after {
    content: "";
    position: absolute;
    top: 50%; left: 0;
    width: 100%; height: 1.5px;
    background: var(--color-copper);
    transition: transform 0.4s var(--ease-soft);
  }
  .faq__icon::after { transform: rotate(90deg); }
  .faq__q[aria-expanded="true"] .faq__icon::after { transform: rotate(0deg); }
  .faq__q:hover .faq__num, .faq__q[aria-expanded="true"] .faq__num { color: var(--color-copper); }
  .faq__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s var(--ease-soft);
  }
  .faq__panel.is-open { grid-template-rows: 1fr; }
  .faq__answer { overflow: hidden; }
  .faq__answer p { padding-bottom: 1.75rem; max-width: 62ch; color: var(--muted); }

  @media (max-width: 1023px) {
    .faq__grid { grid-template-columns: 1fr; }
    .faq__intro { position: static; }
    .faq__glyph { opacity: 0.04; }
  }
}

@layer gallery {
  .gallery { --fg: var(--color-milk); --muted: rgba(247, 243, 236, 0.72); background: var(--color-espresso); }
  .gallery__head { margin-bottom: clamp(3rem, 6vw, 5rem); }

  .gallery__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(0.75rem, 2vw, 1.75rem);
    align-items: start;
  }
  .gallery-item { position: relative; }
  .gallery-item--a { grid-column: 1 / span 5; margin-top: 4rem; }
  .gallery-item--b { grid-column: 7 / span 6; }
  .gallery-item--c { grid-column: 1 / span 4; }
  .gallery-item--d { grid-column: 6 / span 4; margin-top: 6rem; }
  .gallery-item--e { grid-column: 10 / span 3; margin-top: 2rem; }
  .gallery-item--f { grid-column: 2 / span 6; margin-top: 3rem; }
  .gallery-item--g { grid-column: 8 / span 5; margin-top: -4rem; }
  .gallery-item--h { grid-column: 1 / span 3; margin-top: -2rem; }
  .gallery-item--i { grid-column: 5 / span 5; margin-top: 5rem; }

  .gallery-item__media {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(150deg, var(--color-roast), var(--color-espresso));
    cursor: pointer;
  }
  .gallery-item__media::after {
    content: "";
    position: absolute; inset: 0;
    background: rgba(23, 16, 12, 0.25);
    transition: background-color 0.4s;
  }
  .gallery-item:hover .gallery-item__media::after { background: rgba(23, 16, 12, 0.05); }
  .gallery-item__media img, .gallery-item__media video {
    width: 100%; height: 100%;
    object-fit: cover;
    scale: 1.08;
    transition: scale 0.7s var(--ease-soft);
  }
  .gallery-item:hover .gallery-item__media img,
  .gallery-item:hover .gallery-item__media video { scale: 1.04; }

  .gallery-item__play {
    position: absolute;
    top: 50%; left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem; height: 4rem;
    border-radius: 50%;
    background: rgba(23, 16, 12, 0.5);
    color: var(--color-milk);
    font-size: 1rem;
    backdrop-filter: blur(4px);
  }
  .gallery-item__caption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.9rem;
    margin-top: 0.9rem;
    color: var(--muted);
    font-size: 0.82rem;
  }
  .gallery-item__num { font-family: var(--font-serif); color: var(--color-copper); }
  .gallery-item__name { font-family: var(--font-serif); font-size: 1.05rem; color: var(--color-milk); }
  .gallery-item__text { font-size: 0.8rem; }

  .gallery-item--a .gallery-item__media { aspect-ratio: 4 / 3; }
  .gallery-item--b .gallery-item__media { aspect-ratio: 4 / 5; }
  .gallery-item--c .gallery-item__media { aspect-ratio: 1 / 1; }
  .gallery-item--d .gallery-item__media { aspect-ratio: 3 / 4; }
  .gallery-item--e .gallery-item__media { aspect-ratio: 4 / 5; }
  .gallery-item--f .gallery-item__media { aspect-ratio: 16 / 10; }
  .gallery-item--g .gallery-item__media { aspect-ratio: 16 / 9; }
  .gallery-item--h .gallery-item__media { aspect-ratio: 1 / 1; }
  .gallery-item--i .gallery-item__media { aspect-ratio: 16 / 10; }

  @media (max-width: 767px) {
    .gallery__grid { grid-template-columns: 1fr 1fr; }
    .gallery-item--a, .gallery-item--b, .gallery-item--c, .gallery-item--d, .gallery-item--e,
    .gallery-item--f, .gallery-item--g, .gallery-item--h, .gallery-item--i {
      grid-column: auto; margin-top: 0;
    }
    .gallery-item--a, .gallery-item--c, .gallery-item--f, .gallery-item--i { grid-column: 1 / -1; }
    .gallery-item--g { grid-column: 1 / -1; margin-top: 0; }
  }
}

@layer contact {
  .contact { --fg: var(--color-ink); --muted: rgba(23, 16, 12, 0.64); background: var(--color-crema); }
  .contact__head { margin-bottom: clamp(3rem, 6vw, 4.5rem); }
  .contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }
  .contact__form-wrap { position: relative; }

  .form { display: flex; flex-direction: column; gap: 1.75rem; }
  .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

  .field { position: relative; display: flex; flex-direction: column; }
  .field__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
  }
  .field__input, .field__select {
    width: 100%;
    padding: 0.8rem 0.25rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-line);
    border-radius: 0;
    font-size: 1rem;
    transition: border-color 0.3s;
  }
  .field__input:hover, .field__select:hover { border-bottom-color: rgba(23, 16, 12, 0.4); }
  .field__input:focus, .field__select:focus { outline: none; border-bottom-color: var(--color-copper); }
  .field__select { appearance: none; cursor: pointer; }
  .field__textarea { resize: vertical; min-height: 8rem; max-height: 20rem; }
  .field__error {
    font-size: 0.78rem;
    color: #b3402f;
    margin-top: 0.4rem;
    min-height: 0;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.3s, transform 0.3s;
  }
  .field.is-invalid .field__input, .field.is-invalid .field__select { border-bottom-color: #b3402f; }
  .field.is-invalid .field__error { opacity: 1; transform: translateY(0); }
  .field.is-valid .field__input, .field.is-valid .field__select { border-bottom-color: var(--color-sage); }

  .field--check { flex-direction: row; align-items: flex-start; gap: 0.75rem; }
  .field__check {
    width: 1.3rem; height: 1.3rem;
    margin-top: 0.2rem;
    accent-color: var(--color-copper);
  }
  .field__check-label { font-size: 0.9rem; color: var(--muted); }
  .field--check .field__error { margin-left: 2.05rem; }

  .form__status { font-size: 0.9rem; color: var(--muted); }
  .form__status.is-ok { color: var(--color-sage); }

  .contact__aside { position: relative; }
  .map {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    height: clamp(30rem, 78svh, 46rem);
    background: var(--color-paper);
    border: 1px solid var(--color-line);
    border-radius: 2.5rem 2.5rem 0.5rem 0.5rem;
    overflow: hidden;
    clip-path: inset(0 round 2.5rem 2.5rem 0.5rem 0.5rem);
    z-index: 1;
  }
  .map__fallback {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2rem;
    height: 100%;
    justify-content: center;
    text-align: center;
  }
  .map__fallback a { color: var(--color-copper); text-decoration: underline; }
  .map__hint {
    position: absolute;
    bottom: 1rem; left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    padding: 0.5rem 1rem;
    background: var(--color-paper);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    color: var(--muted);
  }
  .map__marker { background: none; border: none; }
  .map__marker-dot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--color-paper);
    box-shadow: 0 8px 24px -8px rgba(23, 16, 12, 0.5);
  }
  .map__marker-dot svg { width: 30px; height: 30px; }
  .map__marker-ring {
    position: absolute;
    left: 50%; top: 50%;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid var(--color-copper);
    transform: translate(-50%, -50%);
    animation: markerWave 2.4s var(--ease-soft) infinite;
    pointer-events: none;
  }
  @keyframes markerWave {
    0% { width: 44px; height: 44px; opacity: 0.7; }
    70% { width: 96px; height: 96px; opacity: 0; }
    100% { width: 96px; height: 96px; opacity: 0; }
  }
  .leaflet-popup-content-wrapper { border-radius: var(--radius-md); }
  .leaflet-popup-content { font-family: var(--font-sans); font-size: 0.85rem; }
  .contact__meta { margin-top: 1.5rem; }
  .contact__meta dl { display: flex; flex-direction: column; gap: 0.75rem; }
  .contact__meta dl div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; }
  .contact__meta dt {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .contact__meta dd { font-size: 0.92rem; font-weight: 600; }
  .contact__meta a { text-decoration: underline; text-underline-offset: 3px; }
  .map__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-copper);
  }

  @media (max-width: 1023px) {
    .contact__grid { grid-template-columns: 1fr; }
    .map { position: relative; top: 0; height: clamp(22rem, 60svh, 32rem); }
    .form__row { grid-template-columns: 1fr; }
  }
}

@layer footer {
  .footer { background: var(--color-espresso); color: var(--color-milk); overflow: hidden; }
  .footer__marquee { border-bottom: 1px solid var(--color-line-light); padding-block: 1.25rem; }
  .footer__marquee-track {
    display: flex;
    gap: 1.5rem;
    white-space: nowrap;
    animation: marquee 40s linear infinite;
  }
  .footer__marquee-track span {
    font-family: var(--font-serif);
    font-size: 1rem;
    letter-spacing: 0.16em;
    color: rgba(247, 243, 236, 0.55);
  }
  @keyframes marquee { to { transform: translateX(-50%); } }

  .footer__main { padding-block: clamp(4rem, 8vw, 7rem) 2.5rem; }
  .footer__closer {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    line-height: 0.98;
    max-width: 20ch;
    margin-bottom: clamp(3rem, 6vw, 5rem);
  }
  .footer__brand { margin-bottom: clamp(3rem, 6vw, 5rem); }
  .footer__logo {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(3rem, 9vw, 8rem);
    line-height: 0.9;
    letter-spacing: 0.02em;
    color: var(--color-milk);
  }
  .footer__logo span { color: var(--color-copper); }

  .footer__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-block: 2rem;
    border-top: 1px solid var(--color-line-light);
  }
  .footer__nav { display: flex; flex-direction: column; gap: 0.6rem; }
  .footer__nav a { width: fit-content; opacity: 0.75; transition: opacity 0.3s; }
  .footer__nav a:hover { opacity: 1; color: var(--color-crema); }
  .footer__contact { display: flex; flex-direction: column; gap: 0.6rem; opacity: 0.75; }
  .footer__contact a { text-decoration: underline; text-underline-offset: 3px; }
  .footer__legal { display: flex; flex-direction: column; gap: 0.6rem; }
  .footer__legal button { width: fit-content; opacity: 0.75; transition: opacity 0.3s; }
  .footer__legal button:hover { opacity: 1; color: var(--color-crema); }

  .footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-line-light);
  }
  .footer__copyright { font-size: 0.8rem; opacity: 0.6; }
  .footer__top {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .footer__top svg { width: 1.4rem; height: 1.4rem; transition: transform 0.4s var(--ease-out); }
  .footer__top:hover svg { transform: translateY(-4px); }

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

@layer overlays {
  .lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    background: rgba(23, 16, 12, 0.94);
    color: var(--color-milk);
  }
  .lightbox.is-open { display: block; }
  .lightbox__close, .lightbox__nav {
    position: absolute;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem; height: 3rem;
    border-radius: 50%;
    color: var(--color-milk);
    background: rgba(247, 243, 236, 0.08);
    transition: background-color 0.3s;
  }
  .lightbox__close:hover, .lightbox__nav:hover { background: rgba(247, 243, 236, 0.2); }
  .lightbox__close { top: 1.5rem; right: 1.5rem; }
  .lightbox__close svg, .lightbox__nav svg { width: 1.4rem; height: 1.4rem; }
  .lightbox__nav--prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
  .lightbox__nav--next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
  .lightbox__stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 5rem 3rem;
  }
  .lightbox__media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
  }
  .lightbox__media img, .lightbox__media video {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
  }
  .lightbox__info {
    text-align: center;
    margin-top: 1.5rem;
  }
  .lightbox__count { font-size: 0.75rem; letter-spacing: 0.2em; color: var(--color-copper); }
  .lightbox__name { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 500; margin-top: 0.4rem; }
  .lightbox__caption { font-size: 0.9rem; opacity: 0.7; margin-top: 0.3rem; }

  @media (max-width: 767px) {
    .lightbox__stage { padding: 4.5rem 1.5rem 1.5rem; }
    .lightbox__nav--prev { left: 0.5rem; }
    .lightbox__nav--next { right: 0.5rem; }
  }
}

@layer overlays {
  .legal { position: fixed; inset: 0; z-index: 1150; display: none; }
  .legal.is-open { display: block; }
  .legal__backdrop { position: absolute; inset: 0; background: rgba(23, 16, 12, 0.5); opacity: 0; transition: opacity 0.4s; }
  .legal.is-open .legal__backdrop { opacity: 1; }
  .legal__panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(92vw, 34rem);
    background: var(--color-paper);
    color: var(--color-ink);
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-soft);
    display: flex;
    flex-direction: column;
  }
  .legal.is-open .legal__panel { transform: translateX(0); }
  .legal__close {
    position: absolute;
    top: 1.25rem; right: 1.25rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem; height: 2.75rem;
    border-radius: 50%;
    border: 1px solid var(--color-line);
    color: var(--color-ink);
  }
  .legal__close svg { width: 1.2rem; height: 1.2rem; }
  .legal__scroll {
    padding: 2.5rem 2.5rem 3.5rem;
    overflow-y: auto;
  }
  .legal__title { font-family: var(--font-serif); font-size: 2rem; font-weight: 500; line-height: 1; }
  .legal__note {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    font-size: 0.8rem;
    background: rgba(185, 101, 63, 0.12);
    border-left: 2px solid var(--color-copper);
  }
  .legal__article { display: none; margin-top: 1.75rem; }
  .legal__article.is-active { display: block; }
  .legal__article h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
  }
  .legal__article p { margin-bottom: 0.9rem; color: var(--muted); font-size: 0.95rem; }
}

@layer motion {
  [data-theme="dark"] { --fg: var(--color-milk); --muted: rgba(247, 243, 236, 0.72); }
  [data-theme="cream"], [data-theme="paper"] {
    --fg: var(--color-ink);
    --muted: rgba(23, 16, 12, 0.64);
    --btn-solid-bg: var(--color-ink);
    --btn-solid-fg: var(--color-milk);
  }

  [data-reveal] { opacity: 0; transform: translateY(2.2rem); }
  [data-reveal].is-visible { opacity: 1; transform: none; transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
}

@layer accessibility {
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important;
      scroll-behavior: auto !important;
    }
    .hero__video { transform: none; }
    .footer__marquee-track { animation: none; }
    .hero__scroll-line::after { animation: none; }
    .cursor { display: none !important; }
    [data-reveal] { opacity: 1; transform: none; }
  }
}

@layer responsive {
  @media (max-width: 479px) {
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__actions .btn { width: 100%; }
  }
  @media (min-width: 1024px) {
    .slider { padding-block: 0; }
    .slider__inner { height: 100svh; justify-content: center; }
    .slider__track-wrap { overflow: visible; }
    .coffee-card { height: clamp(18rem, 52svh, 30rem); }
  }
  @media (max-width: 767px) {
    .section { padding-block: 4rem; }
    .slider__dots { display: none; }
  }
}
