/* Arco Bar · taberna em Celas, desde 1977
   Direction: "the split stage" (taste seed 1597319273). Type: Zilla Slab.
   Palette dealt as bottle green and gold, set in daylight: the ground is the room's white brick. */

:root {
  --bg: #f1f1ee;          /* limewashed brick */
  --surface: #e5e5df;
  --ink: #133621;         /* bottle green */
  --muted: #4a5d4f;
  --field: #133621;
  --field-2: #1a4429;
  --gold: #f4d96c;
  --gold-muted: #cdbd6c;
  --btn: #133621;
  --btn-ink: #f4d96c;
  --deep: #133621;

  --m: clamp(16px, 2.2vw, 32px);
  --gap: clamp(12px, 1.7vw, 24px);
  --f: 'Zilla Slab', 'Rockwell', 'Roboto Slab', Georgia, serif;

  --s-small: 15px;
  --s-body: clamp(18px, 1.05rem + .25vw, 20px);
  --s-lead: clamp(22px, 1.1rem + .9vw, 30px);
  --s-head: clamp(34px, 1.4rem + 2.4vw, 64px);
  --s-name: clamp(112px, 19.5vw, 360px);

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); scrollbar-color: var(--ink) var(--bg); scrollbar-width: thin; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f); font-size: var(--s-body); line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-variant-numeric: lining-nums; }
img, video { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: inherit; }
p, h1, h2, h3, figure, blockquote, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--btn); color: var(--btn-ink); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: var(--m); top: -60px; z-index: 100; background: var(--ink); color: var(--gold); padding: 12px 18px; text-decoration: none; transition: top .2s var(--ease-out); }
.skip:focus { top: 12px; }
.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); transition: text-decoration-color .2s ease; }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: currentColor; } }
.tbc { font-size: var(--s-small); font-style: italic; color: var(--muted); white-space: nowrap; }
.fine { font-size: var(--s-small); color: var(--muted); }
.ico { width: 18px; height: 18px; flex: none; }
.arw { width: 20px; height: 20px; flex: none; transition: transform .35s var(--ease-out); }

.h2 { font-weight: 600; font-size: var(--s-head); line-height: 1; letter-spacing: -0.025em; text-wrap: balance; }
.h3 { font-weight: 600; font-size: var(--s-body); margin-bottom: 12px; }
.h3x { font-weight: 500; font-size: var(--s-lead); line-height: 1.1; letter-spacing: -0.01em; }

/* ---------- buttons, cells ---------- */
.btn { translate: calc(var(--mx, 0) * 1px) calc(var(--my, 0) * 1px); display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 24px; background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: var(--s-body); text-decoration: none; transition: transform 160ms var(--ease-out), background-color .25s ease; font-variant-numeric: tabular-nums; }
.btn-gold { background: var(--gold); color: var(--deep); }
.btn:active, .cell:active { transform: scale(.97); }
.text-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; padding: 8px 0; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: color-mix(in srgb, var(--btn) 86%, #fff); }
  .btn-gold:hover { background: #f8e48f; }
  .btn:hover .arw, .text-link:hover .arw, .cell:hover .arw { transform: translateX(4px); }
}

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: 72px; padding: 0 var(--m); display: flex; align-items: center; justify-content: flex-start; color: var(--ink); transition: transform .6s var(--ease-drawer), background-color .35s ease, color .35s ease; }
.nav.is-solid { background: var(--bg); }
.nav.is-solid.is-dark { background: var(--field); color: var(--gold); }
.nav.is-hidden { transform: translateY(-101%); }
.nav-name { margin-right: auto; font-weight: 600; font-size: var(--s-lead); letter-spacing: -0.03em; text-decoration: none; opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .5s var(--ease-out); }
.nav.is-past .nav-name { opacity: 1; transform: none; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); font-size: var(--s-small); }
.nav-links a { text-decoration: none; position: relative; padding: 6px 0; }
.nav-links a:not(.nav-call)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav-links a:not(.nav-call):hover::after { transform: scaleX(1); transform-origin: left; } }
.nav-call { translate: calc(var(--mx, 0) * 1px) calc(var(--my, 0) * 1px); display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px !important; background: var(--btn); color: var(--btn-ink); font-weight: 600; transition: transform 160ms var(--ease-out); }
.nav.is-dark .nav-call { background: var(--gold); color: var(--deep); }
.nav-call:active { transform: scale(.96); }
.nav-phone { display: none; align-items: center; gap: 18px; }
.nav-menu { font-size: 17px; padding: 10px 0; }
.nm-close { display: none; }
.sheet-open .nm-open { display: none; }
.sheet-open .nm-close { display: inline; }
.sheet { position: fixed; inset: 0; z-index: 45; background: var(--field); color: var(--gold); display: flex; flex-direction: column; justify-content: space-between; padding: 104px var(--m) 32px; }
.sheet[hidden] { display: none; }
.sheet-links { display: flex; flex-direction: column; }
.sheet-links a { font-weight: 600; font-size: clamp(44px, 13vw, 88px); line-height: 1.05; letter-spacing: -0.03em; text-decoration: none; overflow: hidden; display: block; }
.sheet-links a span { display: inline-block; }
.sheet-foot { display: grid; gap: 10px; }

