/* footer-look.css: the closing stage of every page (2026-11-15).
   The footer the app renders (footer.site#ftr: three link groups, the olive sprig mark, the copyright line) is restyled and
   restaged with CSS only. No element is added, moved in the DOM or removed, every text, link and target stays as rendered.

   How it is built, from the top:
   1 THE PASSAGE  the footer begins in the colour the last stage of the tab ends on (--fl-from, one value per tab below)
                  and that colour falls away into the footer ground, so there is no colour jump on any tab.
   2 THE MARK     where the passage ends: one gold hairline over the full width, the decided line between page and footer.
                  The gold olive sprig stands after "Olio" in the closing word (owner round 2026-11-16a).
   3 THE LISTS    the three link groups, set large in the serif of the house, small capital labels in gold.
   4 THE WORD     the page opens with the wordmark "Montalbano Olio" in the header and closes with it here: the home link
                  of the footer (a.foot-signature, aria-label "Montalbano Olio") shows its own name across the whole width.
                  It is sized from the width of the footer, so it is never cut. "Olio" takes the colour of the tab
                  (--header-accent, wordmark-colours.css), as in the header; the same colour marks the current page.
   5 THE GROUND   the alley of the grove (archive photograph p01, toned dark olive) lies quietly under lists and word,
                  with one pool of green light and the grain of the house grounds.
   6 THE COLOPHON the copyright line and the harvest line on a last hairline.

   Every rule is scoped to #ftr; /assets/js/footer-look.js only adds the entrance (classes fl-wait and fl-in) and
   trims the size of the closing word to the pixel (--fl-fit). */

