/**
 * Apple-style continuous corner frame for AAT internal pages.
 * Outer navy canvas + cream shell with large device-like radii.
 */
:root {
  --frame: clamp(6px, 1.4vw, 14px);
  --shell-radius: clamp(26px, 3.8vw, 44px);
  --cream: #FAF8F4;
  --aqua: #EFF8FA;
  --navy: #0C1F2E;
  --navy-deep: #07131c;
  --navy-muted: #4A657A;
  --teal: #006B7D;
  --teal-mid: #1FA8BE;
  --coral: #D6451B;
  --coral-hot: #EE5A2E;
  --font-d: "Manrope", system-ui, sans-serif;
  --font-b: "Inter", system-ui, sans-serif;
  --radius: 28px;
  --radius-lg: 36px;
  --shadow: 0 20px 50px -15px rgba(12, 31, 46, 0.08);
}

html {
  background: var(--navy-deep);
  min-height: 100%;
}

body.framed {
  margin: 0;
  min-height: 100svh;
  padding: var(--frame);
  background: var(--navy-deep);
  color: var(--navy);
  font-family: var(--font-b);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.shell {
  position: relative;
  background: var(--cream);
  border-radius: var(--shell-radius);
  overflow: clip;
  min-height: calc(100svh - (2 * var(--frame)));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 80px -30px rgba(0, 0, 0, 0.55);
}

/* Fixed chrome sits inside the curved frame */
.framed .nav {
  top: calc(var(--frame) + 12px);
  left: calc(var(--frame) + 12px);
  right: calc(var(--frame) + 12px);
  max-width: none;
  width: auto;
  margin: 0 auto;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

/* Hi-res logo stays crisp when scaled in the nav */
.framed .nav img {
  height: 34px;
  width: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

/* Auto-hide: tuck away on scroll down, return on scroll up */
.framed .nav.is-hidden {
  transform: translateY(calc(-100% - 28px));
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 1180px) {
  .framed .nav {
    left: max(calc(var(--frame) + 12px), calc(50% - 560px));
    right: max(calc(var(--frame) + 12px), calc(50% - 560px));
  }
}

/* Soft continuous-corner vignette (display edge feel) */
.shell::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(12, 31, 46, 0.06);
  z-index: 60;
}

@media (max-width: 520px) {
  :root {
    --frame: 4px;
    --shell-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell { scroll-behavior: auto; }
  .framed .nav {
    transition: none;
  }
  .framed .nav.is-hidden {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
}
