:root {
  color-scheme: light dark;
  --bg: #FFFFFF;
  --text: #1C252E;
  --muted: #637381;
  --subtle: #919EAB;
  --line: rgba(145, 158, 171, 0.24);
  --card: rgba(255, 255, 255, 0.82);
  --accent: #C2151C;
  --accent-hover: #A60F22;
  --accent-soft: #DA4F48;
  --glow-a: rgba(194, 21, 28, 0.10);
  --glow-b: rgba(194, 21, 28, 0.06);
  --dots: rgba(99, 115, 129, 0.16);
  --warning: #B76E00;
  --warning-bg: rgba(255, 171, 0, 0.12);
  --warning-line: rgba(255, 171, 0, 0.45);
  --shadow: rgba(194, 21, 28, 0.20);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141A21;
    --text: #F9FAFB;
    --muted: #919EAB;
    --subtle: #637381;
    --line: rgba(145, 158, 171, 0.16);
    --card: rgba(28, 37, 46, 0.72);
    --accent: #EC7F6E;
    --accent-hover: #F4A396;
    --accent-soft: #DA4F48;
    --glow-a: rgba(194, 21, 28, 0.22);
    --glow-b: rgba(194, 21, 28, 0.12);
    --dots: rgba(145, 158, 171, 0.14);
    --warning: #FFAB00;
    --warning-bg: rgba(255, 171, 0, 0.08);
    --warning-line: rgba(255, 171, 0, 0.28);
    --shadow: rgba(194, 21, 28, 0.45);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Public Sans', system-ui, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 85% -10%, var(--glow-a), transparent 60%),
    radial-gradient(50rem 35rem at -10% 110%, var(--glow-b), transparent 60%);
}
.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(70rem 45rem at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70rem 45rem at 50% 40%, #000 30%, transparent 75%);
}

header {
  position: relative;
  padding: 1.5rem clamp(1.25rem, 5vw, 4rem);
}
/* logo-full-dark.png is logo-full.png with the neutral greys inverted,
   served through <picture> when the system is in dark mode. */
header a { display: inline-block; line-height: 0; }
header img { height: 34px; width: auto; }

main {
  position: relative;
  flex: 1;
  padding: 3rem clamp(1.25rem, 5vw, 4rem) 4rem;
}

/* Home: centered maintenance notice */

.notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid var(--warning-line);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  animation: rise 0.7s ease both;
}
.status-chip .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warning);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 171, 0, 0.55); }
  50%      { box-shadow: 0 0 0 8px rgba(255, 171, 0, 0); }
}

h1 {
  font-family: 'Barlow', sans-serif;
  font-weight: 800;
  line-height: 1.08;
}
.notice h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  margin: 1.6rem 0 1.1rem;
  max-width: 16ch;
  animation: rise 0.7s ease 0.12s both;
}
.notice h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #EC7F6E, #C2151C);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.65;
  max-width: 44ch;
  animation: rise 0.7s ease 0.24s both;
}

.gear {
  position: absolute;
  top: 8%;
  right: clamp(1rem, 8vw, 9rem);
  width: clamp(90px, 12vw, 150px);
  stroke: var(--accent-soft);
  opacity: 0.14;
  animation: spin 24s linear infinite;
}
.gear.small {
  top: auto; right: auto;
  bottom: 12%;
  left: clamp(1rem, 6vw, 7rem);
  width: clamp(60px, 8vw, 90px);
  animation-direction: reverse;
  animation-duration: 16s;
  opacity: 0.10;
}
@keyframes spin { to { transform: rotate(360deg); } }

.contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  animation: rise 0.7s ease 0.36s both;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.4rem;
  text-decoration: none;
  color: var(--text);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.contact-card:hover {
  color: var(--text);
  transform: translateY(-3px);
  border-color: rgba(218, 79, 72, 0.55);
  box-shadow: 0 12px 32px -12px var(--shadow);
}
.contact-card svg {
  width: 22px; height: 22px;
  flex-shrink: 0;
  stroke: var(--accent-soft);
}
.contact-card .label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
}
.contact-card .value {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
}

/* Legal pages: readable text column */

.page {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
}
.page h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  margin-bottom: 1.25rem;
}
.page p { color: var(--muted); }
.page p + p { margin-top: 1rem; }

.back { display: inline-block; font-size: 0.9rem; margin-bottom: 1.5rem; }

.docs {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}
.docs a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1.25rem;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: border-color 0.2s ease;
}
.docs a:hover { border-color: rgba(218, 79, 72, 0.55); }
.docs .meta { color: var(--muted); font-size: 0.85rem; font-weight: 400; white-space: nowrap; }

.pdf-view {
  display: block;
  width: 100%;
  height: 80vh;
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.4rem clamp(1.25rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}
footer nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
footer a[aria-current="page"] { color: var(--text); }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .gear, .status-chip .dot { animation: none; }
  .status-chip, .notice h1, .lead, .contacts { animation-duration: 0.01s; }
}

@media (max-width: 600px) {
  .gear { display: none; }
  .contacts { flex-direction: column; align-items: stretch; }
}
