/* OILIVE shared chrome: header, full-screen menu, page curtain, footer, pills.
   One language for every page; the homepage keeps its own stage and wheel.
   Motion: power3.inOut ≈ cubic-bezier(.76,0,.24,1), 0.9 s; reveals ease out. */

/* Phones: no double-tap zoom (it fires on quick taps and jumps the page);
   pinch-zoom and panning stay exactly as the browser gives them. */
html, body, a, button, label, input, select, textarea, summary, [role="button"], [role="tab"] { touch-action: manipulation; }
:root {
  --s-paper: #F3EEE4; --s-paper-2: #EBE4D6; --s-ink: #2C2420; --s-olive: #556B2F; --s-pig: #9A3A2C;
  --s-gold: #C9A23F; --s-soft: rgba(44,36,32,.62); --s-line: rgba(44,36,32,.16);
  /* the İznik hex lattice of the Tulip world, as a faint paper watermark */
  --s-lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='138.6' viewBox='0 0 120 138.6'%3E%3Cg fill='none' stroke='%232C2420' stroke-opacity='.07' stroke-width='1'%3E%3Cpath d='M60 0l60 34.65v69.3L60 138.6 0 103.95v-69.3z'/%3E%3Cpath d='M60 49.3l12.3 7.1v14.2L60 77.7l-12.3-7.1V56.4z' stroke-opacity='.09'/%3E%3Ccircle cx='60' cy='63.5' r='4' stroke-opacity='.08'/%3E%3C/g%3E%3C/svg%3E");
  --s-io: cubic-bezier(.76,0,.24,1); --s-out: cubic-bezier(.165,1,.32,1);
  --s-pad: clamp(16px, 2.4vw, 36px);
}

