/* Philip's Gateway
   Built on the Memorisely skills. Round 2 (Nov 16): calmer colours taken from Philip's room,
   sage from the plants, honey from the oak, linen for the walls. Round 1 lives in rounds/1-forest-gold.
   Primitives first, semantic tokens second. Components read semantic tokens only.
   Sage takes the place of Violet, linen the place of Slate, honey is the warm accent.
   Grounds (.g-*) remap the semantic tokens, so buttons, links and rules adapt by themselves. */

@font-face { font-family: "Alegreya"; src: url(fonts/alegreya-var.woff2) format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url(fonts/alegreya-italic-var.woff2) format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(fonts/alegreya-sans-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url(fonts/alegreya-sans-500.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  /* ---- primitives ---- */
  --linen-50: #f8f6f0;
  --linen-100: #f1eee6;
  --linen-200: #e5e0d5;
  --linen-300: #d2cbbe;
  --linen-400: #a9a193;
  --linen-500: #807969;
  --linen-600: #615b4e;
  --linen-700: #4a4539;
  --linen-800: #322f27;
  --linen-900: #211f1a;

  --sage-50: #f1f4ef;
  --sage-100: #e5ebe2;
  --sage-200: #d0dbcc;
  --sage-300: #b0c3ad;
  --sage-400: #8aa587;
  --sage-500: #6a8868;
  --sage-600: #536f53;
  --sage-700: #425a43;
  --sage-800: #354837;
  --sage-900: #29382b;
  --sage-950: #1a241c;

  --honey-50: #fbf6ec;
  --honey-100: #f5ebd8;
  --honey-200: #ead7b3;
  --honey-300: #dcbe88;
  --honey-400: #c9a465;
  --honey-500: #ae8a4c;
  --honey-600: #8e6e3a;
  --honey-700: #6f552c;

  /* night: the dark theme's grounds */
  --night-950: #121713;
  --night-900: #161c18;
  --night-850: #1b231d;
  --night-800: #212a23;
  --night-700: #2b362d;

  --wood: #8a4d1f;

  /* ---- type ---- */
  --serif: "Alegreya", Georgia, "Times New Roman", serif;
  --sans: "Alegreya Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* ---- radius ---- */
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-full: 9999px;

  /* ---- motion ---- */
  --duration-fast: 100ms;
  --duration-default: 150ms;
  --duration-moderate: 200ms;
  --duration-slow: 300ms;
  --duration-deliberate: 500ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* ---- layout ---- */
  --gutter: 16px;
  --header-h: 64px;
  --section: 48px;

  /* ---- semantic, light ---- */
  color-scheme: light;
  --background: var(--linen-50);
  --foreground: var(--sage-900);
  --muted-foreground: var(--linen-600);
  --primary: var(--sage-700);
  --primary-hover: var(--sage-800);
  --primary-pressed: var(--sage-900);
  --primary-foreground: var(--linen-50);
  --accent: var(--honey-700);
  --emblem: var(--sage-700);
  --ornament: var(--honey-400);
  --border: var(--linen-200);
  --border-strong: var(--linen-500);
  --hover: var(--linen-100);
  --ring: var(--sage-600);
  --ground-calm: var(--sage-100);
  --ground-mist: var(--linen-100);
  --ground-cream: var(--honey-50);
  --ground-sage: var(--sage-700);
  --ground-deep: var(--sage-800);
  --window: var(--sage-200);
  --window-art: var(--sage-700);
  --hero-art: var(--sage-200);
  --glow: rgb(245 235 216 / .9);
  --gate: var(--sage-600);
  --gate-line: rgb(245 235 216 / .55);
  --scrim: rgb(26 36 28 / .4);
  --photo-shadow: rgb(53 72 55 / .14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: var(--night-900);
    --foreground: #e7ebe4;
    --muted-foreground: #a9b6aa;
    --primary: var(--sage-300);
    --primary-hover: var(--sage-200);
    --primary-pressed: var(--sage-400);
    --primary-foreground: var(--night-900);
    --accent: var(--honey-300);
    --emblem: var(--sage-300);
    --ornament: var(--honey-500);
    --border: var(--night-700);
    --border-strong: #66766a;
    --hover: var(--night-800);
    --ring: var(--honey-300);
    --ground-calm: var(--night-850);
    --ground-mist: var(--night-850);
    --ground-cream: var(--night-850);
    --ground-sage: var(--night-800);
    --ground-deep: var(--night-950);
    --window: var(--night-700);
    --window-art: var(--sage-300);
    --hero-art: var(--night-800);
    --glow: rgb(220 190 136 / .07);
    --gate: var(--night-700);
    --gate-line: rgb(220 190 136 / .4);
    --scrim: rgb(0 0 0 / .55);
    --photo-shadow: rgb(0 0 0 / .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: var(--night-900);
  --foreground: #e7ebe4;
  --muted-foreground: #a9b6aa;
  --primary: var(--sage-300);
  --primary-hover: var(--sage-200);
  --primary-pressed: var(--sage-400);
  --primary-foreground: var(--night-900);
  --accent: var(--honey-300);
  --emblem: var(--sage-300);
  --ornament: var(--honey-500);
  --border: var(--night-700);
  --border-strong: #66766a;
  --hover: var(--night-800);
  --ring: var(--honey-300);
  --ground-calm: var(--night-850);
  --ground-mist: var(--night-850);
  --ground-cream: var(--night-850);
  --ground-sage: var(--night-800);
  --ground-deep: var(--night-950);
  --window: var(--night-700);
  --window-art: var(--sage-300);
  --hero-art: var(--night-800);
  --glow: rgb(220 190 136 / .07);
  --gate: var(--night-700);
  --gate-line: rgb(220 190 136 / .4);
  --scrim: rgb(0 0 0 / .55);
  --photo-shadow: rgb(0 0 0 / .35);
}

/* grounds */
.g-calm { --background: var(--ground-calm); --hover: color-mix(in srgb, var(--ground-calm) 88%, var(--foreground)); background: var(--background); color: var(--foreground); }
.g-mist { --background: var(--ground-mist); background: var(--background); }
.g-cream { --background: var(--ground-cream); background: var(--background); }
.g-sage, .g-deep {
  --background: var(--ground-sage);
  --foreground: var(--linen-50);
  --muted-foreground: var(--sage-100);
  --primary: var(--honey-200);
  --primary-hover: var(--honey-100);
  --primary-pressed: var(--honey-300);
  --primary-foreground: var(--sage-900);
  --accent: var(--honey-200);
  --emblem: var(--honey-200);
  --ornament: var(--honey-300);
  --border: var(--sage-500);
  --border-strong: var(--sage-200);
  --hover: var(--sage-600);
  --ring: var(--honey-200);
  background: var(--background);
  color: var(--foreground);
}
.g-deep { --background: var(--ground-deep); --hover: var(--sage-700); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.g-sage, .g-deep) { --foreground: #e7ebe4; --muted-foreground: #a9b6aa; --primary: var(--honey-300); --primary-hover: var(--honey-200); --primary-pressed: var(--honey-400); --primary-foreground: var(--night-900); --accent: var(--honey-300); --emblem: var(--honey-300); --border: var(--night-700); --border-strong: #66766a; --hover: var(--night-700); }
}
:root[data-theme="dark"] :is(.g-sage, .g-deep) { --foreground: #e7ebe4; --muted-foreground: #a9b6aa; --primary: var(--honey-300); --primary-hover: var(--honey-200); --primary-pressed: var(--honey-400); --primary-foreground: var(--night-900); --accent: var(--honey-300); --emblem: var(--honey-300); --border: var(--night-700); --border-strong: #66766a; --hover: var(--night-700); }

@media (min-width: 768px) { :root { --gutter: 24px; --header-h: 76px; --section: 64px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; --section: 96px; } }
@media (min-width: 1280px) { :root { --gutter: 40px; } }

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--background); }
body { margin: 0; background: var(--background); color: var(--foreground); font: 400 18px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
@media (min-width: 768px) { body { font-size: 20px; line-height: 1.5; } }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.006em; text-wrap: balance; }
h1 { font-size: 40px; line-height: 1.06; }
h2 { font-size: 32px; line-height: 1.12; }
h3 { font-size: 24px; line-height: 1.2; }
.lead { font-size: 20px; line-height: 1.4; }
p { text-wrap: pretty; }
a { color: inherit; }
em { font-style: italic; }
.num { font-variant-numeric: lining-nums; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--honey-200); color: var(--sage-950); }

@media (min-width: 768px) {
  h1 { font-size: 56px; }
  h2 { font-size: 40px; }
  h3 { font-size: 28px; }
  .lead { font-size: 22px; }
}
@media (min-width: 1280px) {
  h1 { font-size: 72px; }
  h2 { font-size: 56px; }
  .lead { font-size: 24px; }
}

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: calc(760px + 2 * var(--gutter)); }
.section { padding-block: var(--section); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-md { width: 20px; height: 20px; }

.skip { position: fixed; left: 8px; top: 8px; z-index: 100; padding: 12px 16px; border-radius: var(--radius-md); background: var(--primary); color: var(--primary-foreground); font-weight: 500; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--radius-md);
  font: 500 18px/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--duration-default) var(--ease), color var(--duration-default) var(--ease), border-color var(--duration-default) var(--ease), transform var(--duration-fast) var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-pressed); }