html body footer.site#ftr{
  --fl-accent:var(--header-accent,#ECE6D6);
  --fl-gold:#D7B358;
  --fl-gold-soft:#E7CB78;
  --fl-cream:#F4EFE2;
  --fl-cream-2:rgba(244,239,226,.78);
  --fl-ground:#131A12;
  --fl-m:clamp(20px,3.4vw,68px);
  --fl-serif:"Fraunces",Georgia,serif;
  --fl-mono:"IBM Plex Mono",ui-monospace,monospace;
  --fl-ease:cubic-bezier(.2,.7,.2,1);
  /* the passage: what the stage above ends on, and how long it takes to fall away (short under dark stages) */
  --fl-from:var(--footer-from,#151C14);
  --fl-fade:clamp(56px,5.2vw,104px);
  /* the mark */
  --fl-sprig:clamp(110px,8.6vw,176px);
  /* the closing word: "Montalbano Olio" measures 5.62em in the house serif; the script trims it to the pixel */
  --fl-ws:13vw;
  /* owner round 2026-11-15g: the closing word at three quarters of the full width (the script fits it, then scales) */
  --fl-scale:.75;
  position:relative;isolation:isolate;overflow:hidden;container-type:inline-size;
  margin:0;border:0;
  padding:var(--fl-fade) var(--fl-m) clamp(14px,1.3vw,24px);
  color:var(--fl-cream);
  background:
    linear-gradient(180deg,var(--fl-ground) 0,rgba(19,26,18,.9) 14%,rgba(17,24,15,.56) 46%,rgba(14,20,12,.5) 70%,rgba(11,16,10,.9) 100%),
    radial-gradient(70% 62% at 50% 104%,rgba(112,152,60,.30),rgba(112,152,60,0) 72%),
    url("/assets/img/footer-look/grove-1600.webp") 50% 62%/cover no-repeat,
    #10160E}
@supports (width:1cqw){
  html body footer.site#ftr{--fl-ws:calc(100cqw / 5.62)}
}
/* 1 the passage: the colour of the stage above, falling away (eased, so no band shows) */
html body footer.site#ftr::before{
  content:"";position:absolute;z-index:-2;left:0;right:0;top:0;height:calc(var(--fl-fade) + var(--fl-sprig) * .5);pointer-events:none;
  background:var(--fl-from);
  -webkit-mask-image:linear-gradient(180deg,#000 0,rgba(0,0,0,.94) 12%,rgba(0,0,0,.78) 28%,rgba(0,0,0,.52) 46%,rgba(0,0,0,.26) 64%,rgba(0,0,0,.09) 82%,rgba(0,0,0,0) 100%);
  mask-image:linear-gradient(180deg,#000 0,rgba(0,0,0,.94) 12%,rgba(0,0,0,.78) 28%,rgba(0,0,0,.52) 46%,rgba(0,0,0,.26) 64%,rgba(0,0,0,.09) 82%,rgba(0,0,0,0) 100%)}
/* the grain of the house grounds, half strength at the first row and growing along the passage */
html body footer.site#ftr::after{
  content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;opacity:.5;
  background:url("/assets/img/footer-look/grain.png") 0 0/128px 128px;mix-blend-mode:overlay;
  -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,var(--fl-grain0,.5)) 0,#000 calc(var(--fl-fade) + var(--fl-sprig) * .5));
  mask-image:linear-gradient(180deg,rgba(0,0,0,var(--fl-grain0,.5)) 0,#000 calc(var(--fl-fade) + var(--fl-sprig) * .5))}

/* what each tab ends on (measured on the page, desktop and phone). Any look may set --footer-from on body instead. */
html body[data-view="geschichte"] footer.site#ftr{--fl-from:var(--footer-from,#ECE6D6)}
/* Cultivars ends on its dark ground from 701 px and on cream paper below (cultivars-look) */
html body[data-view="sorten"] footer.site#ftr{--fl-from:var(--footer-from,#161D13)}
@media (max-width:700px){html body[data-view="sorten"] footer.site#ftr{--fl-from:var(--footer-from,#EDE7D6);--fl-fade:clamp(72px,8.6vw,168px)}}
html body[data-view="pairing"] footer.site#ftr{--fl-from:var(--footer-from,#F1E7D3)}
html body[data-view="kontakt"] footer.site#ftr{--fl-from:var(--footer-from,#D3C9AE)}
html body[data-view="produkt"] footer.site#ftr{--fl-from:var(--footer-from,#E8E2D3);--fl-fade:clamp(84px,8.6vw,168px)}
html body[data-view="terroir"] footer.site#ftr{--fl-from:var(--footer-from,#121911)}
html body[data-view="benefits"] footer.site#ftr,
html body[data-view="produktion"] footer.site#ftr{--fl-from:var(--footer-from,#171E16)}
html body[data-view="awards"] footer.site#ftr{--fl-from:var(--footer-from,#0F1C16);--fl-grain0:1}
html body[data-view="gallery"] footer.site#ftr{--fl-from:var(--footer-from,#1F130E)}
/* the shop ends on a pool of green light in the middle of a dark ground: the passage carries the same pool */
html body[data-view="shop"] footer.site#ftr{--fl-from:var(--footer-from,linear-gradient(90deg,#10150F 0,#1A2314 20%,#273619 50%,#1A2314 80%,#10150F 100%))}
/* where a tab ends on a photograph that runs to the very edge, the footer lays its ground softly over the last rows of
   the photograph (a shadow cast upward, nothing is moved), so the picture falls into the footer instead of being cut */
html body[data-view="gallery"] footer.site#ftr{box-shadow:0 -46px 78px 4px #1F130E}
/* the same for the coarse grain of the recognition ground, which would otherwise stop on a line */
html body[data-view="awards"] footer.site#ftr{box-shadow:0 -34px 56px 0 #0F1C16}
@media (max-width:699px){
  html body[data-view="gallery"] footer.site#ftr{box-shadow:0 -30px 50px 2px #1F130E}
  html body[data-view="terroir"] footer.site#ftr{z-index:1;box-shadow:0 -30px 50px 2px #121911}
}
/* /track ends on cream paper once its own look (track-look) is installed, on the dark ground without it */
html:has(link[href*="track-look"]) body[data-view="track"] footer.site#ftr{--fl-from:var(--footer-from,#F0EBDD);--fl-fade:clamp(84px,8.6vw,168px)}
/* under a light stage the passage takes more room */
html body[data-view="geschichte"] footer.site#ftr,
html body[data-view="pairing"] footer.site#ftr,
html body[data-view="kontakt"] footer.site#ftr{--fl-fade:clamp(84px,8.6vw,168px)}

/* ---- the frame: the app's two column grid becomes a plain stack (mark, lists, closing word) ---- */
html body footer.site#ftr .foot-layout{
  position:relative;z-index:1;display:block;max-width:none;margin:0;gap:0;column-gap:0;
  padding:clamp(40px,3.8vw,76px) 0 0}
/* 2 the mark: one clean gold hairline over the full width (owner round 2026-11-16a: the sprig moved to the closing word) */
html body footer.site#ftr .foot-layout::before{
  content:"";position:absolute;left:0;right:0;top:0;height:1px;pointer-events:none;
  background:linear-gradient(90deg,rgba(215,179,88,0) 0,rgba(215,179,88,.85) 11%,var(--fl-gold) 50%,rgba(215,179,88,.85) 89%,rgba(215,179,88,0) 100%)}
/* owner round 2026-11-16a: the gold sprig sits after "Olio", on the baseline of the closing word, sized from it */
html body footer.site#ftr .foot-signature svg{
  position:static;order:1;flex:none;display:block;width:.84em;height:auto;aspect-ratio:60/42;margin:0 0 0 .3em;
  transform:none;transform-origin:12% 92%;color:var(--fl-gold);
  filter:drop-shadow(0 4px 14px rgba(0,0,0,.35));
  transition:transform .6s var(--fl-ease),color .3s var(--fl-ease)}
html body footer.site#ftr .foot-signature:hover svg{transform:rotate(-6deg);color:var(--fl-gold-soft)}

/* ---- 3 the three lists ---- */
html body footer.site#ftr .foot-links{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(24px,3vw,64px);
  margin:0;padding:0;border:0;min-height:0}
html body footer.site#ftr .foot-group{min-width:0;margin:0;padding:0}
/* the label: the small capital voice of the house with its short gold hairline */
html body footer.site#ftr .foot-group h2{
  display:flex;align-items:center;gap:.9em;margin:0 0 clamp(8px,.8vw,16px);
  font-family:var(--fl-mono);font-size:clamp(11.5px,.68vw,13px);font-weight:400;line-height:1.7;letter-spacing:.2em;text-transform:uppercase;
  color:var(--fl-gold-soft);overflow-wrap:anywhere}