/* ---------- split stage ---------- */
.split { display: grid; grid-template-columns: 47fr 53fr; position: relative; }
.split-b { grid-template-columns: 53fr 47fr; }
.stage { position: relative; min-width: 0; }
.stage-sticky { position: sticky; top: 0; height: 100svh; padding: 20px; }
.arch { position: relative; height: 100%; overflow: hidden; border-radius: 999px 999px 0 0; background: var(--surface); isolation: isolate; }
.st-layer { position: absolute; inset: 0; opacity: 0; }
.st-layer.is-on { opacity: 1; }
.st-layer picture, .st-layer img { width: 100%; height: 100%; }
.st-layer img, .st-layer video { object-fit: cover; object-position: 50% 62%; will-change: transform; }
.st-layer .vid { width: 100%; height: 100%; }
.vid { position: relative; width: 100%; height: 100%; }
.vid video { object-fit: cover; }
.vid video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.vid.is-playing video { opacity: 1; }
.arch::after { content: ''; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(rgba(10, 22, 14, 0), rgba(10, 22, 14, .5)); pointer-events: none; z-index: 2; }
.arch-label { position: absolute; left: 28px; bottom: 24px; z-index: 3; color: #fff; font-size: 20px; font-weight: 500; overflow: hidden; }
.arch-label span { display: inline-block; }
.col { min-width: 0; padding: 0 var(--m) 0 clamp(32px, 5vw, 96px); position: relative; }
.split-b .col { padding: 0 clamp(32px, 5vw, 96px) 0 var(--m); }

/* ---------- hero (right half of the first screen) ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; display: flex; flex-direction: column; justify-content: flex-start; padding-top: max(120px, 20svh); }
.hero-copy { display: grid; gap: 14px; justify-items: start; max-width: 32em; margin-left: auto; margin-right: auto; width: min(100%, 30em); }
.hero-lead { font-size: var(--s-lead); line-height: 1.3; font-weight: 500; max-width: 24ch; }
.hero-sub { max-width: 34ch; }
.status { color: var(--muted); }
.status.is-open::before, .status-line.is-open::before { content: ''; display: inline-block; width: .5em; height: .5em; border-radius: 50%; background: #2f8a4f; margin-right: .5em; vertical-align: .08em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 10px; }

.name { position: absolute; right: 0; bottom: clamp(26px, 4svh, 44px); margin: 0; font-weight: 500; font-size: min(var(--s-name), 34svh); line-height: .8; letter-spacing: -0.05em; white-space: nowrap; }
.name-wrap { position: relative; display: block; transform-origin: 100% 100%; }
.name-ink, .name-lit { display: flex; }
.name-lit { position: absolute; inset: 0; color: #fff; clip-path: inset(-20% calc(100% - var(--cut, 0px)) -20% -5%); }
.name-ink { clip-path: inset(-20% -5% -20% var(--cut, 0px)); }
.nc { display: inline-block; overflow: hidden; padding: .06em 0 .14em; margin: -.06em 0 -.14em; }
.nc-in { display: inline-block; will-change: transform; }

/* intro states */
.is-intro .nc-in { transform: translateY(110%); }
.is-intro [data-hero-in] { opacity: 0; }
.is-intro .nav { opacity: 0; }
.is-intro .split-a .arch { clip-path: inset(46% 41% 0% 41% round 999px 999px 0 0); }

/* ---------- dishes ---------- */
.dishes-sec { padding: clamp(120px, 14vw, 220px) 0 clamp(120px, 12vw, 200px); display: grid; gap: 22px; max-width: 40em; }
.tabs { display: flex; gap: 6px 28px; flex-wrap: wrap; margin-bottom: 12px; }
.tab { font-size: var(--s-body); color: var(--muted); padding: 6px 0; position: relative; transition: color .3s ease; }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.intro { max-width: 40ch; }
.dish-groups { margin-top: 14px; position: relative; }
.js .dish-group:not(.on) { display: none; }
.dish-group-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dishes { display: grid; gap: 4px; }
.dish { display: grid; grid-template-columns: 1fr auto; column-gap: 20px; padding: 14px 0; position: relative; }
.dish-n { font-weight: 500; font-size: var(--s-lead); line-height: 1.1; letter-spacing: -0.015em; text-align: left; transition: transform .45s var(--ease-out), color .3s ease; display: inline-block; }
.dish-btn { display: block; text-align: left; cursor: pointer; }
.dish-d { grid-column: 1; color: var(--muted); margin-top: 6px; max-width: 46ch; }
.dish-pic { display: none; }
.dish.is-shown .dish-n { color: var(--ink); }
.dishes:has(.dish.is-shown) .dish:not(.is-shown) .dish-n { color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .dish.has-pic .dish-btn:hover .dish-n { transform: translateX(10px); }
}
.dish.has-pic .dish-n::after { content: ''; display: inline-block; width: .32em; height: .4em; margin-left: .35em; vertical-align: .08em; border: 2px solid currentColor; border-bottom: 0; border-radius: 99px 99px 0 0; opacity: .55; }
.cells { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; }
.cell { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 72px; padding: 0 22px; text-decoration: none; font-weight: 600; transition: transform 160ms var(--ease-out); }
.cell-ink { background: var(--btn); color: var(--btn-ink); justify-content: flex-start; }
.cell-soft { background: var(--surface); color: var(--ink); }

/* ---------- take: the flat lay, full width ---------- */
.take { background: var(--field); color: var(--gold); overflow: clip; }
.take-media { height: min(78svh, 46vw); overflow: hidden; position: relative; }
.take-media picture, .take-media img, .take-media .vid, .take-media video { width: 100%; height: 100%; }
.take-media img, .take-media video { object-fit: cover; will-change: transform; }
.take-board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: clamp(80px, 9vw, 140px) var(--m) clamp(100px, 10vw, 160px); }
.take-head { grid-column: 1 / span 5; display: grid; gap: 22px; align-content: start; justify-items: start; }
.take-head p { max-width: 38ch; color: var(--gold); }
.take-list { grid-column: 7 / span 6; display: grid; gap: 22px; align-content: start; }
.rows2 { display: grid; }
.row2 { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; min-height: 48px; padding: 8px 0; font-size: var(--s-lead); font-weight: 500; }
.row2 .v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row2 .v-q { font-size: var(--s-small); font-style: italic; color: var(--gold-muted); font-weight: 400; }
.take .fine, .take .tbc { color: var(--gold-muted); }

