:root {
  color-scheme: light;
  font-family: "DM Sans", Arial, sans-serif;
  color: #071b35;
  background: #f6f8fb;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: rgb(7 27 53 / 0.96);
  box-shadow: 0 10px 24px rgb(2 6 23 / 0.12);
  backdrop-filter: blur(14px);
}

::view-transition-new(root) {
  animation: theme-reveal 650ms ease both;
}

::view-transition-old(root) {
  animation: none;
}

@keyframes theme-reveal {
  from {
    clip-path: circle(0 at calc(100% - 3rem) 2.5rem);
  }
  to {
    clip-path: circle(150vmax at calc(100% - 3rem) 2.5rem);
  }
}

.site-nav {
  position: relative;
  display: flex;
  width: min(100% - 2.5rem, 80rem);
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.brand img,
.footer-brand img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
}

.site-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.site-nav-links a {
  position: relative;
  padding: 0.65rem 0.75rem;
  color: #f8fafc;
  text-decoration: none;
  transition: color 200ms ease;
}

.site-nav-links a:not(.nav-quote)::after {
  position: absolute;
  right: 0.75rem;
  bottom: 0.35rem;
  left: 0.75rem;
  height: 2px;
  background: #f5b800;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.site-nav-links a:hover,
.site-nav-links a:focus-visible {
  color: #f5b800;
}

.site-nav-links a:not(.nav-quote):hover::after,
.site-nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav-links .nav-quote {
  --_surface: #f5b800;
  --_foreground: #071b35;
  margin-left: 0.5rem;
  padding: 0;
  border-radius: 0.35rem;
  color: #071b35;
  background: transparent;
  font-weight: 700;
}

.nav-quote span {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0.625rem 1.25rem;
  border-radius: inherit;
  transition:
    background-color 220ms ease,
    backdrop-filter 220ms ease,
    translate 220ms ease;
}

.glassy-button {
  --_surface: var(--button-surface, #f5b800);
  --_foreground: var(--button-foreground, #071b35);
  --_x-motion: 0px;
  --_y-motion: 0px;
  --_motion-factor: 0.1;
  position: relative;
  isolation: isolate;
}

.glassy-button::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: color-mix(in srgb, var(--_surface) 82%, transparent);
  content: "";
  animation: glassy-button-exit 220ms forwards;
}

.glassy-button:hover::after,
.glassy-button:focus-visible::after {
  scale: 0.95;
  translate: 0 0.125rem;
  animation: glassy-button-enter 220ms forwards;
}

.glassy-button:active::after {
  scale: 0.875;
  translate: 0 0.25rem;
}

.glassy-button:hover span,
.glassy-button:focus-visible span {
  outline: 1px solid rgb(255 255 255 / 0.55);
  background: rgb(255 255 255 / 0.25);
  backdrop-filter: blur(5px);
  translate: 0 -0.35rem;
}

.glassy-button:active span {
  background: rgb(255 255 255 / 0.15);
  backdrop-filter: blur(10px);
  translate: 0 -0.2rem;
}

.glassy-button:focus-visible {
  outline: 3px solid #f5b800;
  outline-offset: 4px;
}

.glassy-button > span::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 171 171' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3.74' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.glassy-button:hover span::before,
.glassy-button:focus-visible span::before {
  opacity: 0.3;
}

@keyframes glassy-button-enter {
  to {
    transform: translate(
      calc(var(--_x-motion) * var(--_motion-factor) * -1),
      calc(var(--_y-motion) * var(--_motion-factor) * -1)
    );
  }
}

@keyframes glassy-button-exit {
  from {
    transform: translate(
      calc(var(--_x-motion) * var(--_motion-factor) * -1),
      calc(var(--_y-motion) * var(--_motion-factor) * -1)
    );
  }
  to {
    transform: translate(0, 0);
  }
}

.site-nav-links .nav-quote:hover,
.site-nav-links .nav-quote:focus-visible {
  color: #071b35;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-icon-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 0.75rem;
  color: #fff;
  background: rgb(255 255 255 / 0.12);
  cursor: pointer;
  transition:
    background-color 200ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.nav-icon-button:hover {
  transform: translateY(-2px);
  background: rgb(255 255 255 / 0.22);
  box-shadow: 0 8px 18px rgb(0 0 0 / 0.18);
}

.nav-icon-button:active {
  transform: scale(0.97);
}

.nav-icon-button svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-icon-sun {
  display: none;
}

.menu-toggle {
  display: none;
}

.nav-icon-button:focus-visible,
.site-nav a:focus-visible {
  outline: 3px solid #f5b800;
  outline-offset: 3px;
}

html.dark {
  color-scheme: dark;
}

html.dark body {
  color: #e2e8f0;
  background: #0b1423;
}

html.dark .detail-main {
  color: #f1f5f9;
}

html.dark .detail-description,
html.dark .breadcrumbs {
  color: #cbd5e1;
}

html.dark .breadcrumbs a {
  color: #f5b800;
}

html.dark #theme-toggle .theme-icon-moon {
  display: none;
}

html.dark #theme-toggle .theme-icon-sun {
  display: block;
}

.detail-main {
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.breadcrumbs {
  margin: 0 0 1.5rem;
  color: #64748b;
  font-size: 0.95rem;
}

.breadcrumbs a {
  color: #0d2e56;
}

.detail-heading {
  max-width: 52rem;
  margin-bottom: 2rem;
}

.detail-category {
  margin: 0 0 0.75rem;
  color: #9a7000;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-heading h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.12;
}

.detail-description {
  max-width: 48rem;
  margin: 1rem 0 0;
  color: #475569;
  font-size: 1.1rem;
  line-height: 1.7;
}

.detail-gallery {
  overflow: hidden;
  border-radius: 0.75rem;
  background: #e2e8f0;
  box-shadow: 0 18px 45px rgb(7 27 53 / 0.15);
}

.gallery-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #dbe3ec;
}

.gallery-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 500ms ease;
}