html body footer.site#ftr .foot-group h2::before{
  content:"";flex:none;width:clamp(18px,1.6vw,30px);height:1px;background:var(--fl-gold);opacity:.85}
html body footer.site#ftr .foot-group nav{
  display:flex;flex-direction:column;align-items:flex-start;gap:0;margin:0;
  font-family:var(--fl-serif);font-size:clamp(24px,2.05vw,41px);letter-spacing:-.018em;text-transform:none}
html body footer.site#ftr .foot-group a{
  position:relative;display:flex;align-items:center;gap:.42em;width:fit-content;max-width:100%;min-height:44px;
  padding:.1em 0;margin:0;
  font-family:var(--fl-serif);font-size:1em;font-weight:340;font-variation-settings:"opsz" 72;line-height:1.12;letter-spacing:-.018em;
  color:var(--fl-cream);text-transform:none;text-decoration:none;overflow-wrap:anywhere;
  text-shadow:0 1px 14px rgba(8,12,7,.55);
  background:linear-gradient(var(--fl-gold),var(--fl-gold)) 0 calc(50% + .66em)/0 1px no-repeat;
  transition:color .25s var(--fl-ease),background-size .45s var(--fl-ease)}
html body footer.site#ftr .foot-group a:hover{
  color:var(--fl-gold-soft);text-decoration:none;background-size:100% 1px}
/* the page one is on: the tab colour, once, as a dot in front of the word */
html body footer.site#ftr .foot-group a[aria-current="page"],
html body footer.site#ftr .foot-group a[aria-current="page"]:hover{
  color:var(--fl-cream);text-decoration:none;background-size:0 1px}
html body footer.site#ftr .foot-group a[aria-current="page"]::before{
  content:"";flex:none;width:.24em;height:.24em;min-width:7px;min-height:7px;border-radius:50%;background:var(--fl-accent)}
html body footer.site#ftr .foot-external{
  width:.42em;height:.42em;flex:none;margin-top:.12em;fill:none;stroke:var(--fl-gold);stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round;
  transition:transform .35s var(--fl-ease)}
html body footer.site#ftr .foot-group a:hover .foot-external{transform:translate(.14em,-.14em)}
html body footer.site#ftr .foot-group a:focus-visible,
html body footer.site#ftr .foot-signature:focus-visible{outline:2px solid var(--fl-gold-soft);outline-offset:5px;border-radius:2px}

/* ---- 4 the closing word: the home link shows its own name across the whole width ---- */
html body footer.site#ftr .foot-signature{
  display:flex;align-items:baseline;justify-content:flex-start;justify-self:start;align-self:auto;width:fit-content;max-width:none;
  margin:clamp(22px,2.4vw,50px) 0 0;padding:0 0 .05em;transform:none;
  font-family:var(--fl-serif);font-size:calc(var(--fl-ws) * var(--fl-fit,.74));font-weight:300;font-variation-settings:"opsz" 144;line-height:.86;letter-spacing:-.035em;
  white-space:nowrap;direction:ltr;text-decoration:none;color:var(--fl-cream);
  text-shadow:0 2px 40px rgba(8,12,7,.5);
  transition:color .3s var(--fl-ease)}