/* ---------- split b: story, figures, the letter ---------- */
.story { padding: clamp(140px, 13vw, 220px) 0 clamp(80px, 8vw, 120px); display: grid; gap: 20px; max-width: 34em; }
.story .lead { font-size: var(--s-lead); line-height: 1.35; font-weight: 500; }
.press { margin-top: 26px; padding: 30px 32px; background: var(--surface); }
.press blockquote p { font-size: var(--s-body); font-style: italic; }
.press figcaption { margin-top: 12px; font-size: var(--s-small); color: var(--muted); }
.stats { padding: clamp(80px, 9vw, 140px) 0; display: grid; gap: 40px; max-width: 36em; }
.stat-list { display: grid; gap: 26px; }
.stat { display: grid; grid-template-columns: 132px 1fr; column-gap: 24px; align-items: baseline; }
.stat-f { text-align: right; font-weight: 600; font-size: var(--s-lead); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat dd { color: var(--muted); max-width: 40ch; }
.letter { padding: clamp(80px, 9vw, 140px) 0 clamp(140px, 13vw, 220px); display: grid; gap: 34px; max-width: 36em; }
.letter-fig blockquote { display: grid; gap: 20px; }
.letter-open { font-size: var(--s-lead); line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.letter-fig figcaption { display: grid; margin-top: 36px; }
.by-n { font-weight: 600; }
.by-r { color: var(--muted); font-size: var(--s-small); }
.shorts { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.short { padding: 24px; background: var(--surface); }
.short p { font-size: var(--s-body); }
.short figcaption { margin-top: 12px; font-size: var(--s-small); color: var(--muted); }

/* ---------- visit: address in display rows ---------- */
.vrow { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; min-height: clamp(92px, 10.4vw, 150px); padding: 0 var(--m) clamp(16px, 1.6vw, 26px); font-weight: 500; font-size: clamp(40px, 6vw, 92px); line-height: 1; letter-spacing: -0.035em; text-decoration: none; overflow: hidden; font-variant-numeric: tabular-nums; }
.vrow .vtxt { display: inline-block; transition: transform .5s var(--ease-out); font: inherit; letter-spacing: inherit; }
.vrow-a { background: var(--bg); }
.vrow-b { background: var(--surface); }
.vrow-go { background: var(--field); color: var(--gold); }
.vsince { font-size: var(--s-body); letter-spacing: 0; color: var(--muted); margin-bottom: .3em; font-weight: 400; }
.vgo { flex: none; display: grid; place-items: center; width: .9em; height: .9em; border-radius: 50%; background: var(--gold); color: var(--deep); margin-bottom: .04em; transition: transform .5s var(--ease-out); }
.vgo .ico { width: 40%; height: 40%; }
a.vrow:active .vtxt { transform: translateX(6px); }
@media (hover: hover) and (pointer: fine) {
  a.vrow:hover .vtxt { transform: translateX(14px); }
  .vrow-go:hover .vgo { transform: rotate(-12deg) scale(1.06); }
}
.visit-meta { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 72px var(--m) 128px; }
.visit-meta > div:first-child { grid-column: 1 / span 4; display: grid; gap: 10px; align-content: start; }
.visit-meta > div:last-child { grid-column: 7 / span 6; display: grid; gap: 10px; align-content: start; }
.hours div { display: flex; justify-content: space-between; gap: 24px; padding: 4px 0; font-variant-numeric: tabular-nums; }
.status-line { font-weight: 500; }

/* ---------- footer: photograph half, menu half ---------- */
.foot { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; background: var(--field); color: var(--gold); }
.foot-photo { position: relative; overflow: hidden; min-height: 60svh; }
.foot-photo picture, .foot-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.foot-photo img { object-fit: cover; object-position: 50% 64%; transform: scale(1.5); transform-origin: 50% 64%; }
.foot-panel { display: flex; flex-direction: column; gap: 56px; padding: 80px var(--m) 32px clamp(32px, 5vw, 96px); }
.foot-name { font-weight: 600; font-size: var(--s-lead); letter-spacing: -0.03em; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.foot-name span { font-size: var(--s-small); font-weight: 400; letter-spacing: 0; color: var(--gold-muted); }
.foot-menu { display: grid; gap: 14px; justify-items: start; }
.foot-menu a { font-weight: 600; font-size: var(--s-head); line-height: 1.05; letter-spacing: -0.03em; text-decoration: none; transition: transform .45s var(--ease-out), color .3s ease; }
@media (hover: hover) and (pointer: fine) {
  .foot-menu:hover a { color: var(--gold-muted); }
  .foot-menu a:hover { color: var(--gold); transform: translateX(12px); }
}
.foot-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-size: var(--s-small); }
.foot-blocks div { display: grid; gap: 8px; align-content: start; }
.foot-legal { margin-top: auto; display: grid; gap: 6px; font-size: var(--s-small); color: var(--gold-muted); }

/* ---------- phone ---------- */
@media (max-width: 899px) {
  .nav { height: 64px; }
  .nav-links { display: none; }
  .nav-phone { display: flex; }

  .nav .nav-call { padding: 9px 14px !important; }

  .split, .split-b { display: block; }
  .stage { position: sticky; top: 0; height: 64svh; z-index: 0; }
  .split-b .stage { order: -1; }
  .split-b { display: flex; flex-direction: column; }
  .stage-sticky { position: relative; height: 100%; padding: 64px 12px 12px; }
  .col, .split-b .col { position: relative; z-index: 1; background: var(--bg); padding: 0 var(--m); }
  .arch-label { left: 20px; bottom: 16px; font-size: 18px; }

  .hero { height: auto; min-height: 0; padding: 0 0 72px; display: flex; flex-direction: column; }
  .name { position: relative; inset: auto; order: -1; font-size: 22vw; margin: 10px 0 26px; line-height: .86; }
  .name-lit { display: none; }
  .name-ink { clip-path: none; }
  .hero-copy { margin: 0; width: 100%; }
  .hero-lead { font-size: 24px; }

  .dishes-sec { padding: 72px 0 96px; }
  .dish { grid-template-columns: 1fr 76px; }
  .dish-pic { display: block; grid-column: 2; grid-row: 1 / span 2; width: 76px; height: 96px; overflow: hidden; border-radius: 99px 99px 0 0; }
  .dish-pic picture, .dish-pic img { width: 100%; height: 100%; }
  .dish-pic img { object-fit: cover; }
  .dish.has-pic .dish-n::after { display: none; }
  .cells { grid-template-columns: 1fr; }
  .cell { height: 60px; }

  .take-media { height: 46svh; }
  .take-board { grid-template-columns: 1fr; row-gap: 48px; padding: 72px var(--m) 96px; }
  .take-head, .take-list { grid-column: 1; }
  .row2 { font-size: 20px; }

  .story { padding: 72px 0 56px; }
  .stats { padding: 56px 0; }
  .stat { grid-template-columns: 88px 1fr; column-gap: 16px; }
  .stat-f { font-size: 24px; }
  .letter { padding: 56px 0 96px; }
  .shorts { grid-template-columns: 1fr; }

  .vrow { font-size: 8.2vw; min-height: 84px; padding-bottom: 14px; }
  .letter-open { font-size: 22px; }
  .vsince { display: none; }
  .visit-meta { grid-template-columns: 1fr; row-gap: 44px; padding: 56px var(--m) 96px; }
  .visit-meta > div:first-child, .visit-meta > div:last-child { grid-column: 1; }

  .foot { grid-template-columns: 1fr; }
  .foot-photo { min-height: 50svh; }
  .foot-panel { padding: 56px var(--m) 28px; gap: 44px; }
  .foot-menu a { font-size: 9vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* menu open: the bar sits on the green sheet */
.sheet-open .nav { background: transparent !important; color: var(--gold) !important; transform: none !important; }
.sheet-open .nav .nav-call { background: var(--gold); color: var(--deep); }


/* ---------- night mode: the taberna after dark ---------- */
html[data-mode="dark"] {
  --bg: #0d1c13;
  --surface: #15291c;
  --ink: #ecebe6;
  --muted: #a9b6ab;
  --field: #1a4429;
  --field-2: #21543a;
  --btn: #f4d96c;
  --btn-ink: #0d1c13;
  color-scheme: dark;
}
html[data-mode="dark"] .status.is-open::before, html[data-mode="dark"] .status-line.is-open::before { background: #6fcf8f; }
html[data-mode="dark"] .arch { background: #15291c; }

/* the toggle: a sun whose core grows into a moon while the rays turn away */
.mode { position: relative; display: grid; place-items: center; width: 42px; height: 42px; margin-left: clamp(10px, 1.4vw, 18px); border-radius: 50%; color: inherit; translate: calc(var(--mx, 0) * 1px) calc(var(--my, 0) * 1px); transition: transform 160ms var(--ease-out), background-color .3s ease; }
.mode:active { transform: scale(.9); }
@media (hover: hover) and (pointer: fine) { .mode:hover { background: color-mix(in srgb, currentColor 12%, transparent); } }
.mode svg { width: 22px; height: 22px; overflow: visible; }
.tg-core { transform-box: fill-box; transform-origin: center; transform: scale(.5); transition: transform .85s cubic-bezier(.34, 1.36, .64, 1); }
.tg-cut { transform: translate(9px, -9px); transition: transform .8s var(--ease-io); }
.tg-rays { transform-box: view-box; transform-origin: 12px 12px; transition: transform .75s var(--ease-out), opacity .5s ease; }
.mode[aria-pressed="true"] .tg-core { transform: scale(1); }
.mode[aria-pressed="true"] .tg-cut { transform: translate(0, 0); transition-delay: .12s; }
.mode[aria-pressed="true"] .tg-rays { transform: rotate(-120deg) scale(.4); opacity: 0; }
.nav-links + .mode { margin-left: clamp(14px, 1.6vw, 24px); }
@media (max-width: 899px) { .mode { margin: 0 8px 0 0; } }

.mode-anim, .mode-anim *, .mode-anim *::before, .mode-anim *::after { transition: background-color .6s ease, color .6s ease, fill .6s ease !important; }

/* page and theme transitions */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 420ms cubic-bezier(.77, 0, .175, 1) both vt-out; }
::view-transition-new(root) { animation: 650ms cubic-bezier(.23, 1, .32, 1) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-1.5%) scale(.99); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(1.5%); } }
html.vt-theme::view-transition-old(root), html.vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.vt-theme::view-transition-new(root) { z-index: 2; }

/* a second visit in the same session: the arch is already open, only the name rises */
.is-quick.is-intro .split-a .arch { clip-path: none; }
.is-quick.is-intro [data-hero-in], .is-quick.is-intro .nav { opacity: 1; }

/* the footer photograph leans in under the pointer */
.foot-photo picture { transition: transform 1.6s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .foot-photo:hover picture { transform: scale(1.04); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .tg-core, .tg-cut, .tg-rays { transition: none; }
}
