@font-face {
  font-family: "Tobias";
  src: url("../assets/fonts/Tobias-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  transition: background-color 400ms ease;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--body);
  line-height: 1.5;
  letter-spacing: -0.011em;
  color: var(--text);
  transition: color 400ms ease;
}

/* While the theme toggle is switching, every surface crossfades
   together instead of snapping color by color */
html.theme-fade *,
html.theme-fade *::before,
html.theme-fade *::after {
  transition:
    background-color 450ms ease,
    border-color 450ms ease,
    color 450ms ease,
    fill 450ms ease,
    stroke 450ms ease !important;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

h1 {
  font-size: var(--display);
  font-weight: 300;
  line-height: 1.12;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 4;
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--header-bg-scrolled);
  backdrop-filter: blur(10px) saturate(140%);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 250ms ease,
    transform 250ms ease,
    visibility 250ms ease,
    border-color 250ms ease;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top-label {
  max-width: 0;
  margin-left: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition:
    max-width 350ms ease,
    margin-left 350ms ease,
    opacity 250ms ease;
}

.to-top:hover .to-top-label,
.to-top:focus-visible .to-top-label {
  max-width: 110px;
  margin-left: 8px;
  opacity: 1;
}

.to-top:hover {
  border-color: transparent;
}

.to-top::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--ring-grad);
  background-size: 300% 100%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
}

.to-top:hover::after {
  opacity: 1;
  animation: to-top-flow 5s linear infinite;
}

@keyframes to-top-flow {
  to {
    background-position: 300% 0;
  }
}

.to-top svg {
  width: 18px;
  height: 18px;
}

h2 {
  font-size: var(--h2);
}

h3 {
  font-size: var(--h3);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h4 {
  font-size: var(--h4);
}

.eyebrow {
  margin: 0 0 var(--space-5);
  color: var(--muted);
  font-size: var(--meta);
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.lede {
  max-width: var(--text-width);
  color: var(--muted);
  font-size: var(--subtitle);
  font-weight: 400;
  line-height: 1.5;
}

.wrap {
  width: min(var(--page), calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 16px;
  right: 0;
  left: 0;
  z-index: 5;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hide on scroll down, reveal on scroll up (Jemm / Leo behavior) */
.site-header.nav-hide {
  transform: translateY(calc(-100% - 20px));
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: 72px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  transition:
    min-height 350ms ease,
    padding 350ms ease,
    background-color 350ms ease,
    border-color 350ms ease,
    box-shadow 350ms ease;
}

.site-header.scrolled .nav {
  min-height: 68px;
  padding: 10px 12px 10px 24px;
  border-color: var(--hairline);
  background: var(--header-bg-scrolled);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.nav-logo {
  display: flex;
  align-items: center;
  margin-right: auto;
}

.nav-logo,
.footer-logo {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.nav a.nav-logo {
  font-size: 17px;
  text-transform: none;
}

.footer-logo {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 300;
}

.nav a {
  color: var(--muted);
  font-size: var(--small);
}

.nav a[aria-current="page"] {
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: transparent;
  color: var(--btn-text);
  font: 600 var(--small) / 1 var(--font);
  letter-spacing: 0;
  cursor: pointer;
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease;
}

.button:hover {
  border-color: transparent;
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
}

.button:active {
  border-color: transparent;
  background: var(--btn-active-bg);
  color: var(--btn-active-text);
}

/* Keyboard focus: a gradient ring that follows each element's own
   shape (round stays round, pill stays pill) and slowly rotates.
   Emerald to turquoise in dark mode, amethyst to pink to yellow in
   light mode. */
@property --focus-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes focus-spin {
  to {
    --focus-angle: 360deg;
  }
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  position: relative;
}

a:focus-visible::after,
button:focus-visible::after,
[tabindex]:focus-visible::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 2px;
  background: var(--focus-grad);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: focus-spin 6s linear infinite;
  pointer-events: none;
}

/* Scroll containers (slideshows) get an inset ring instead: a floating
   ring would scroll away with their content */
.travel-strip:focus-visible,
.filmstrip-bleed:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--focus-mid);
}

.travel-strip:focus-visible::after,
.filmstrip-bleed:focus-visible::after {
  content: none;
}

/* Text links get a snug rounded ring rather than a square one */
.footer-nav a,
.footer-social a,
.nda-note a {
  border-radius: 6px;
}

iframe:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-mid);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
  font-size: var(--small);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.hero,
.page {
  padding: 200px 0 var(--space-9);
}

.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--space-9) 0 var(--space-7);
  color: var(--muted);
  font-size: var(--small);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: -72px -8%;
  z-index: -1;
  filter: blur(64px);
  background: radial-gradient(
    ellipse 42% 95% at 50% 112%,
    var(--foot-glow-strong),
    var(--foot-glow-deep) 58%,
    transparent 100%
  );
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--hairline);
}

