/* ==========================================================================
   Pavilion XCIX: design tokens and base
   Values come from brand/tokens.json. Dusk is the default theme.
   ========================================================================== */

@font-face {
  font-family: "Michroma";
  src: url("../fonts/Michroma-400.bdb83203073a.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-400.1589a53d0b0e.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-600.58d382c3e448.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-800.63c74bc8894a.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  /* Brand colors */
  --atrium-teal: #5cc6b8;
  --carpet-purple: #5a3a8e;
  --sunset-orange: #f2884b;
  --signal-lime: #d2f25c;
  --dusk-ink: #16132a;
  --skylight: #f4efe4;
  --teal-deep: #1f6e68;
  --teal-soft: #bfe9e2;
  --purple-soft: #d3c6ee;
  --orange-soft: #fbd3b6;
  --sunset-mid: #c0566e;
  --sunset: linear-gradient(135deg, var(--carpet-purple) 0%, var(--sunset-mid) 55%, var(--sunset-orange) 100%);
  --horizon: linear-gradient(90deg, var(--atrium-teal) 0%, var(--purple-soft) 50%, var(--sunset-orange) 100%);

  /* Type */
  --font-display: Michroma, "Eurostile", "Microgramma", system-ui, sans-serif;
  --font-body: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 72px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --container: 1180px;
  --gutter: 24px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fade: 700ms;
  --quick: 220ms;
}

/* Dusk (default) */
:root,
[data-theme="dusk"] {
  color-scheme: dark;
  --surface: #16132a;
  --surface-raised: #252040;
  --surface-sunken: #110f22;
  --surface-hover: #2c2650;
  --text: #f4efe4;
  --text-muted: #b7b0c9;
  --accent: #5cc6b8;
  --on-accent: #16132a;
  --link: #5cc6b8;
  --line: #352e52;
  --line-strong: #857da9;
  --focus-ring: #d2f25c;
  --danger: #f2884b;
  --success: #5cc6b8;
  --warning: #d2f25c;
  --shadow-panel: 0 12px 40px rgba(0, 0, 0, 0.45);
  --glass: rgba(22, 19, 42, 0.62);
  --glass-line: rgba(244, 239, 228, 0.18);
  --header-bg: rgba(22, 19, 42, 0.86);
  --selection: rgba(92, 198, 184, 0.35);

  --sky: linear-gradient(180deg, #16132a 0%, #2e2156 52%, #8a3f6a 88%, #f2884b 100%);
  --floor: #16132a;
  --grid-line: rgba(92, 198, 184, 0.55);
  --arch-line: #f4efe4;
  --horizon-glow: #f2884b;
}

/* Skylight */
[data-theme="skylight"] {
  color-scheme: light;
  --surface: #f4efe4;
  --surface-raised: #fffaf0;
  --surface-sunken: #ece5d6;
  --surface-hover: #f8f2e6;
  --text: #16132a;
  --text-muted: #5b5670;
  --accent: #5a3a8e;
  --on-accent: #f4efe4;
  --link: #5a3a8e;
  --line: #ddd5c6;
  --line-strong: #7d735f;
  --focus-ring: #1f6e68;
  --danger: #a3431b;
  --success: #1f6e68;
  --warning: #7a5a00;
  --shadow-panel: 0 12px 32px rgba(22, 19, 42, 0.12);
  --glass: rgba(244, 239, 228, 0.7);
  --glass-line: rgba(22, 19, 42, 0.18);
  --header-bg: rgba(244, 239, 228, 0.9);
  --selection: rgba(90, 58, 142, 0.22);

  --sky: linear-gradient(180deg, #dff3ef 0%, #f4efe4 70%, #fbd3b6 100%);
  --floor: #ece6f3;
  --grid-line: rgba(90, 58, 142, 0.35);
  --arch-line: #1f6e68;
  --horizon-glow: #fbd3b6;
}

/* --------------------------------------------------------------------------
   Reset and base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

::selection {
  background: var(--selection);
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--quick) var(--ease);
}

a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 800;
  line-height: 1.25;
  text-wrap: balance;
}

p {
  margin: 0 0 var(--space-3);
  text-wrap: pretty;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-5) 0;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-md);
  font-weight: 800;
  text-decoration: none;
}

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

/* --------------------------------------------------------------------------
   Type styles
   -------------------------------------------------------------------------- */

.display-xl,
.display-l,
.display-m,
.label {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
}

.display-xl {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.11;
  letter-spacing: 0.04em;
}

.display-l {
  font-size: clamp(28px, 4.2vw, 48px);
  line-height: 1.17;
  letter-spacing: 0.04em;
}

.display-m {
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.29;
  letter-spacing: 0.05em;
}

.label {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.22em;
}

.title {
  font-size: 22px;
  line-height: 30px;
  font-weight: 800;
}

.descriptor {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.body-l {
  font-size: 18px;
  line-height: 28px;
}

.caption {
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  color: var(--text-muted);
}

.muted {
  color: var(--text-muted);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
}

.kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* The horizon rule: the one place the sunset gradient lives in the UI. */
.horizon {
  position: relative;
  height: 2px;
  border: 0;
  margin: var(--space-5) 0;
  background: var(--horizon);
  border-radius: 2px;
  overflow: visible;
}

.horizon::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--signal-lime);
}

[data-theme="skylight"] .horizon::after {
  background: var(--sunset-orange);
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.fade-in {
  animation: fade-up var(--fade) var(--ease) both;
}

.fade-in--late {
  animation-delay: 160ms;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Utilities (the CSP forbids inline style attributes)
   -------------------------------------------------------------------------- */

.m-0 {
  margin: 0 !important;
}

.mt-2 {
  margin-top: var(--space-2) !important;
}

.mt-3 {
  margin-top: var(--space-3) !important;
}

.mt-4 {
  margin-top: var(--space-4) !important;
}

.mt-5 {
  margin-top: var(--space-5) !important;
}

.mb-3 {
  margin-bottom: var(--space-3) !important;
}

.mb-4 {
  margin-bottom: var(--space-4) !important;
}

.pre-line {
  white-space: pre-line;
}

.nowrap {
  white-space: nowrap;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.w-auto {
  width: auto !important;
}

.danger-text {
  color: var(--danger);
}

.success-text {
  color: var(--success);
}