.btn-outline { background: transparent; color: var(--foreground); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--hover); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--hover); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 17px; }
.btn-lg { min-height: 56px; padding: 0 24px; font-size: 19px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--foreground); cursor: pointer; transition: background-color var(--duration-default) var(--ease); }
.icon-btn:hover { background: var(--hover); }
.actions { display: flex; flex-direction: column; gap: 12px; }
.actions .btn { width: 100%; }
.actions-center { align-items: center; }
@media (min-width: 640px) {
  .actions { flex-direction: row; flex-wrap: wrap; }
  .actions .btn { width: auto; }
  .actions-center { justify-content: center; }
}
.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; color: var(--accent); transition: color var(--duration-default) var(--ease); }
.link:hover { color: var(--foreground); }

/* ---- header ---- */
.site-header { position: relative; z-index: 30; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
@media (min-width: 768px) { .site-header { position: sticky; top: 0; } }
.bar { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; margin-right: auto; color: var(--foreground); text-decoration: none; }
.brand-mark { width: 52px; height: 44px; color: var(--emblem); flex: none; }
.brand-name { font: 500 20px/1 var(--serif); letter-spacing: -.003em; white-space: nowrap; }
.nav { display: none; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-md); color: var(--muted-foreground); text-decoration: none; font-size: 17px; font-weight: 500; transition: color var(--duration-default) var(--ease), background-color var(--duration-default) var(--ease); }
.nav a:hover { color: var(--foreground); background: var(--hover); }
.bar-call { display: none; }
html:not(.js) .bar-menu { display: none; }
@media (min-width: 768px) { .brand-name { font-size: 22px; } }
@media (min-width: 1024px) {
  .nav, .bar-call { display: inline-flex; }
  .bar-menu { display: none; }
  .nav { margin-right: 8px; }
}