.footer-nav {
  display: flex;
  gap: var(--space-6);
}

.footer-nav a,
.footer-social a {
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 500;
}

.footer-nav a:hover,
.footer-social a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-6);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-weight: 600;
  /* Grow to the full row width so the back-to-top button's auto margin
     can push it to the far right, clear of the links */
  flex: 1;
}

/* The back-to-top button lives on the footer social row, pushed right
   on its own: no floating, no scroll reveal, always visible there */
.footer-social .to-top {
  position: static;
  flex: none;
  margin-left: auto;
  opacity: 1;
  visibility: visible;
  transform: none;
}

@media (max-width: 720px) {
  .nav {
    gap: var(--space-4);
  }

  .nav a:not(.nav-logo):not(.button) {
    display: none;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-social {
    width: 100%;
  }
}

/* ---- Mobile nav: menu button + glass panel (Jemm-style) ---- */
.nav-menu-btn {
  display: none;
}

.nav-panel {
  display: none;
}

@media (max-width: 720px) {
  .nav-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }

  .nav-menu-btn svg {
    width: 20px;
    height: 20px;
  }

  .nav-menu-btn .icon-close {
    display: none;
  }

  .site-header.menu-open .nav-menu-btn .icon-open {
    display: none;
  }

  .site-header.menu-open .nav-menu-btn .icon-close {
    display: block;
  }

  .nav-panel {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--hairline);
    border-radius: 24px;
    background: var(--header-bg-scrolled);
    backdrop-filter: blur(10px) saturate(140%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  }

  .site-header.menu-open .nav-panel {
    display: block;
  }

  .panel-cta {
    display: none;
  }
}

/* ---- Nav: links hidden on mobile (menu instead); open pills on desktop ---- */
@media (max-width: 720px) {
  .nav > a:not(.nav-logo):not(.button) {
    display: none;
  }
}

.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-menu-btn svg {
  width: 20px;
  height: 20px;
}

.nav-menu-btn .icon-close {
  display: none;
}

.site-header.menu-open .nav-menu-btn .icon-open {
  display: none;
}

.site-header.menu-open .nav-menu-btn .icon-close {
  display: block;
}

.nav-panel {
  display: block;
  position: absolute;
  top: calc(100% + 8px);
  right: max(24px, calc((100% - var(--page)) / 2));
  width: min(340px, calc(100vw - 48px));
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 250ms ease,
    transform 250ms ease,
    visibility 250ms;
}

.site-header.menu-open .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.panel-cta {
  display: none;
}

@media (max-width: 720px) {
  .nav .button {
    display: none;
  }

  .nav {
    position: relative;
    z-index: 2;
  }

  .nav-panel {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: auto;
    padding: 120px 32px 40px;
    border: 0;
    border-radius: 0;
    background: var(--header-bg);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: none;
  }

  .nav-panel a:not(.panel-cta) {
    padding: 24px 0;
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 300;
    color: var(--muted);
  }

  .nav-panel a[aria-current="page"] {
    color: var(--text);
  }

  .site-header.menu-open .nav-panel {
    display: flex;
    flex-direction: column;
  }

  .nav-panel a.panel-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-height: 56px;
    margin-top: auto;
    padding: 0 36px;
    font-size: var(--body);
    text-align: center;
  }

  body:has(.site-header.menu-open) {
    overflow: hidden;
  }
}

.nav-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  font-size: var(--body);
  font-weight: 600;
}

.nav-panel a[aria-current="page"] {
  color: var(--text);
}

.nav-panel a:hover {
  background: var(--surface);
  color: var(--text);
}

/* ---- Desktop nav: open pill links; compact bar on scroll ---- */
.nav a.nav-link {
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  transition:
    padding 350ms ease,
    background-color 200ms ease,
    border-color 200ms ease,
    color 200ms ease;
}

.nav a.nav-link:hover {
  border-color: var(--hairline);
  background: var(--header-bg);
  color: var(--text);
}

.nav a.nav-link[aria-current="page"] {
  color: var(--text);
}
.nav a.nav-link:active {
  border-color: var(--hairline);
  background: var(--header-bg);
}

.site-header.scrolled .nav {
  min-height: 56px;
  padding: 6px 8px 6px 20px;
}

.site-header.scrolled .nav a.nav-link {
  padding: 6px 12px;
}

.site-header.scrolled .button {
  min-height: 38px;
}

@media (min-width: 721px) {
  .nav-menu-btn {
    display: none;
  }

  .nav-panel {
    display: none;
  }
}

/* ---- Alabaster: shadows stay subtle, never dark ---- */
:root[data-theme="alabaster"] .site-header.scrolled .nav,
:root[data-theme="alabaster"] .nav-panel {
  box-shadow: 0 12px 32px rgba(18, 18, 18, 0.1);
}

:root[data-theme="alabaster"] .to-top {
  box-shadow: 0 6px 18px rgba(18, 18, 18, 0.08);
}