.gallery-frame img.is-active {
  opacity: 1;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #071b35;
  background: rgb(255 255 255 / 0.9);
  font-size: 1.5rem;
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background-color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.gallery-arrow:hover {
  background: #f5b800;
  box-shadow: 0 8px 18px rgb(0 0 0 / 0.18);
  transform: translateY(calc(-50% - 2px));
}

.gallery-arrow:active {
  transform: translateY(-50%) scale(0.97);
}

.gallery-arrow:focus-visible,
.gallery-dot:focus-visible,
.back-link:focus-visible,
.site-nav a:focus-visible {
  outline: 3px solid #f5b800;
  outline-offset: 3px;
}

.gallery-arrow-previous {
  left: 1rem;
}

.gallery-arrow-next {
  right: 1rem;
}

.gallery-footer {
  display: flex;
  min-height: 3.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  color: #fff;
  background: #071b35;
}

.gallery-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gallery-dot {
  width: 0.65rem;
  height: 0.65rem;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    transform 220ms ease;
}

.gallery-dot:hover {
  transform: scale(1.12);
}

.gallery-dot[aria-pressed="true"] {
  border-color: #f5b800;
  background: #f5b800;
}

.representative-image {
  display: block;
  width: 100%;
  max-height: 42rem;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  object-fit: cover;
  box-shadow: 0 18px 45px rgb(7 27 53 / 0.15);
}

.image-note {
  margin: 0.75rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.detail-video {
  margin-top: 2.5rem;
}

.detail-video h2 {
  margin: 0 0 1rem;
  font-family: Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.detail-video video {
  display: block;
  width: 100%;
  max-height: 42rem;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  background: #071b35;
  box-shadow: 0 18px 45px rgb(7 27 53 / 0.15);
}

.back-link {
  --_surface: #f5b800;
  --_foreground: #071b35;
  display: inline-block;
  margin-top: 2rem;
  border-radius: 0.35rem;
  color: #071b35;
  background: transparent;
  font-weight: 700;
  text-decoration: none;
}

.back-link span {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0.8rem 1.1rem;
  border-radius: inherit;
  transition:
    background-color 220ms ease,
    backdrop-filter 220ms ease,
    translate 220ms ease;
}

.detail-cta {
  padding: 3.5rem 1rem;
  color: #071b35;
  background: #f5b800;
}

.detail-cta-content {
  display: flex;
  width: min(100%, 72rem);
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 auto;
}

.detail-cta h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.detail-cta p {
  margin: 0.5rem 0 0;
  line-height: 1.6;
}

.detail-cta-link {
  --_surface: #071b35;
  --_foreground: #fff;
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 0.35rem;
  color: #fff;
  background: transparent;
  font-weight: 700;
  text-decoration: none;
}

.detail-cta-link span {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0.875rem 1.5rem;
  border-radius: inherit;
  transition:
    background-color 220ms ease,
    backdrop-filter 220ms ease,
    translate 220ms ease;
}

.detail-cta-link:hover,
.detail-cta-link:focus-visible {
  color: #fff;
}

.detail-cta-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.site-footer {
  padding: 3rem 1rem 1.5rem;
  color: #cbd5e1;
  background: #041225;
}

.footer-content {
  display: grid;
  width: min(100%, 72rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  margin: 0 auto;
}

.footer-content h2 {
  margin: 0 0 1rem;
  color: #fff;
  font-size: 1.25rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-about p,
.footer-content section > p {
  color: #94a3b8;
  line-height: 1.65;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.footer-content a:not(.footer-brand) {
  color: #94a3b8;
}

.footer-content a:hover {
  color: #f5b800;
}

.footer-content nav a,
.footer-content section > a:not(.footer-brand) {
  transition:
    color 200ms ease,
    transform 200ms ease;
}

.footer-content nav a:hover,
.footer-content section > a:not(.footer-brand):hover {
  transform: translateX(4px);
}

.footer-content section,
.footer-copyright {
  transition:
    opacity 850ms ease,
    translate 850ms cubic-bezier(0.2, 0.7, 0.2, 1),
    scale 850ms cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.footer-content .scroll-reveal,
.footer-copyright.scroll-reveal {
  opacity: 0;
  translate: 0 44px;
  scale: 0.96;
}

.footer-content .scroll-reveal.is-visible,
.footer-copyright.scroll-reveal.is-visible {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

.footer-copyright {
  width: min(100%, 72rem);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  color: #94a3b8;
  font-size: 0.875rem;
  text-align: center;
}

@media (max-width: 640px) {
  .detail-main {
    padding-top: 2rem;
  }

  .gallery-frame {
    aspect-ratio: 4 / 3;
  }

  .gallery-arrow {
    width: 2.4rem;
    height: 2.4rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .detail-cta-content {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 1023px) {
  .site-nav-links {
    position: absolute;
    top: 100%;
    right: -1.25rem;
    left: -1.25rem;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem 1.25rem;
    background: #071b35;
    box-shadow: 0 14px 18px rgb(2 6 23 / 0.18);
  }

  .site-nav-links.open {
    display: flex;
  }

  .site-nav-links .nav-quote {
    align-self: flex-start;
    margin: 0.5rem 0 0;
  }

  .menu-toggle {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-new(root) {
    animation: none;
  }

  .gallery-frame img,
  .glassy-button,
  .glassy-button::after,
  .glassy-button > span,
  .glassy-button > span::before,
  .site-nav-links a,
  .site-nav-links a::after,
  .nav-icon-button,
  .gallery-arrow,
  .gallery-dot,
  .footer-content nav a,
  .footer-content section > a:not(.footer-brand),
  .footer-content section,
  .footer-copyright {
    transition: none;
  }

  .footer-content .scroll-reveal,
  .footer-copyright.scroll-reveal {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}