html body footer.site#ftr .foot-signature::before{
  content:"Montalbano";content:"Montalbano" / "";margin-left:-.012em}
html body footer.site#ftr .foot-signature::after{
  content:"Olio";content:"Olio" / "";margin-left:.2em;font-style:italic;letter-spacing:-.02em;color:var(--fl-accent);
  transition:color .3s var(--fl-ease)}
html body footer.site#ftr .foot-signature:hover{color:var(--fl-gold-soft)}

/* ---- 6 the colophon line ---- */
html body footer.site#ftr .foot-bottom{
  position:relative;z-index:1;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:6px 32px;
  max-width:none;margin:clamp(16px,1.7vw,34px) 0 0;padding:clamp(12px,1.1vw,18px) 0 0;
  border:0;border-top:1px solid rgba(215,179,88,.38);text-align:start;
  font-family:var(--fl-mono);font-size:clamp(11px,.62vw,12px);line-height:1.7;letter-spacing:.14em;text-transform:uppercase;color:var(--fl-cream-2)}
html body footer.site#ftr .foot-bottom span,
html body footer.site#ftr .foot-bottom .mono{font:inherit;letter-spacing:inherit;color:inherit}
html body footer.site#ftr .foot-bottom .mono{color:var(--fl-gold-soft)}
/* owner round 2026-11-15g: the harvest line is not shown, the copyright line stays */
html body footer.site#ftr .foot-bottom .mono{display:none}

/* ---- tablet ---- */
@media (max-width:1023px){
  html body footer.site#ftr .foot-group nav{font-size:clamp(22px,2.9vw,28px)}
}
/* ---- phone: compact, two lists side by side, the third as one row under them ---- */
@media (max-width:699px){
  html body footer.site#ftr{
    --fl-fade:44px;--fl-sprig:92px;padding-bottom:14px;
    background:
      linear-gradient(180deg,var(--fl-ground) 0,rgba(19,26,18,.9) 14%,rgba(17,24,15,.6) 46%,rgba(14,20,12,.5) 70%,rgba(11,16,10,.9) 100%),
      radial-gradient(90% 50% at 50% 104%,rgba(112,152,60,.30),rgba(112,152,60,0) 72%),
      url("/assets/img/footer-look/grove-900.webp") 42% 70%/cover no-repeat,
      #10160E}
  html body[data-view="geschichte"] footer.site#ftr,
  html body[data-view="sorten"] footer.site#ftr,
  html body[data-view="pairing"] footer.site#ftr,
  html body[data-view="kontakt"] footer.site#ftr,
  html body[data-view="produkt"] footer.site#ftr,
  html:has(link[href*="track-look"]) body[data-view="track"] footer.site#ftr{--fl-fade:72px}
  html body footer.site#ftr .foot-layout{padding-top:30px}
  html body footer.site#ftr .foot-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 16px}
  html body footer.site#ftr .foot-group:nth-child(3){grid-column:1 / -1}
  html body footer.site#ftr .foot-group:nth-child(3) nav{flex-direction:row;flex-wrap:wrap;gap:0 28px}
  html body footer.site#ftr .foot-group h2{font-size:10.5px;letter-spacing:.18em;margin-bottom:2px}
  html body footer.site#ftr .foot-group nav{font-size:21px}
  html body footer.site#ftr .foot-signature{margin-top:20px}
  html body footer.site#ftr .foot-bottom{flex-direction:column;gap:2px;margin-top:14px;padding-top:11px;font-size:10px;letter-spacing:.12em}
}

