@font-face{font-family:Piazzolla;src:url(assets/piazzolla-lat.woff2) format("woff2");font-display:swap}
@font-face{font-family:Piazzolla;src:url(assets/piazzolla-cyr.woff2) format("woff2");font-display:swap;unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Piazzolla;src:url(assets/piazzolla-italic-lat.woff2) format("woff2");font-style:italic;font-display:swap}
@font-face{font-family:Piazzolla;src:url(assets/piazzolla-italic-cyr.woff2) format("woff2");font-style:italic;font-display:swap;unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Manrope;src:url(assets/manrope-lat.woff2) format("woff2");font-display:swap}
@font-face{font-family:Manrope;src:url(assets/manrope-cyr.woff2) format("woff2");font-display:swap;unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

:root {
  --paper: #f0e5d8;
  --ink: #45342d;
  --stone: #857568;
  --sand: #b87355;
  --alternate: #e4d1bc;
  --accent-section: #45342d;
  --on-dark: #fff3e7;
  --header-bg: var(--accent-section);
  --header-ink: var(--on-dark);
  --logo-filter: brightness(0) invert(1);
  --history-bg: var(--alternate);
  --land-bg: var(--paper);
  --herd-bg: var(--light);
  --production-bg: var(--alternate);
  --products-bg: var(--accent-section);
  --products-ink: var(--on-dark);
  --contacts-bg: var(--paper);
  --light: color-mix(in srgb, var(--paper) 64%, white);
  --rule: color-mix(in srgb, currentColor 24%, transparent);
  --muted: color-mix(in srgb, currentColor 82%, transparent);
  --hero-shade: color-mix(in srgb, var(--ink) 65%, black);
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --gap: clamp(1.3rem, 4vw, 4.5rem);
  --section-pad: clamp(2.5rem, 4.2vw, 4.25rem);
  --serif: Piazzolla, Georgia, serif;
  --sans: Manrope, "Segoe UI", sans-serif;
}

:root[data-theme="quiet"] {
  --paper: #f3eee5;
  --ink: #292824;
  --stone: #817c70;
  --sand: #b5a18a;
  --alternate: #ded3c4;
  --accent-section: #382d27;
  --on-dark: #f7f2e9;
  --header-bg: #d6c8b7;
  --header-ink: var(--ink);
  --logo-filter: none;
  --history-bg: var(--accent-section);
  --history-ink: var(--on-dark);
  --herd-bg: var(--alternate);
  --production-bg: var(--light);
  --products-bg: #45372f;
  --products-ink: var(--on-dark);
  --contacts-bg: #e5d9ca;
}

:root[data-theme="perfume"] {
  --paper: #f3f0e9;
  --ink: #191a19;
  --stone: #68645d;
  --sand: #a38b72;
  --alternate: #e4ddd2;
  --accent-section: #191a19;
  --on-dark: #f7f2eb;
  --history-bg: var(--alternate);
  --herd-bg: #2b2a28;
  --herd-ink: var(--on-dark);
  --production-bg: var(--light);
  --products-bg: var(--alternate);
  --products-ink: var(--ink);
  --contacts-bg: var(--accent-section);
  --contacts-ink: var(--on-dark);
}

:root[data-theme="nature"] {
  --paper: #ede9de;
  --ink: #30382f;
  --stone: #777d6b;
  --sand: #a89a79;
  --alternate: #d8ddcd;
  --accent-section: #30382f;
  --on-dark: #f8f5eb;
  --history-bg: var(--alternate);
  --herd-bg: var(--accent-section);
  --herd-ink: var(--on-dark);
  --production-bg: var(--paper);
  --products-bg: var(--alternate);
  --products-ink: var(--ink);
  --contacts-bg: var(--accent-section);
  --contacts-ink: var(--on-dark);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.68 var(--sans); }
img, video { display: block; width: 100%; height: auto; }
figure, h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; word-spacing: .065em; }
h2 { font-size: clamp(2.15rem, 4.15vw, 4.15rem); line-height: 1.05; letter-spacing: -.045em; }
h3 { font-size: clamp(1.27rem, 2.15vw, 2.05rem); line-height: 1.12; letter-spacing: -.025em; }
a { color: inherit; text-underline-offset: .28em; }
button { font: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: .8rem; }
.wrap { width: min(100% - var(--gutter) * 2, 77rem); margin-inline: auto; }
.skip { position: fixed; z-index: 4; top: .6rem; left: .6rem; padding: .6rem 1rem; background: var(--light); transform: translateY(-160%); }
.skip:focus { transform: none; }
figcaption, .label { font-size: .875rem; color: var(--muted); }
figcaption { margin-top: .45rem; }
.wordmark { font-family: var(--serif); letter-spacing: .06em; }

