/* Shared mobile-first navigation and page shell. */
:root {
  --shell-ink: #141613;
  --shell-paper: #f0e9db;
  --shell-muted: #99998e;
  --shell-accent: #e0bc4c;
  --shell-line: rgba(244,241,232,.17);
  --shell-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body { background: var(--shell-paper); color: var(--shell-ink); font-family: Manrope, Arial, sans-serif; }
.site-shell { min-height: 100svh; overflow: visible; padding-bottom: calc(72px + var(--shell-safe-bottom)); }
body.home-experience { overflow: auto; overscroll-behavior-y: auto; scroll-snap-type: none; }
html:has(body.home-experience) { scroll-snap-type: none; }
.home-experience .site-shell, .home-experience .journey { height: auto; overflow: visible; }
.home-experience .journey__track { display: block; width: 100%; height: auto; transform: none !important; transition: none !important; }
.home-experience .home-slide { width: 100%; min-height: 100svh; height: auto; scroll-snap-align: none; }

.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(20,22,19,.1);
  background: rgba(244,241,232,.92);
  color: var(--shell-ink);
  backdrop-filter: blur(16px);
}
.site-brand { display: inline-flex; align-items: center; gap: 9px; color: inherit; font-size: 14px; font-weight: 800; letter-spacing: -.045em; white-space: nowrap; }
.site-brand__seal { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; }
.site-header__nav { display: none; }
.site-header__menu { display: none; }
.site-menu-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.mobile-dock {
  position: fixed;
  z-index: 90;
  right: 10px;
  bottom: calc(9px + var(--shell-safe-bottom));
  left: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 58px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  background: rgba(20,22,19,.96);
  box-shadow: 0 13px 45px rgba(20,22,19,.2);
  color: var(--shell-paper);
  backdrop-filter: blur(18px);
}
.mobile-dock__item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(244,241,232,.6);
  cursor: pointer;
  font: inherit;
  transition: color .2s ease, background .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.mobile-dock__item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.mobile-dock__item span { max-width: 100%; overflow: hidden; font-size: 8px; font-weight: 700; letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap; }
.mobile-dock__item:hover { color: var(--shell-paper); }
.mobile-dock__item[aria-current="page"], .mobile-dock__item[aria-expanded="true"] { color: var(--shell-accent); background: rgba(207,219,104,.12); }
.mobile-dock__item:active { transform: scale(.96); }

.site-menu {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: rgba(10,12,10,.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
}
.site-menu.is-open { opacity: 1; visibility: visible; }
.site-menu__panel {
  width: min(100%, 540px);
  max-height: min(84dvh, 760px);
  overflow-y: auto;
  padding: 22px 20px calc(20px + var(--shell-safe-bottom));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 26px;
  background: var(--shell-ink);
  color: var(--shell-paper);
  transform: translateY(20px);
  transition: transform .32s cubic-bezier(.2,.7,.2,1);
  overscroll-behavior: contain;
}
.site-menu.is-open .site-menu__panel { transform: none; }
.site-menu__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.site-menu__eyebrow { margin: 0; color: var(--shell-muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.site-menu__top h2 { margin: 7px 0 0; font-size: clamp(27px,7vw,38px); line-height: .98; letter-spacing: -.06em; }
.site-menu__close { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border: 1px solid var(--shell-line); border-radius: 50%; background: transparent; color: var(--shell-paper); cursor: pointer; }
.site-menu__close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.site-menu__links { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); border-top: 1px solid var(--shell-line); }
.site-menu__link { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 8px 13px 0; border-bottom: 1px solid var(--shell-line); color: var(--shell-paper); font-size: 14px; font-weight: 700; transition: color .2s ease; }
.site-menu__link:nth-child(odd) { margin-right: 14px; }
.site-menu__link:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--shell-line); }
.site-menu__link:hover, .site-menu__link:focus-visible { color: var(--shell-accent); }
.site-menu__link small { color: var(--shell-muted); font-size: 9px; font-weight: 500; }
.site-menu__projects { display: grid; gap: 8px; margin-top: 24px; }
.site-menu__projects h2 { margin: 0 0 5px; color: var(--shell-muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.site-menu__project { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--shell-line); color: var(--shell-paper); font-size: 13px; font-weight: 700; }
.site-menu__project span:last-child { color: var(--shell-accent); font-size: 11px; }
.site-menu__contact { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 14px 16px; border-radius: 13px; background: var(--shell-accent); color: var(--shell-ink); font-size: 12px; font-weight: 800; }
body.menu-open { overflow: hidden; }

.site-footer { padding: 35px 20px 26px; background: var(--shell-ink); color: var(--shell-paper); }
.site-footer__inner { width: min(100%, 1280px); margin: 0 auto; }
.site-footer__brand { margin-bottom: 25px; }
.site-footer__nav { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 16px; border-top: 1px solid var(--shell-line); }
.site-footer__nav a { padding: 13px 0; border-bottom: 1px solid var(--shell-line); color: rgba(244,241,232,.75); font-size: 12px; font-weight: 600; }
.site-footer__nav a:hover, .site-footer__end a:hover { color: var(--shell-accent); }
.site-footer__end { display: flex; justify-content: space-between; gap: 16px; margin-top: 23px; color: var(--shell-muted); font-size: 9px; line-height: 1.5; }
.site-footer__end a { color: var(--shell-paper); }
.journey-progress { display: none !important; }

.site-header a:focus-visible, .site-header button:focus-visible, .mobile-dock__item:focus-visible, .site-menu a:focus-visible, .site-menu button:focus-visible { outline: 2px solid var(--shell-accent); outline-offset: 3px; }
.site-header__nav a[aria-current="page"] { color: #68721c; }
.mobile-dock[hidden] { display: none; }

@media (min-width: 720px) {
  .site-shell { padding-bottom: 0; }
  .site-header { min-height: 76px; padding-inline: clamp(24px,5vw,76px); }
  .site-header__nav { display: flex; align-items: center; gap: clamp(17px,2.8vw,42px); }
  .site-header__nav a, .site-header__menu { border: 0; background: transparent; color: inherit; font-size: 11px; font-weight: 700; letter-spacing: .045em; cursor: pointer; transition: color .2s ease; }
  .site-header__nav a:hover, .site-header__menu:hover { color: #68721c; }
  .site-header__contact { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 17px; border: 1px solid rgba(20,22,19,.3) !important; border-radius: 99px; }
  .site-header__menu { display: inline-flex; align-items: center; gap: 7px; }
  .site-menu { align-items: center; padding: 30px; backdrop-filter: blur(7px); }
  .site-menu__panel { width: min(100%, 720px); max-height: min(82dvh, 800px); padding: 30px; border-radius: 24px; }
  .site-menu__link { min-height: 72px; font-size: 17px; }
  .site-menu__projects { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
  .site-menu__projects h2 { grid-column: 1/-1; }
  .site-menu__project { align-items: flex-start; flex-direction: column; min-height: 74px; }
  .mobile-dock { display: none; }
  .site-footer { padding: 54px clamp(24px,5vw,76px) 30px; }
  .site-footer__inner { display: grid; grid-template-columns: .7fr 1.3fr; gap: 20px 48px; }
  .site-footer__brand { align-self: start; margin: 0; }
  .site-footer__nav { grid-column: 2; grid-row: 1 / span 2; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .site-footer__end { grid-column: 1; align-self: end; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