/* ── header ── */
.s-top {
  position: fixed; inset: 0 0 auto 0; z-index: 7600;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--s-pad) 14px;
  transition: transform .7s var(--s-io), background-color .5s ease, box-shadow .5s ease;
  pointer-events: none;
}
.s-top > * { pointer-events: auto; }
.s-top.is-solid { background: color-mix(in srgb, var(--bg, var(--s-paper)) 84%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1); box-shadow: 0 1px 0 var(--ink-08, var(--s-line)); }
.s-top.is-hidden { transform: translateY(-110%); }
html.s-menu-open .s-top { transform: none; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.s-logo { justify-self: center; display: block; line-height: 0; }
.s-logo img { width: clamp(78px, 7.4vw, 108px); height: auto; }

/* language pills (the shared switcher, restyled) */
.s-langs .lang-switch { gap: 6px !important; }
.s-langs .lang-switch > span[aria-hidden] { display: none; }
.s-langs .lang-switch a, .s-langs .lang-switch span[aria-current] {
  display: inline-flex; align-items: center; justify-content: center; height: 30px; min-width: 38px; padding: 0 10px; border-radius: 15px;
  border: 1px solid var(--ink-08, var(--s-line)) !important; color: var(--ink, var(--s-ink)) !important; font-size: 0 !important;
  transition: background-color .4s ease, color .4s ease, border-color .4s ease;
}
.s-langs .lang-switch a::after, .s-langs .lang-switch span[aria-current]::after {
  content: attr(lang); font: 600 10px/1 'Instrument Sans', sans-serif; letter-spacing: .16em; text-transform: uppercase;
}
.s-langs .lang-switch a:hover { border-color: var(--ink, var(--s-ink)) !important; }
.s-langs .lang-switch span[aria-current] { background: var(--ink, var(--s-ink)); color: var(--bg, var(--s-paper)) !important; border-color: transparent !important; }
html.s-menu-open .s-langs .lang-switch a { color: var(--s-ink) !important; border-color: var(--s-line) !important; }
html.s-menu-open .s-langs .lang-switch span[aria-current] { background: var(--s-ink); color: var(--s-paper) !important; }

/* ── pills (the one button language) ── */
.s-menu-btn, .s-pill {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 38px; padding: 0 18px; border-radius: 19px; border: 1px solid var(--ink-08, var(--s-line));
  background: transparent; color: var(--ink, var(--s-ink)); cursor: pointer;
  font: 600 10px/1 'Instrument Sans', sans-serif; letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  transition: color .5s var(--s-out), border-color .5s var(--s-out);
}
.s-menu-btn::before, .s-pill::before {
  content: ''; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: var(--ink, var(--s-ink));
  transform: translateY(101%); transition: transform .55s var(--s-out);
}
.s-menu-btn:hover, .s-pill:hover { color: var(--bg, var(--s-paper)); border-color: var(--ink, var(--s-ink)); }
.s-menu-btn:hover::before, .s-pill:hover::before { transform: none; }
.s-menu-btn { justify-self: end; }
.s-menu-label { display: grid; height: 1em; overflow: hidden; line-height: 1; }
.s-menu-label > span { grid-area: 1 / 1; transition: transform .6s var(--s-io); }
.s-menu-label > span + span { transform: translateY(120%); }
.s-menu-btn[aria-expanded="true"] { color: var(--s-paper); border-color: var(--s-ink); }
.s-menu-btn[aria-expanded="true"]::before { background: var(--s-ink); transform: none; }
.s-menu-btn[aria-expanded="true"] .s-menu-label > span:first-child { transform: translateY(-120%); }
.s-menu-btn[aria-expanded="true"] .s-menu-label > span + span { transform: none; }

/* ── full-screen menu: an olive panel drops from the top, lines rise from masks ── */
.s-menu {
  position: fixed; inset: 0; z-index: 7500; color: var(--s-ink);
  clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--s-io); visibility: hidden;
}
.s-menu[hidden] { display: none; }
.s-menu::before { content: ''; position: absolute; inset: 0; background: var(--s-lattice) center top / 120px auto, var(--s-paper); }
.s-menu::after { /* a faint engraved leaf, our own mark, not an ornament */
  content: ''; position: absolute; right: -6vw; bottom: -10vh; width: min(56vw, 640px); aspect-ratio: 40 / 52; opacity: .5; pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 52'%3E%3Cpath d='M20 47C8.5 36 5 20 10.5 9.5 14 2.5 24.5 1 28.8 7 35 16.5 31 35 20 47Z' fill='none' stroke='%23556B2F' stroke-opacity='.25' stroke-width='.3'/%3E%3Cpath d='M20 44.5C18.6 32 19.6 19 23.4 9.5' fill='none' stroke='%23556B2F' stroke-opacity='.25' stroke-width='.25'/%3E%3C/svg%3E");
}
.s-menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.s-menu.is-closing { clip-path: inset(0 0 100% 0); visibility: visible; }
.s-menu-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: calc(96px + env(safe-area-inset-top, 0px)) clamp(22px, 8vw, 130px) calc(28px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.s-menu-list { list-style: none; margin: auto 0; padding: 0; }
.s-menu-list li { position: relative; overflow: hidden; }
.s-menu-list li::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--s-line); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--s-io); }
.s-menu-list li:nth-child(1) { margin-left: 0 } .s-menu-list li:nth-child(2) { margin-left: 4vw } .s-menu-list li:nth-child(3) { margin-left: 8vw } .s-menu-list li:nth-child(4) { margin-left: 12vw }
.s-menu-list a {
  display: flex; align-items: baseline; gap: clamp(14px, 2vw, 28px); padding: clamp(10px, 2vh, 20px) 0;
  font: 400 clamp(40px, 7.4vw, 108px)/1 'Playfair Display', serif; letter-spacing: -.02em; color: var(--s-ink);
  transform: translateY(110%); transition: transform .5s var(--s-out), color .4s ease;
}
.s-menu-list a:hover .s-menu-t, .s-menu-list a[aria-current] .s-menu-t { font-style: italic; }
.s-menu-list a[aria-current] .s-menu-t { color: var(--s-olive); }
.s-menu-no { font: 500 11px/1 'Instrument Sans', sans-serif; letter-spacing: .2em; color: var(--s-soft); transform: translateY(-1.2em); }
.s-menu-list a[aria-current]::after { /* the current page wears the leaf */
  content: ''; align-self: center; width: .34em; height: .44em; margin-left: .1em;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 52'%3E%3Cpath d='M20 47C8.5 36 5 20 10.5 9.5 14 2.5 24.5 1 28.8 7 35 16.5 31 35 20 47Z' fill='%23556B2F'/%3E%3C/svg%3E");
}
.s-menu.is-open .s-menu-list a { transform: none; transition: transform .55s var(--s-out), color .4s ease; }
.s-menu.is-open .s-menu-list li::after { transform: scaleX(1); }
.s-menu.is-open .s-menu-list li:nth-child(1) a { transition-delay: .42s } .s-menu.is-open .s-menu-list li:nth-child(2) a { transition-delay: .487s }
.s-menu.is-open .s-menu-list li:nth-child(3) a { transition-delay: .553s } .s-menu.is-open .s-menu-list li:nth-child(4) a { transition-delay: .62s }
.s-menu.is-open .s-menu-list li:nth-child(1)::after { transition-delay: .75s } .s-menu.is-open .s-menu-list li:nth-child(2)::after { transition-delay: .82s }
.s-menu.is-open .s-menu-list li:nth-child(3)::after { transition-delay: .89s } .s-menu.is-open .s-menu-list li:nth-child(4)::after { transition-delay: .96s }
.s-menu.is-closing .s-menu-list a { transform: translateY(-110%); transition: transform .45s var(--s-io); }
.s-menu-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 14px 32px; padding-top: 28px; opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .6s var(--s-out); }
.s-menu.is-open .s-menu-foot { opacity: 1; transform: none; transition-delay: .9s; }
.s-menu-motto { margin: 0; font: italic 400 clamp(17px, 1.6vw, 22px)/1.3 'Playfair Display', serif; color: var(--s-soft); }
.s-menu-links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0; font: 600 10px/1 'Instrument Sans', sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.s-menu-links a { color: var(--s-soft); text-decoration: none; padding: 6px 0; }
.s-menu-links a:hover { color: var(--s-ink); }
html.s-menu-open, html.s-menu-open body { overflow: hidden; }