.masthead {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.15rem;
  padding: .65rem var(--gutter);
  background: var(--header-bg);
  color: var(--header-ink);
  border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: clamp(.5rem, 1vw, .95rem); color: inherit; text-decoration: none; }
.brand img { width: clamp(4.3rem, 8.6vw, 7.4rem); flex: none; filter: var(--logo-filter); }
.brand-lockup { display: grid; gap: .18rem; }
.brand .wordmark { font-size: clamp(1.3rem, 2.6vw, 2.45rem); line-height: .97; }
.brand-caption { display: flex; align-items: center; justify-content: center; gap: .35rem; font-size: clamp(.52rem, .83vw, .72rem); line-height: 1.25; letter-spacing: .24em; }
.brand-caption::before, .brand-caption::after { content: ""; flex: 1; height: 1px; background: var(--sand); }
.masthead nav { display: flex; align-items: center; gap: clamp(1.05rem, 3vw, 3.4rem); }
.masthead nav a { padding-block: .4rem; font-size: .92rem; text-decoration-color: transparent; transition: text-decoration-color .2s; }
.masthead nav a:hover { text-decoration-color: currentColor; }
.menu { display: none; color: inherit; background: transparent; border: 1px solid var(--rule); padding: .4rem .85rem; cursor: pointer; }
.theme-picker { position: fixed; z-index: 3; right: max(.85rem, env(safe-area-inset-right)); bottom: max(.85rem, env(safe-area-inset-bottom)); }
.theme-picker summary {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-inline-start: auto;
  width: fit-content;
  min-height: 44px;
  padding: .4rem .85rem;
  border: 1px solid var(--sand);
  border-radius: 2rem;
  background: var(--header-bg);
  color: var(--header-ink);
  font-size: .88rem;
  cursor: pointer;
  list-style: none;
}
.theme-picker summary::-webkit-details-marker { display: none; }
.theme-options {
  position: absolute;
  right: 0;
  bottom: calc(100% + .45rem);
  display: grid;
  width: min(17rem, calc(100vw - 1.7rem));
  max-height: 65vh;
  overflow: auto;
  padding: .35rem;
  border: 1px solid var(--sand);
  border-radius: .55rem;
  background: var(--light);
  color: var(--ink);
}
.theme-options button { display: flex; align-items: center; gap: .65rem; min-height: 44px; border: 0; border-radius: .25rem; padding: .35rem .5rem; background: transparent; color: inherit; text-align: left; font-size: .92rem; cursor: pointer; }
.theme-options button:hover, .theme-options button[aria-pressed="true"] { background: var(--alternate); }
.theme-options button[aria-pressed="true"] { font-weight: 700; }
.theme-options button:focus-visible { outline-offset: -2px; }
.theme-swatch { display: inline-block; flex: 0 0 2rem; height: 1.35rem; border: 1px solid var(--rule); border-radius: .22rem; background: linear-gradient(180deg, var(--swatch-dark) 33%, var(--swatch-light) 33% 67%, var(--swatch-accent) 67%); }
[data-palette="quiet"] { --swatch-dark: #382d27; --swatch-light: #f3eee5; --swatch-accent: #b5a18a; }
[data-palette="perfume"] { --swatch-dark: #191a19; --swatch-light: #f3f0e9; --swatch-accent: #a38b72; }
[data-palette="nature"] { --swatch-dark: #30382f; --swatch-light: #ede9de; --swatch-accent: #a89a79; }
[data-palette="warm"] { --swatch-dark: #45342d; --swatch-light: #f0e5d8; --swatch-accent: #b87355; }

:root[data-theme="quiet"] :is(.menu, .theme-picker summary, .theme-options) { border-color: #766451; }
:root[data-theme="perfume"] .menu { border-color: var(--sand); }

.hero { display: grid; isolation: isolate; margin-block: clamp(1.2rem, 3vw, 2.5rem) var(--section-pad); }
.hero-scene { grid-area: 1 / 1; display: grid; grid-template-rows: 1fr auto; min-width: 0; }
.hero-frame { position: relative; display: block; min-height: clamp(24.5rem, 36vw, 33rem); background: var(--ink); overflow: hidden; }
.hero-frame img { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: center 53%; }
.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--hero-shade) 91%, transparent), color-mix(in srgb, var(--hero-shade) 74%, transparent) 35%, transparent 75%);
}
.hero-content {
  grid-area: 1 / 1;
  z-index: 1;
  align-self: center;
  width: min(46%, 27rem);
  container-type: inline-size;
  margin: 1.4rem 0 3.1rem clamp(1.4rem, 4vw, 3.6rem);
  color: var(--light);
}
.hero-place { font-size: .9rem; margin-bottom: .65rem; }
.hero h1 { font-size: min(clamp(3.25rem, 6.5vw, 6.3rem), 23cqi); line-height: .95; letter-spacing: .035em; }
.hero-slogan { margin: .5rem 0 .7rem; font: italic 400 clamp(1.35rem, 2.5vw, 2.4rem)/1.15 var(--serif); text-wrap: balance; }
.hero-content > p:not(.hero-place, .hero-slogan) { max-width: 39ch; text-wrap: pretty; }
.text-link { display: inline-block; margin-top: .85rem; text-decoration: none; border-bottom: 1px solid var(--sand); }
.text-link:hover { border-color: currentColor; }
.hero-scene figcaption { display: flex; gap: .3rem 1rem; justify-content: space-between; flex-wrap: wrap; }

.story { padding-block: var(--section-pad); border-top: 1px solid var(--rule); }
#history { background: var(--history-bg); color: var(--history-ink, var(--ink)); }
#land { background: var(--land-bg); }
#herd { background: var(--herd-bg); color: var(--herd-ink, var(--ink)); }
#production { background: var(--production-bg); color: var(--production-ink, var(--ink)); }
#products { background: var(--products-bg); color: var(--products-ink); }
#contacts { background: var(--contacts-bg); color: var(--contacts-ink, var(--ink)); }
.story-copy { max-width: 57ch; }
.story-copy h2 { margin-bottom: clamp(1rem, 1.55vw, 1.4rem); }
.story h2, .story-copy h3, .editorial-stories h3, .footer-main h2 { text-wrap: balance; }
.story-copy p:not(.editorial-label), .article-copy p, .footer-main address p { text-wrap: pretty; }
#history-title { margin-bottom: clamp(1.1rem, 2vw, 1.65rem); }
.story-copy p + p { margin-top: .8rem; }
.editorial-label { margin-bottom: .65rem; font-size: .82rem; letter-spacing: .12em; font-weight: 600; }
.article-copy { max-width: 64ch; }
.article-copy p + p { margin-top: .8rem; }
.article-copy h3 { margin-bottom: .6rem; }
.article-copy p + h3 { margin-top: 1.3rem; }
.editorial-stories, .food-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem var(--gap);
}
.editorial-stories, .editorial-timeline, .editorial-facts, .food-notes {
  margin-top: clamp(1.8rem, 3.5vw, 3.2rem);
  padding-top: clamp(1.15rem, 2.3vw, 2rem);
  border-top: 1px solid var(--rule);
}
.editorial-timeline ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem 1.2rem; list-style: none; padding: 0; margin: .8rem 0 0; }
.editorial-timeline li { padding-block: .55rem; border-top: 1px solid var(--sand); }
.editorial-timeline time { display: block; font: 400 1.5rem/1.1 var(--serif); margin-bottom: .3rem; }
.editorial-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem var(--gap); padding-inline-start: 0; list-style: none; }
.editorial-facts strong { display: block; font: 400 clamp(1.28rem, 2vw, 1.85rem)/1.15 var(--serif); margin-bottom: .3rem; }
.herd-layout .story-copy h3 { margin: 1.25rem 0 .5rem; }
.story-layout, .land-layout, .production-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: var(--gap);
  align-items: center;
}
.story-photo img, .production-photo img { width: 100%; }
.land-layout { grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr); }
.land-layout .story-copy {
  inline-size: fit-content;
  max-inline-size: 100%;
}
.land-layout .story-copy > p {
  inline-size: 0;
  min-inline-size: 100%;
}
@media (min-width: 761px) {
  #land-title { font-size: clamp(1.7rem, 3.55vw, 3.2rem); }
}
@media (max-width: 350px) {
  #land-title { font-size: min(2.15rem, 9.65vw); }
}
.land-photo img { aspect-ratio: 2.1; object-fit: cover; object-position: center 60%; }