/* ---- hero: an arched doorway standing on the edge of the next section ---- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(52% 62% at 74% 60%, var(--glow), transparent 72%); }
.hero-art { position: absolute; z-index: -1; left: -120px; bottom: 0; width: 420px; height: 520px; color: var(--hero-art); opacity: .55; }
.hero-inner { display: grid; gap: 48px; padding-top: 24px; }
.hero h1 em { display: block; color: var(--accent); font-weight: 400; }
.hero .lead { margin-top: 16px; color: var(--muted-foreground); }
.hero .lead span { display: block; }
.hero .actions { margin-top: 28px; }
.hero-note { margin-top: 16px; color: var(--muted-foreground); }
.place { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--muted-foreground); }
.place .icon { color: var(--emblem); }

.doorway { position: relative; justify-self: center; width: min(84vw, 460px); margin-top: 24px; }
.doorway::before, .doorway::after { content: ""; position: absolute; left: -12px; right: -12px; top: -12px; bottom: 0; border: 1px solid var(--ornament); border-bottom: 0; border-radius: var(--radius-full) var(--radius-full) 0 0; opacity: .7; pointer-events: none; }
.doorway::after { left: -24px; right: -24px; top: -24px; opacity: .32; }
.portal { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius-full) var(--radius-full) 0 0; background: var(--wood); perspective: 1600px; }
.portal img { width: 100%; height: 100%; object-fit: cover; }
.leaf {
  position: absolute; top: 0; bottom: 0; width: 50.5%; display: none;
  background-color: var(--gate);
  background-image:
    linear-gradient(var(--gate-line) 0 0),
    linear-gradient(var(--gate-line) 0 0),
    repeating-linear-gradient(90deg, transparent 0 34px, var(--gate-line) 34px 35px);
  background-size: 100% 1px, 100% 1px, 100% 100%;
  background-position: 0 56%, 0 88%, 0 0;
  background-repeat: no-repeat, no-repeat, repeat;
  backface-visibility: hidden;
  transition: transform var(--duration-deliberate) var(--ease);
}
.js .leaf { display: block; }
.leaf-l { left: 0; transform-origin: left center; }
.leaf-r { right: 0; transform-origin: right center; transform: scaleX(1); }
.js .portal img { transform: scale(1.05); transition: transform var(--duration-deliberate) var(--ease); }
.js .portal.open img { transform: none; }
.portal.open .leaf-l { transform: rotateY(104deg); }
.portal.open .leaf-r { transform: rotateY(-104deg); }
.portal.opened .leaf { display: none; }

@media (min-width: 640px) {
  .hero-art { width: 520px; height: 640px; }
}
@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 64px; min-height: calc(100svh - var(--header-h)); padding-top: 0; }
  .hero-copy { align-self: center; padding-block: 40px 56px; }
  .doorway { justify-self: end; width: min(calc((100svh - var(--header-h) - 64px) * .8), 42vw, 560px); margin: 40px 32px 0 0; }
  .doorway::before { left: -16px; right: -16px; top: -16px; }
  .doorway::after { left: -32px; right: -32px; top: -32px; }
  .hero-art { left: -140px; width: 520px; height: 640px; }
}

/* ---- why people come ---- */
.statement { max-width: 18em; }
.statement span { display: block; margin-top: .2em; color: var(--muted-foreground); font-style: italic; font-weight: 400; }
.reasons-body { display: grid; gap: 24px; margin-top: 32px; }
.reasons-body .lead { font-family: var(--serif); font-size: 24px; line-height: 1.25; }
.rules { margin-block: 12px 20px; border-top: 1px solid var(--border); }
.rules li { padding-block: 12px; border-bottom: 1px solid var(--border); font-family: var(--serif); font-size: 22px; line-height: 1.3; }
@media (min-width: 1024px) {
  .reasons-body { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; margin-top: 56px; }
  .reasons-body .lead { font-size: 32px; }
}