/* ---- the entrance (set by the script, only when the footer starts below the fold and motion is welcome) ---- */
@media (prefers-reduced-motion:no-preference){
  html body footer.site#ftr.fl-wait .foot-signature::before,
  html body footer.site#ftr.fl-wait .foot-signature::after{opacity:0;transform:translateY(.16em)}
  html body footer.site#ftr.fl-wait .foot-signature svg{opacity:0;transform:rotate(14deg) scale(.8)}
  html body footer.site#ftr.fl-wait .foot-layout::before{opacity:0;transform:scaleX(.6)}
  html body footer.site#ftr.fl-wait .foot-group{opacity:0;transform:translateY(14px)}
  html body footer.site#ftr.fl-wait .foot-bottom{opacity:0}
  html body footer.site#ftr.fl-in .foot-signature::before,
  html body footer.site#ftr.fl-in .foot-signature::after{display:inline-block;transition:opacity .9s var(--fl-ease) .22s,transform 1.1s var(--fl-ease) .22s,color .3s var(--fl-ease)}
  html body footer.site#ftr.fl-in .foot-signature::after{transition-delay:.36s,.36s,0s}
  html body footer.site#ftr.fl-in .foot-signature svg{transition:opacity .7s var(--fl-ease),transform 1s var(--fl-ease),color .3s var(--fl-ease)}
  html body footer.site#ftr.fl-in .foot-layout::before{transition:opacity .8s var(--fl-ease) .1s,transform 1.2s var(--fl-ease) .1s}
  html body footer.site#ftr.fl-in .foot-group{transition:opacity .7s var(--fl-ease) .12s,transform .9s var(--fl-ease) .12s}
  html body footer.site#ftr.fl-in .foot-group:nth-child(2){transition-delay:.2s}
  html body footer.site#ftr.fl-in .foot-group:nth-child(3){transition-delay:.28s}
  html body footer.site#ftr.fl-in .foot-bottom{transition:opacity .9s var(--fl-ease) .6s}
}
/* Debug fix 2026-11-16 (global, every route). Arabic reads from the right: where the header row shows the menu
   (1400 px and wider) the row is mirrored, the menu starts at the right edge and the tools sit at the left */
@media (min-width:1400px){
  html[dir="rtl"] #hdr.site--edition>.header-row{direction:rtl}
  html[dir="rtl"] header.site--edition nav.primary{direction:rtl;margin-right:0;margin-left:auto}
  html[dir="rtl"] #hdr.site--edition .header-row>.head-right{direction:rtl;margin-left:-11px;margin-right:0}
}
/* Arabic is a joined script: tracked labels pull its letters apart. footer-look.js marks each element whose own words
   are Arabic and carry a positive letter spacing (.lx-ar0); on Arabic pages that spacing is 0 */
html[lang="ar"] .lx-ar0{letter-spacing:0!important}
@media print{
  html body footer.site#ftr{background:#10160E}
  html body footer.site#ftr::before,html body footer.site#ftr::after{display:none}
}

/* Mobile fix 2026-11-16 (global, every route). Owner rules on phones: text at least 12 px, touch targets at least 44 px.
   Phones only (and phones turned sideways), so iPad and desktop keep every size exactly as before. */
@media (max-width:767px),(max-height:500px) and (pointer:coarse){
  /* the footer: list headings 10.5 px and the copyright line 10 px become 12 px, with less tracking (and a shorter gap after the hairline) so they keep their one line */
  html body footer.site#ftr .foot-group h2{font-size:12px;letter-spacing:.1em;gap:.6em}
  html body footer.site#ftr .foot-bottom{font-size:12px;letter-spacing:0}
  /* the closing word was 40 px tall: 6 px more hit area above it, taken from its top margin, so nothing moves */
  html body footer.site#ftr .foot-signature{padding-top:6px;margin-top:calc(clamp(22px,2.4vw,50px) - 6px)}
  /* the short words of the third list (AGB) get at least 44 px of width */
  html body footer.site#ftr .foot-group a{min-width:44px}
  /* the breadcrumb under the hero: 11.8 px becomes 12 px */
  html body .crumbs{font-size:12px}
  /* reviewer: the product page sets its own 11.5 px on the crumbs row (shop-look.css, stronger selector); the words themselves get 12 px */
  html body .crumbs>*{font-size:12px}
  /* eyebrows under 12 px are marked by footer-look.js (.lx-f12) and lifted to 12 px; larger ones are left alone */
  html body .lx-f12{font-size:12px!important}
}
@media (max-width:699px){html body footer.site#ftr .foot-signature{margin-top:14px}}
/* the breadcrumb links on touch screens (phone and iPad): the word stays as it is, an invisible hit area of 44 px around it */
@media (pointer:coarse){
  html body .crumbs a{position:relative}
  html body .crumbs a::after{content:"";position:absolute;inset:-12px -8px}
}

/* WebKit mobile 2026-11-16 (INPUT-ZOOM). iOS zooms the whole page into any field under 16 px and stays zoomed after the
   Harvest List popup closes (the fields were 15.2 px). Touch screens: 16 px. Desktop keeps its 15.2 px. */
@media (pointer:coarse){
  html body #nlpop input,html body .nl-form input{font-size:16px}
  /* the popup puts focus on its close cross when it opens: no gold square for a finger, the ring stays for a keyboard */
  html body #nlpop .nl-close:focus:not(:focus-visible){outline:0}
}
@media (hover:none) and (pointer:coarse){
  html body #nlpop .nl-close:focus{outline:0}
}