.herd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 1.35rem var(--gap);
  align-items: start;
}
.herd-wide { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.herd-wide img { aspect-ratio: 1.48; object-fit: cover; object-position: 65% 54%; }
.herd-film { width: min(100%, 24rem); }
.herd-film video { aspect-ratio: 16/9; object-fit: cover; background: var(--ink); }
.production-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.production-layout .story-copy {
  inline-size: fit-content;
  max-inline-size: 100%;
}
/* Let the heading determine the column width before the description wraps. */
.production-layout .story-copy > p {
  inline-size: 0;
  min-inline-size: 100%;
}
@media (max-width: 350px) {
  #production-title { font-size: min(2.15rem, 9.65vw); }
}
.production-photo img { aspect-ratio: 1.65; object-fit: cover; object-position: center 75%; }
@media (min-width: 761px) {
  .editorial-stories { row-gap: .6rem; }
  .editorial-stories > .article-copy {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 2;
  }
  .editorial-stories h3 { margin-bottom: 0; }
}

.product-header { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; gap: .65rem var(--gap); margin-bottom: 1.35rem; }
.product-header > p { max-width: 54ch; }
.food-stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); }
.food-story {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: .75rem;
}
.food-story figure { min-width: 0; }
.food-story figure img { aspect-ratio: 16 / 9; object-fit: contain; }
.food-story .article-copy { max-width: 50ch; }
.food-story h3 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.food-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(1.25rem, 2.5vw, 2rem); padding-top: 1rem; }