/* ---- the three words ---- */
.section-head { max-width: 42rem; }
.knot { width: 40px; height: 40px; margin-bottom: 16px; fill: none; stroke: var(--ornament); stroke-width: 3; stroke-linejoin: miter; }
.section-head .lead { margin-top: 12px; color: var(--muted-foreground); }
.words { display: grid; gap: 32px; margin-top: 40px; }
.word { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: center; align-content: start; }
.word p { margin-top: 6px; }
.window { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius-full) var(--radius-full) 0 0; background: var(--window); color: var(--window-art); }
.art { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
.art-hands { left: 5%; width: 90%; bottom: 3%; }
.rings { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--window-art); stroke-width: 1; opacity: .42; }
.rings circle { vector-effect: non-scaling-stroke; }
.art-tree { left: 8%; width: 84%; height: 88%; }
@media (min-width: 640px) {
  .word { grid-template-columns: 176px minmax(0, 1fr); gap: 28px; }
}
@media (min-width: 1024px) {
  .words { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 56px; }
  .word { grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
}

/* ---- what to expect ---- */
.split { display: grid; gap: 32px; }
.split-head .lead { margin-top: 12px; color: var(--muted-foreground); max-width: 24em; }
.split-cta { margin-top: 24px; }
.steps { border-bottom: 1px solid var(--border); }
.steps li { display: grid; gap: 4px; padding-block: 20px; border-top: 1px solid var(--border); }
@media (min-width: 768px) {
  .steps li { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding-block: 24px; align-items: baseline; }
}
@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .split-head { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* ---- meet Philip ---- */
.meet { display: grid; gap: 32px; align-items: center; }
.room { margin: 0; }
.room img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-2xl); box-shadow: 0 12px 32px -12px var(--photo-shadow); }
.room figcaption { margin-top: 10px; color: var(--muted-foreground); font-size: 16px; }
.meet-copy .lead { margin-top: 12px; }
.meet-copy p + p { margin-top: 12px; }
.meet-copy { max-width: 34em; }
.meet-copy .where { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; color: var(--muted-foreground); }
.meet-copy .where .icon { margin-top: 5px; color: var(--emblem); }
@media (min-width: 1024px) {
  .meet { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; }
}