/* ── page curtain: olive rises from below with a drop of oil, holds, leaves upward ── */
.s-curtain {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none; background: var(--s-lattice) center top / 120px auto, var(--s-paper);
  transform: translateY(101%); display: grid; place-items: center;
}
.s-drop { width: 34px; height: 48px; opacity: 0; transform: translateY(-40vh) scale(.6); }
.s-drop path { fill: var(--s-gold); }
.s-drop .s-drop-hi { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 2.2; stroke-linecap: round; }
html.s-leaving .s-curtain { transform: none; transition: transform .9s var(--s-io); pointer-events: auto; }
html.s-leaving .s-drop { opacity: 1; transform: none; transition: transform .8s cubic-bezier(.55,0,1,.45) .45s, opacity .2s ease .45s; }
html.s-cover .s-curtain { transform: none; pointer-events: auto; }
html.s-cover .s-drop { opacity: 1; transform: none; }
html.s-cover.s-revealing .s-curtain { transform: translateY(-101%); transition: transform .9s var(--s-io); }
html.s-cover.s-revealing .s-drop { transform: scale(2.4); opacity: 0; transition: transform .6s var(--s-out), opacity .4s ease; }

/* ── masked line reveals ── */
.s-mask { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.s-mask > .s-mask-in { display: block; transform: translateY(105%); transition: transform 1.1s var(--s-out); }
.s-mask.is-in > .s-mask-in { transform: none; }

/* ── footer: a giant wordmark that drifts slower than the page ── */
.s-foot {
  position: relative; z-index: 1; overflow: hidden; background: var(--s-lattice) center top / 120px auto, var(--s-paper-2); color: var(--s-ink); border-top: 1px solid var(--s-line);
  padding: clamp(56px, 9vw, 120px) clamp(22px, 6vw, 96px) calc(26px + env(safe-area-inset-bottom, 0px));
}
.s-foot a { color: var(--s-soft); text-decoration: none; transition: color .3s; }
.s-foot a:hover { color: var(--s-ink); }
.s-foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px 64px; }
.s-foot-motto { margin: 0; max-width: 14ch; font: italic 400 clamp(32px, 4.2vw, 60px)/1.05 'Playfair Display', serif; letter-spacing: -.015em; }
.s-foot-cols { display: flex; flex-wrap: wrap; gap: 28px clamp(36px, 6vw, 96px); }
.s-foot-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.s-foot-cols a { font: 500 11px/1 'Instrument Sans', sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.s-foot-mark { margin: clamp(44px, 8vw, 110px) 0 clamp(18px, 2.4vw, 30px); line-height: .78; user-select: none; }
.s-foot-word {
  display: block; text-align: center; font: 400 clamp(84px, 27vw, 440px)/.78 'Playfair Display', serif; letter-spacing: -.045em;
  color: transparent; -webkit-text-stroke: 1px rgba(44,36,32,.3); will-change: transform;
}
.s-foot-base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding-top: 22px; border-top: 1px solid var(--s-line); font: 500 10px/1.4 'Instrument Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--s-soft); }
.s-foot .lang-switch { gap: 18px !important; }
.s-foot .lang-switch > span[aria-hidden] { display: none; }
.s-foot .lang-switch a { color: var(--s-soft) !important; }
.s-foot .lang-switch span[aria-current] { color: var(--s-ink) !important; }

@media (max-width: 760px) {
  .s-top { grid-template-columns: 1fr auto 1fr; }
  .s-langs .lang-switch a, .s-langs .lang-switch span[aria-current] { min-width: 32px; height: 28px; padding: 0 7px; }
  .s-menu-list li:nth-child(n) { margin-left: 0; }
  .s-menu-list li:nth-child(2) { margin-left: 5vw } .s-menu-list li:nth-child(3) { margin-left: 10vw } .s-menu-list li:nth-child(4) { margin-left: 15vw }
  .s-menu-list a { font-size: clamp(32px, 9.4vw, 50px); }
  .s-menu-t { overflow-wrap: anywhere; hyphens: auto; }
  .s-foot-cols { width: 100%; justify-content: space-between; }
  .s-foot-base { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .s-menu, .s-menu-list a, .s-menu-list li::after, .s-menu-foot, .s-mask > .s-mask-in, .s-top { transition: none !important; }
  .s-mask > .s-mask-in { transform: none; }
  .s-curtain { display: none; }
}

/* page styles must not leak into the chrome */
.s-menu a, .s-foot a, .s-top a { text-decoration: none; }
.s-menu ul, .s-foot ul { padding-left: 0; }
.s-foot p, .s-foot li, .s-menu p, .s-menu li { color: inherit; font-size: inherit; line-height: inherit; }
.s-foot .s-foot-motto { color: var(--s-ink); }
.s-menu .s-menu-motto { color: var(--s-soft); }

/* the theme switch, where a page has one, sits beside the menu */
.r-top-end { justify-self: end; display: flex; align-items: center; gap: 10px; }
.s-top #theme-toggle { display: flex; align-items: center; padding: 0; background: transparent; border: 1px solid; border-radius: 13px; cursor: pointer; position: relative; top: auto; right: auto; z-index: auto; width: 44px; height: 26px; mix-blend-mode: normal; border-color: var(--ink-25); }
.s-top #theme-toggle::after { content: ''; display: block; border-radius: 50%; transition: transform .3s ease; background: var(--ink); width: 16px; height: 16px; margin-left: 4px; }
[data-theme="dark"] .s-top #theme-toggle::after { transform: translateX(18px); }
html.s-menu-open .s-top #theme-toggle { opacity: 0; pointer-events: none; }
@media (max-width: 560px) { .s-top #theme-toggle { display: none; } }

/* the outward arrow, drawn (a text ↗ turns into an emoji on iPhone) */
.arr { display: inline-block; width: .9em; height: .9em; vertical-align: -.05em; margin-left: .15em; }