@media (max-width: 960px) {
  .editorial-timeline ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

footer { padding-top: clamp(2.2rem, 4vw, 3.75rem); border-top: 1px solid var(--rule); }
.footer-main { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2.5rem; padding-bottom: 1.6rem; }
.footer-main > div { min-width: 0; }
.footer-main > div:first-child { max-width: 42rem; }
.footer-main .article-copy { max-width: 52ch; }
.footer-main .wordmark { font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: 1.03; }
.footer-main .label { margin-bottom: .35rem; }
.footer-main h2 { margin-bottom: .85rem; }
.footer-main address { min-width: min(28ch, 100%); }
address { font-style: normal; }
.map { display: inline-block; margin-top: .3rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1.2rem; padding-block: .8rem; border-top: 1px solid var(--sand); font-size: .875rem; color: var(--muted); }

@media (min-width: 761px) and (max-width: 960px) {
  .hero-content { width: 51%; }
  .hero-frame::after { background: linear-gradient(90deg, color-mix(in srgb, var(--hero-shade) 91%, transparent), color-mix(in srgb, var(--hero-shade) 80%, transparent) 47%, transparent 90%); }
}

@media (max-width: 760px) {
  .masthead { flex-wrap: wrap; }
  .menu:not([hidden]) { display: block; }
  .masthead nav { width: 100%; flex-wrap: wrap; gap: .3rem 1rem; }
  .menu:not([hidden]) + nav { display: none; position: absolute; top: 100%; inset-inline: 0; background: var(--header-bg); padding: .45rem var(--gutter) .8rem; border-bottom: 1px solid var(--rule); }
  .menu[aria-expanded="true"] + nav { display: grid; gap: 0; }
  .masthead nav a { padding-block: .62rem; }
  .hero { gap: 1.2rem; }
  .hero-content, .hero-scene { grid-area: auto; }
  .hero-content { width: auto; margin: 0; color: var(--ink); }
  .hero h1 { font-size: min(clamp(2.95rem, 14vw, 5rem), 23cqi); }
  #products-title br { display: none; }
  .hero-frame { min-height: 0; aspect-ratio: 1.48; }
  .hero-frame::after { display: none; }
  .story-layout, .land-layout, .herd-layout, .production-layout, .product-header { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .land-photo { order: 1; }
  .land-photo img { aspect-ratio: 1.65; }
  .herd-wide { grid-area: auto; }
  .footer-main { flex-direction: column; align-items: start; }
  .editorial-stories, .editorial-facts, .food-notes { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .food-stories { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .editorial-timeline ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .editorial-timeline ol { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-frame img { animation: field-drift 13s ease-in-out; }
  .hero-content h1, .hero-slogan, .hero-content > p:not(.hero-place, .hero-slogan) {
    animation: hero-arrival .66s ease-out var(--arrival-delay, 0ms) both;
  }
  .hero-slogan { --arrival-delay: 105ms; }
  .hero-content > p:not(.hero-place, .hero-slogan) { --arrival-delay: 210ms; }
  .revealed:not(figure, .editorial-timeline li) { animation: editorial-reveal .46s ease-out; }
  .story figure.revealed img { animation: photo-reveal .66s cubic-bezier(.2,.65,.3,1) backwards; }
  .story figure.revealed figcaption { animation: editorial-reveal .44s ease-out 80ms backwards; }
  .editorial-timeline li { position: relative; }
  .editorial-timeline li.revealed::before {
    content: "";
    position: absolute;
    inset: -1px 0 auto;
    height: 1px;
    background: currentColor;
    transform-origin: left;
    animation: timeline-progress .44s ease-out var(--date-delay, 0ms) both;
  }
  .editorial-timeline .revealed time { animation: date-highlight .6s ease-out var(--date-delay, 0ms) both; }
  .theme-picker[open] .theme-options,
  .menu[aria-expanded="true"] + nav { animation: menu-arrival .18s ease-out; }
  .theme-picker summary { transition: background-color .2s ease, border-color .2s ease; }
  .theme-options button { transition: background-color .2s ease; }
  .theme-picker[open] summary, .theme-picker summary:focus-visible {
    background-color: color-mix(in srgb, var(--header-bg) 88%, var(--sand));
  }
  @keyframes field-drift { 0%, 100% { transform: scale(1); } 56% { transform: scale(1.04); } }
  @keyframes hero-arrival { from { opacity: .4; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
  @keyframes editorial-reveal { from { opacity: .6; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
  @keyframes photo-reveal {
    from { opacity: .45; clip-path: inset(0 0 26%); transform: scale(.985); translate: 0 12px; }
    to { opacity: 1; clip-path: inset(0); transform: scale(1); translate: 0 0; }
  }
  @keyframes timeline-progress { from { opacity: .35; scale: 0 1; } to { opacity: .72; scale: 1 1; } }
  @keyframes date-highlight {
    0% { opacity: .62; translate: 0 8px; }
    48% { opacity: 1; text-shadow: 0 0 11px var(--sand); }
    100% { opacity: 1; translate: 0 0; text-shadow: none; }
  }
  @keyframes menu-arrival { from { opacity: .67; translate: 0 5px; } to { opacity: 1; translate: 0 0; } }
}

@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  .editorial-timeline li:nth-child(2) { --date-delay: 55ms; }
  .editorial-timeline li:nth-child(3) { --date-delay: 110ms; }
  .editorial-timeline li:nth-child(4) { --date-delay: 165ms; }
  .editorial-timeline li:nth-child(5) { --date-delay: 220ms; }
}

@media (min-width: 961px) and (prefers-reduced-motion: no-preference) {
  .editorial-timeline li.revealed:not(:last-child)::before { right: -1.2rem; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-frame img, .story figure img { clip-path: inset(0); transition: scale .45s ease, clip-path .45s ease; }
  .hero-frame:hover img, .story figure:hover img {
    scale: 1.025;
    /* Inset offsets the scale so the photo stays inside its original frame. */
    clip-path: inset(1.22%);
  }
  .food-story { transition: translate .32s ease; }
  .food-story:hover { translate: 0 -4px; }
  .theme-picker summary:hover { border-color: var(--header-ink); }
  :is(.masthead nav, main, footer) a { transition: color .22s ease, text-decoration-color .22s ease, border-color .22s ease; }
  :is(.masthead nav, main, footer) a:hover {
    color: color-mix(in srgb, currentColor 85%, var(--sand));
    text-decoration-color: var(--sand);
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