/* ---- questions ---- */
.faq { margin-top: 24px; border-bottom: 1px solid var(--border); }
.faq details { border-top: 1px solid var(--border); interpolate-size: allow-keywords; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding-block: 14px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover h3 { color: var(--accent); }
.faq h3 { font-size: 21px; line-height: 1.3; transition: color var(--duration-default) var(--ease); }
.faq summary .icon { color: var(--muted-foreground); transition: transform var(--duration-moderate) var(--ease); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details::details-content { height: 0; overflow: hidden; transition: height var(--duration-moderate) var(--ease), content-visibility var(--duration-moderate) allow-discrete; }
.faq details[open]::details-content { height: auto; }
.faq-a { padding-bottom: 20px; max-width: 38em; color: var(--muted-foreground); }
.faq-a p + p { margin-top: 12px; }
@media (min-width: 768px) { .faq { margin-top: 32px; } .faq h3 { font-size: 23px; } }

/* ---- closing ---- */
.closing { position: relative; overflow: hidden; isolation: isolate; padding-block: 72px 64px; text-align: center; }
.closing-arches { position: absolute; z-index: -1; left: 50%; bottom: 0; width: max(1200px, 100%); height: 100%; max-width: none; transform: translateX(-50%); fill: none; stroke: var(--ornament); stroke-width: 1; opacity: .35; }
.closing-arches path { vector-effect: non-scaling-stroke; }
.closing-inner { display: flex; flex-direction: column; align-items: center; }
.closing-mark { width: 130px; height: 110px; margin-bottom: 20px; color: var(--emblem); }
.closing .lead { margin-top: 8px; color: var(--muted-foreground); }
.phone-big { display: inline-flex; align-items: center; min-height: 48px; margin-top: 20px; font: 500 clamp(32px, 10vw, 72px)/1.1 var(--serif); font-variant-numeric: lining-nums; color: var(--accent); text-decoration: none; white-space: nowrap; transition: color var(--duration-default) var(--ease); border-radius: var(--radius-md); }
.phone-big:hover { color: var(--foreground); }
.phone-local { margin-top: 4px; color: var(--muted-foreground); }
.closing .actions { margin-top: 24px; width: min(100%, 320px); }
@media (min-width: 640px) { .closing .actions { width: auto; } }
@media (min-width: 1024px) { .closing { padding-block: 96px 88px; } .closing-mark { width: 150px; height: 128px; } }

/* ---- footer ---- */
.foot { display: grid; gap: 28px; padding-block: 48px 32px; }
.foot-emblem { width: 150px; height: 160px; color: var(--emblem); }
.foot-about { color: var(--muted-foreground); }
.foot-name { font: 500 24px/1.2 var(--serif); color: var(--foreground); margin-bottom: 4px; }
.foot-place { margin-top: 12px; }
.foot-about .link { display: inline-flex; align-items: center; min-height: 44px; }
.theme legend { margin-bottom: 8px; padding: 0; color: var(--muted-foreground); }
.segments { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 3px; }
.segments label { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 5px; color: var(--muted-foreground); font-size: 16px; cursor: pointer; transition: background-color var(--duration-default) var(--ease), color var(--duration-default) var(--ease); }
.segments input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.segments label:hover { color: var(--foreground); }
.segments label:has(input:checked) { background: var(--hover); color: var(--foreground); }
.segments label:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.foot-small { display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between; padding-block: 16px 32px; color: var(--muted-foreground); font-size: 16px; }
@media (min-width: 768px) {
  .foot { grid-template-columns: auto minmax(0, 1fr) auto; gap: 48px; align-items: start; }
}

/* ---- call bar on phones ---- */
.callbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); visibility: hidden; transform: translateY(100%); transition: transform var(--duration-moderate) var(--ease), visibility var(--duration-moderate); }
.callbar.show { visibility: visible; transform: none; }
@media (min-width: 768px) { .callbar { display: none; } }

/* ---- menu sheet ---- */
.sheet { width: 100%; max-width: 100%; margin: auto 0 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.sheet[open] { animation: sheet-in var(--duration-slow) var(--ease); }
.sheet::backdrop { background: var(--scrim); animation: fade-in var(--duration-moderate) var(--ease); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-nav { display: grid; margin-block: 8px 16px; }
.sheet-nav a { display: flex; align-items: center; min-height: 52px; font: 500 24px/1 var(--serif); text-decoration: none; border-top: 1px solid var(--border); }
.sheet .btn { width: 100%; }
@media (min-width: 640px) {
  .sheet { max-width: 480px; margin: auto; border-radius: var(--radius-xl); padding: 16px 24px 24px; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }

/* ---- 404 ---- */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; }
.lost-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-block: 48px; }
.lost .lead { color: var(--muted-foreground); max-width: 26em; }
.lost .btn { margin-top: 8px; }

/* ---- motion preferences ---- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .leaf { display: none; }
  .js .portal img { transform: none; }
}
