/*
 * Triple One Care company portal: landing page (sign-in).
 * Uses tokens from tokens.css only. Sections: base, scene and photo wall, top bar, sign-in card,
 * form controls, about, help, footer, motion, responsive.
 */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--toc-bg);
  color: var(--toc-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }

.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: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--toc-yellow);
  color: var(--toc-navy-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-4); outline: none; box-shadow: var(--focus-ring); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.no-js .js-only { display: none !important; }
.js .no-js-only { display: none !important; }

.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.icon--xs { width: 14px; height: 14px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: var(--tracking-label);
  color: var(--toc-yellow);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: currentColor;
}
.eyebrow--dark { color: var(--toc-navy); }
.eyebrow--dark::before { background: var(--toc-yellow); }

/* ---------- Scene: full-screen sign-in with moving photo wall ---------- */
.scene {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--toc-navy-ink);
  color: var(--on-navy);
}
.scene__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-5) var(--gutter) var(--space-6);
}
.scene__main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--space-8) 0;
}

.mosaic { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.mosaic__wall {
  position: absolute;
  inset: -40% -12%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  transform: rotate(-10deg);
}
.mosaic__col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: drift-up 120s linear infinite;
  will-change: transform;
}
.mosaic__col--1, .mosaic__col--3, .mosaic__col--5 { animation-name: drift-down; animation-duration: 150s; }
.mosaic__col--2 { animation-duration: 135s; }
.mosaic__col--4 { animation-duration: 105s; }
.mosaic__tile {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--toc-navy-deep);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}
.mosaic__tile img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.85) contrast(1.05);
}
/* Brand duotone: navy wash with a yellow lift, darker towards the centre so the card stands out. */
.mosaic__tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(19, 17, 47, 0.75) 0%, rgba(19, 17, 47, 0) 16%, rgba(19, 17, 47, 0) 82%, rgba(19, 17, 47, 0.8) 100%),
    radial-gradient(ellipse 38% 55% at 50% 52%, rgba(19, 17, 47, 0.78) 0%, rgba(19, 17, 47, 0.35) 70%, rgba(19, 17, 47, 0) 100%),
    linear-gradient(160deg, rgba(42, 39, 105, 0.62) 0%, rgba(26, 24, 71, 0.55) 50%, rgba(19, 17, 47, 0.72) 100%);
}
.mosaic__tint::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 88%, rgba(249, 200, 29, 0.28), transparent 38%),
    radial-gradient(circle at 92% 8%, rgba(249, 200, 29, 0.18), transparent 32%);
}
/* A slow diagonal light sweep across the wall. */
.mosaic__sweep {
  position: absolute;
  inset: -50%;
  background: linear-gradient(115deg, transparent 42%, rgba(249, 200, 29, 0.08) 49%, rgba(255, 255, 255, 0.06) 50%, transparent 57%);
  animation: sweep 14s ease-in-out infinite;
}
@keyframes drift-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes drift-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@keyframes sweep { 0% { transform: translateX(-30%); } 60%, 100% { transform: translateX(30%); } }

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.topbar__brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--on-navy); text-decoration: none; }
.topbar__name { font-weight: 700; letter-spacing: 0.02em; }
.topbar__divider { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.3); }
.topbar__label { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--toc-yellow); }
.topbar__nav { display: flex; align-items: center; gap: var(--space-2); }
.topbar__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--on-navy-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--duration-fast) ease, background-color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.topbar__link:hover { color: var(--on-navy); background: rgba(255, 255, 255, 0.08); }
.topbar__link--pill { border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(19, 17, 47, 0.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

.scroll-cue {
  align-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--on-navy-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.scroll-cue:hover { color: var(--toc-yellow); }
.scroll-cue__icon { transform: rotate(90deg); animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 5px; } }

/* ---------- Login card ---------- */
.login { width: 100%; max-width: 480px; }
.login-card {
  position: relative;
  overflow: hidden;
  padding: var(--space-10) var(--space-8) var(--space-8);
  border-radius: var(--radius-xl);
  background: var(--toc-white);
  color: var(--toc-text);
  box-shadow: var(--shadow-card);
}
.login-card__accent {
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--toc-yellow) 0%, var(--toc-yellow) 40%, var(--toc-line) 40%, var(--toc-line) 100%);
}
.login-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--toc-navy);
}
.login-card__subtitle { margin-top: var(--space-1); color: var(--toc-muted); }
.login-card__footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--toc-line);
  font-size: var(--text-xs);
  color: var(--toc-subtle);
}

.form-alert {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: var(--space-4);
  border: 1px solid #D9D6F2;
  border-left: 4px solid var(--toc-navy);
  border-radius: var(--radius-md);
  background: var(--toc-info-soft);
  font-size: var(--text-sm);
  color: var(--toc-text);
  animation: fade-up var(--duration-base) var(--ease-out);
}
.form-alert[hidden] { display: none; }
.form-alert__icon { color: var(--toc-navy); margin-top: 1px; }
.form-alert strong { display: block; color: var(--toc-navy); }

/* ---------- Form controls ---------- */
.login-form { display: grid; gap: var(--space-5); margin-top: var(--space-6); }

.field__label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--toc-text);
}
.field__control { position: relative; }
.field__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--toc-subtle);
  pointer-events: none;
  transition: color var(--duration-fast) ease;
}
.field__input {
  width: 100%;
  height: 52px;
  padding: 0 var(--space-4) 0 46px;
  border: 1.5px solid var(--toc-line);
  border-radius: var(--radius-md);
  background: #FAFAFC;
  font-size: var(--text-base);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, background-color var(--duration-fast) ease;
}
.field__input::placeholder { color: #A3A5B6; }
.field__input--with-action { padding-right: 52px; }
.field__input:hover { border-color: var(--toc-line-strong); }
.field__input:focus {
  outline: none;
  border-color: var(--toc-navy);
  background: var(--toc-white);
  box-shadow: 0 0 0 4px rgba(42, 39, 105, 0.12);
}
.field__control:focus-within .field__icon { color: var(--toc-navy); }
.field__action {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--toc-muted);
  cursor: pointer;
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}
.field__action:hover { background: var(--toc-bg); color: var(--toc-navy); }

.field__error {
  display: none;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--toc-error);
}
.field.is-invalid .field__error { display: flex; }
.field.is-invalid .field__input { border-color: var(--toc-error); background: var(--toc-error-soft); }
.field.is-invalid .field__input:focus { box-shadow: 0 0 0 4px rgba(196, 43, 59, 0.14); }
.field.is-invalid .field__icon { color: var(--toc-error); }
.field.is-valid .field__input { border-color: #3C8F6B; }

.login-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: calc(var(--space-1) * -1);
}

.checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--toc-muted);
  cursor: pointer;
  user-select: none;
}
.checkbox__input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.checkbox__box {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--toc-line-strong);
  border-radius: 6px;
  background: var(--toc-white);
  transition: background-color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.checkbox__box::after {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -2px;
  border-left: 2px solid var(--toc-navy-ink);
  border-bottom: 2px solid var(--toc-navy-ink);
  transform: rotate(-45deg) scale(0);
  transition: transform var(--duration-fast) var(--ease-out);
}
.checkbox:hover .checkbox__box { border-color: var(--toc-navy); }
.checkbox__input:checked + .checkbox__box { background: var(--toc-yellow); border-color: var(--toc-yellow-strong); }
.checkbox__input:checked + .checkbox__box::after { transform: rotate(-45deg) scale(1); }
.checkbox__input:focus-visible + .checkbox__box { box-shadow: var(--focus-ring); }

.text-link {
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--toc-navy);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--duration-fast) ease;
}
.text-link:hover { text-decoration-color: var(--toc-yellow-strong); }

.help-panel {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--toc-bg);
  font-size: var(--text-sm);
  color: var(--toc-muted);
}
.help-panel a { color: var(--toc-navy); font-weight: 600; }
.js .help-panel { display: none; }
.js .help-panel.is-open { display: block; animation: fade-up var(--duration-base) var(--ease-out); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 54px;
  padding: 0 var(--space-6);
  border: 0;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), background-color var(--duration-base) ease;
}
.button--block { width: 100%; }
.button--primary {
  background: var(--toc-yellow);
  color: var(--toc-navy);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 8px 20px -8px rgba(233, 181, 0, 0.8);
}
.button--primary:hover {
  background: #FFD23A;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 14px 28px -10px rgba(233, 181, 0, 0.9);
}
.button--primary:active { transform: translateY(0); }
.button--primary:focus-visible { box-shadow: 0 0 0 3px var(--toc-white), 0 0 0 6px var(--toc-navy); }
.button__icon { transition: transform var(--duration-base) var(--ease-out); }
.button:hover .button__icon { transform: translateX(3px); }

.login-card { padding: var(--space-10) var(--space-10) var(--space-8); box-shadow: 0 40px 80px -24px rgba(5, 4, 25, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.6) inset; }
.login-card__head { text-align: center; }
.login-card__logo { width: 92px; height: auto; margin: 0 auto var(--space-4); filter: drop-shadow(0 8px 16px rgba(42, 39, 105, 0.25)); }
.login-card__title { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.125rem); }

/* ---------- About (below the fold) ---------- */
.about { background: var(--toc-white); }
.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(var(--space-8), 6vw, var(--space-20));
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(var(--space-12), 8vw, var(--space-20)) var(--gutter);
}
.about__title { margin-top: var(--space-4); font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; color: var(--toc-navy); }
.about__accent { color: var(--toc-yellow-strong); }
.about__statement { margin-top: var(--space-5); font-size: var(--text-xl); font-weight: 600; color: var(--toc-text); }
.about__text { margin-top: var(--space-3); color: var(--toc-muted); max-width: 34rem; }
.about__points { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.point { display: flex; align-items: flex-start; gap: var(--space-4); padding: var(--space-5); border: 1px solid var(--toc-line); border-radius: var(--radius-lg); background: var(--toc-bg); }
.point__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: var(--radius-md); background: var(--toc-navy); color: var(--toc-yellow); }
.point__title { display: block; font-weight: 700; color: var(--toc-navy); }
.point__text { display: block; margin-top: 2px; font-size: var(--text-sm); color: var(--toc-muted); }

/* ---------- Help ---------- */
.help { background: var(--toc-bg); }
.help__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(var(--space-12), 7vw, var(--space-20)) var(--gutter);
}
.help__title { margin-top: var(--space-4); font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--toc-navy); }
.help__text { margin-top: var(--space-3); color: var(--toc-muted); max-width: 30rem; }
.help__options { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.help-option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--toc-line);
  border-radius: var(--radius-lg);
  background: var(--toc-white);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--duration-base) ease, transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.help-option:hover { border-color: var(--toc-line-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.help-option > span:nth-child(2) { flex: 1; min-width: 0; }
.help-option__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--toc-yellow-soft); color: var(--toc-navy); }
.help-option__title { display: block; font-weight: 600; color: var(--toc-navy); }
.help-option__text { display: block; font-size: var(--text-sm); color: var(--toc-muted); overflow-wrap: anywhere; }
.help-option__go { color: var(--toc-subtle); transition: transform var(--duration-base) var(--ease-out); }
.help-option:hover .help-option__go { transform: translateX(3px); color: var(--toc-navy); }

/* ---------- Footer ---------- */
.site-footer { background: var(--toc-navy-ink); color: var(--on-navy-muted); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-12) var(--gutter) var(--space-10);
}
.site-footer__brand { display: flex; align-items: center; gap: var(--space-4); }
.site-footer__logo { width: 52px; height: auto; }
.site-footer__name { font-family: var(--font-display); font-weight: 800; color: var(--on-navy); }
.site-footer__tagline {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: var(--tracking-label);
  color: var(--toc-yellow);
}
.site-footer__contact { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); }
.site-footer__contact a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--on-navy-muted);
  transition: color var(--duration-fast) ease;
}
.site-footer__contact a:hover { color: var(--toc-yellow); }
.site-footer__base {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-5) var(--gutter) var(--space-8);
  border-top: 1px solid var(--on-navy-line);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
}

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

.js [data-reveal] {
  opacity: 0;
  animation: fade-up var(--duration-slow) var(--ease-out) forwards;
  animation-delay: 60ms;
}
.js [data-reveal="1"] { animation-delay: 140ms; }
.js [data-reveal="2"] { animation-delay: 220ms; }
.js [data-reveal="3"] { animation-delay: 300ms; }
.js [data-reveal="4"] { animation-delay: 380ms; }
.js [data-reveal="5"] { animation-delay: 480ms; }

.js [data-reveal-on-scroll] { opacity: 0; transform: translateY(18px); transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out); }
.js [data-reveal-on-scroll].is-visible { opacity: 1; transform: none; }
.js [data-reveal-on-scroll][data-order="1"] { transition-delay: 90ms; }
.js [data-reveal-on-scroll][data-order="2"] { transition-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .js [data-reveal] { animation: none; opacity: 1; }
  .js [data-reveal-on-scroll] { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .about__inner, .help__inner { grid-template-columns: minmax(0, 1fr); }
  .mosaic__wall { grid-template-columns: repeat(4, minmax(0, 1fr)); inset: -30% -40%; }
  .mosaic__col--4, .mosaic__col--5 { display: none; }
}
@media (max-width: 640px) {
  .scene__inner { padding-top: var(--space-4); }
  .scene__main { padding: var(--space-6) 0; }
  .login-card { padding: var(--space-6) var(--space-5) var(--space-5); border-radius: var(--radius-lg); }
  .login-card__logo { width: 56px; margin-bottom: var(--space-2); }
  .login-card__title { font-size: 1.5rem; }
  .login-form { gap: var(--space-4); margin-top: var(--space-5); }
  .login-card__footnote { margin-top: var(--space-4); padding-top: var(--space-4); }
  .topbar__name, .topbar__divider, .topbar__site { display: none; }
  .mosaic__wall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .mosaic__col { gap: 14px; }
  .mosaic__col--3 { display: none; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
  .site-footer__contact { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .mosaic__col, .mosaic__sweep, .scroll-cue__icon { animation: none !important; }
}

/* ---------- Holiday themes ---------- */
.season { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.season i { position: absolute; display: block; left: var(--x); top: 0; will-change: transform, opacity; }
.season i:nth-child(1) { --x: 82.1%; --y: 22.0%; --t: 19.4s; --delay: -9.9s; --s: 0.40; --sway: -35px; --spin: 482deg; --tw: 2.8s; }
.season i:nth-child(2) { --x: 46.4%; --y: 79.2%; --t: 16.9s; --delay: -7.6s; --s: 0.81; --sway: 30px; --spin: -349deg; --tw: 4.7s; }
.season i:nth-child(3) { --x: 24.4%; --y: 55.5%; --t: 13.5s; --delay: -17.4s; --s: 0.76; --sway: -23px; --spin: 428deg; --tw: 2.9s; }
.season i:nth-child(4) { --x: 24.3%; --y: 91.4%; --t: 19.3s; --delay: -0.3s; --s: 0.02; --sway: 39px; --spin: 645deg; --tw: 5.3s; }
.season i:nth-child(5) { --x: 54.2%; --y: 67.8%; --t: 17.5s; --delay: -12.4s; --s: 0.97; --sway: -18px; --spin: 468deg; --tw: 5.3s; }
.season i:nth-child(6) { --x: 2.6%; --y: 67.1%; --t: 13.9s; --delay: -2.9s; --s: 0.94; --sway: 33px; --spin: 181deg; --tw: 5.0s; }
.season i:nth-child(7) { --x: 59.8%; --y: 66.9%; --t: 11.4s; --delay: -15.2s; --s: 0.77; --sway: -31px; --spin: 379deg; --tw: 3.7s; }
.season i:nth-child(8) { --x: 86.2%; --y: 72.7%; --t: 16.0s; --delay: -17.3s; --s: 0.12; --sway: 25px; --spin: -500deg; --tw: 4.7s; }
.season i:nth-child(9) { --x: 48.2%; --y: 94.3%; --t: 13.4s; --delay: -4.2s; --s: 0.12; --sway: 48px; --spin: 688deg; --tw: 2.6s; }
.season i:nth-child(10) { --x: 83.4%; --y: 74.4%; --t: 14.2s; --delay: -1.0s; --s: 0.20; --sway: -27px; --spin: -211deg; --tw: 4.0s; }
.season i:nth-child(11) { --x: 27.5%; --y: 89.1%; --t: 18.9s; --delay: -17.0s; --s: 0.77; --sway: 23px; --spin: 375deg; --tw: 4.2s; }
.season i:nth-child(12) { --x: 18.4%; --y: 50.3%; --t: 15.2s; --delay: -13.0s; --s: 0.82; --sway: 15px; --spin: -500deg; --tw: 4.1s; }
.season i:nth-child(13) { --x: 12.3%; --y: 84.5%; --t: 9.1s; --delay: -3.9s; --s: 0.48; --sway: -37px; --spin: 325deg; --tw: 4.2s; }
.season i:nth-child(14) { --x: 97.3%; --y: 81.5%; --t: 17.3s; --delay: -17.9s; --s: 0.83; --sway: 18px; --spin: 511deg; --tw: 4.7s; }
.season i:nth-child(15) { --x: 57.3%; --y: 47.3%; --t: 18.8s; --delay: -6.9s; --s: 0.26; --sway: 32px; --spin: -711deg; --tw: 3.9s; }
.season i:nth-child(16) { --x: 2.3%; --y: 61.8%; --t: 14.9s; --delay: -19.6s; --s: 0.61; --sway: 28px; --spin: -569deg; --tw: 5.2s; }
.season i:nth-child(17) { --x: 2.5%; --y: 45.9%; --t: 11.1s; --delay: -17.8s; --s: 0.25; --sway: 27px; --spin: 419deg; --tw: 4.9s; }
.season i:nth-child(18) { --x: 77.6%; --y: 43.6%; --t: 13.9s; --delay: -8.7s; --s: 0.94; --sway: -38px; --spin: 254deg; --tw: 3.0s; }
.season i:nth-child(19) { --x: 73.3%; --y: 68.5%; --t: 12.4s; --delay: -6.0s; --s: 0.57; --sway: 35px; --spin: 591deg; --tw: 4.1s; }
.season i:nth-child(20) { --x: 20.2%; --y: 19.5%; --t: 10.7s; --delay: -4.0s; --s: 0.23; --sway: 35px; --spin: 463deg; --tw: 4.0s; }
.season i:nth-child(21) { --x: 95.8%; --y: 41.1%; --t: 11.8s; --delay: -0.1s; --s: 0.01; --sway: -44px; --spin: -293deg; --tw: 2.3s; }
.season i:nth-child(22) { --x: 45.0%; --y: 8.5%; --t: 9.8s; --delay: -12.7s; --s: 0.15; --sway: 31px; --spin: 421deg; --tw: 2.3s; }
.season i:nth-child(23) { --x: 88.7%; --y: 85.9%; --t: 17.7s; --delay: -6.0s; --s: 0.78; --sway: 13px; --spin: -699deg; --tw: 2.5s; }
.season i:nth-child(24) { --x: 43.6%; --y: 49.0%; --t: 16.3s; --delay: -1.7s; --s: 0.23; --sway: -37px; --spin: -427deg; --tw: 3.1s; }
.season i:nth-child(25) { --x: 3.2%; --y: 70.4%; --t: 18.1s; --delay: -17.0s; --s: 0.91; --sway: 30px; --spin: 386deg; --tw: 4.7s; }
.season i:nth-child(26) { --x: 29.2%; --y: 90.4%; --t: 15.8s; --delay: -19.9s; --s: 0.85; --sway: 18px; --spin: -497deg; --tw: 3.8s; }
.season i:nth-child(27) { --x: 83.4%; --y: 28.6%; --t: 11.5s; --delay: -17.1s; --s: 0.98; --sway: 21px; --spin: 556deg; --tw: 4.8s; }
.season i:nth-child(28) { --x: 25.9%; --y: 6.5%; --t: 16.3s; --delay: -11.5s; --s: 0.59; --sway: -27px; --spin: 594deg; --tw: 2.4s; }
.season i:nth-child(29) { --x: 80.1%; --y: 58.9%; --t: 10.0s; --delay: -10.1s; --s: 0.20; --sway: -16px; --spin: -285deg; --tw: 4.9s; }
.season i:nth-child(30) { --x: 21.5%; --y: 33.7%; --t: 12.2s; --delay: -0.8s; --s: 0.81; --sway: -46px; --spin: -231deg; --tw: 2.6s; }
.season i:nth-child(31) { --x: 98.5%; --y: 91.9%; --t: 16.7s; --delay: -11.4s; --s: 0.20; --sway: -48px; --spin: 518deg; --tw: 3.9s; }
.season i:nth-child(32) { --x: 47.4%; --y: 12.0%; --t: 15.8s; --delay: -14.2s; --s: 0.62; --sway: -29px; --spin: 605deg; --tw: 3.3s; }
.season i:nth-child(33) { --x: 30.8%; --y: 42.4%; --t: 15.4s; --delay: -19.1s; --s: 0.77; --sway: -38px; --spin: -498deg; --tw: 5.3s; }
.season i:nth-child(34) { --x: 64.5%; --y: 80.9%; --t: 11.0s; --delay: -5.2s; --s: 0.31; --sway: -45px; --spin: -559deg; --tw: 4.5s; }
.season i:nth-child(35) { --x: 4.3%; --y: 51.4%; --t: 15.0s; --delay: -4.6s; --s: 0.24; --sway: -15px; --spin: -659deg; --tw: 4.2s; }
.season i:nth-child(36) { --x: 51.3%; --y: 43.7%; --t: 13.3s; --delay: -7.9s; --s: 0.48; --sway: 32px; --spin: 446deg; --tw: 3.5s; }
.season i:nth-child(37) { --x: 84.2%; --y: 63.0%; --t: 10.4s; --delay: -13.6s; --s: 0.77; --sway: 25px; --spin: 481deg; --tw: 3.1s; }
.season i:nth-child(38) { --x: 53.0%; --y: 10.9%; --t: 15.9s; --delay: -1.2s; --s: 0.29; --sway: 23px; --spin: -374deg; --tw: 2.7s; }
.season i:nth-child(39) { --x: 8.8%; --y: 62.4%; --t: 18.3s; --delay: -11.8s; --s: 0.59; --sway: -46px; --spin: -250deg; --tw: 5.4s; }
.season i:nth-child(40) { --x: 43.5%; --y: 53.4%; --t: 10.3s; --delay: -11.1s; --s: 0.92; --sway: -41px; --spin: -571deg; --tw: 2.3s; }
.season i:nth-child(41) { --x: 13.2%; --y: 52.1%; --t: 17.4s; --delay: -2.0s; --s: 0.31; --sway: -45px; --spin: -666deg; --tw: 3.1s; }
.season i:nth-child(42) { --x: 84.8%; --y: 81.0%; --t: 10.7s; --delay: -8.4s; --s: 0.21; --sway: -14px; --spin: 668deg; --tw: 4.8s; }
.season i:nth-child(43) { --x: 65.6%; --y: 83.0%; --t: 14.1s; --delay: -4.9s; --s: 0.24; --sway: 45px; --spin: 258deg; --tw: 4.7s; }
.season i:nth-child(44) { --x: 58.9%; --y: 31.6%; --t: 18.1s; --delay: -12.1s; --s: 0.57; --sway: 18px; --spin: 488deg; --tw: 3.7s; }
.season i:nth-child(45) { --x: 69.2%; --y: 73.9%; --t: 19.9s; --delay: -18.9s; --s: 0.44; --sway: -19px; --spin: -421deg; --tw: 5.1s; }
.season i:nth-child(46) { --x: 28.8%; --y: 70.6%; --t: 16.1s; --delay: -19.5s; --s: 0.62; --sway: -45px; --spin: 674deg; --tw: 5.4s; }
.season i:nth-child(47) { --x: 48.1%; --y: 89.5%; --t: 15.1s; --delay: -3.0s; --s: 0.17; --sway: 18px; --spin: -595deg; --tw: 4.1s; }
.season i:nth-child(48) { --x: 2.7%; --y: 40.2%; --t: 12.7s; --delay: -18.2s; --s: 0.02; --sway: -43px; --spin: 187deg; --tw: 5.2s; }
.season i:nth-child(49) { --x: 37.4%; --y: 61.2%; --t: 9.0s; --delay: -6.8s; --s: 0.87; --sway: -34px; --spin: -376deg; --tw: 3.7s; }
.season i:nth-child(50) { --x: 95.5%; --y: 45.7%; --t: 19.6s; --delay: -17.5s; --s: 0.22; --sway: -37px; --spin: 465deg; --tw: 3.6s; }
.season i:nth-child(51) { --x: 65.8%; --y: 55.7%; --t: 18.4s; --delay: -0.6s; --s: 0.66; --sway: -29px; --spin: 558deg; --tw: 2.7s; }
.season i:nth-child(52) { --x: 75.7%; --y: 75.1%; --t: 14.4s; --delay: -5.8s; --s: 0.60; --sway: -13px; --spin: 440deg; --tw: 4.8s; }
.season i:nth-child(53) { --x: 97.7%; --y: 84.5%; --t: 16.9s; --delay: -7.6s; --s: 0.02; --sway: 35px; --spin: 510deg; --tw: 4.8s; }
.season i:nth-child(54) { --x: 1.3%; --y: 3.2%; --t: 17.9s; --delay: -11.3s; --s: 0.48; --sway: -43px; --spin: -443deg; --tw: 5.3s; }
.season i:nth-child(55) { --x: 10.9%; --y: 68.9%; --t: 16.9s; --delay: -6.0s; --s: 0.78; --sway: 39px; --spin: -426deg; --tw: 4.4s; }
.season i:nth-child(56) { --x: 80.7%; --y: 76.2%; --t: 13.3s; --delay: -0.7s; --s: 0.54; --sway: 48px; --spin: -415deg; --tw: 3.7s; }
.season i:nth-child(57) { --x: 28.6%; --y: 37.0%; --t: 11.5s; --delay: -1.2s; --s: 0.35; --sway: 40px; --spin: 554deg; --tw: 2.7s; }
.season i:nth-child(58) { --x: 42.4%; --y: 41.9%; --t: 17.4s; --delay: -1.3s; --s: 0.99; --sway: -17px; --spin: 420deg; --tw: 5.4s; }
.season i:nth-child(59) { --x: 60.6%; --y: 62.5%; --t: 15.2s; --delay: -3.2s; --s: 0.40; --sway: 31px; --spin: 536deg; --tw: 3.5s; }
.season i:nth-child(60) { --x: 61.6%; --y: 79.0%; --t: 17.3s; --delay: -9.8s; --s: 0.93; --sway: 32px; --spin: 427deg; --tw: 4.0s; }

/* Falling: snow, confetti, eggs, blossom */
.season--snow i, .season--confetti i, .season--eggs i, .season--blossom i {
  top: -40px;
  animation: season-fall var(--t) linear var(--delay) infinite;
}
@keyframes season-fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  25% { transform: translate3d(var(--sway), 28vh, 0) rotate(calc(var(--spin) * 0.25)); }
  50% { transform: translate3d(0, 56vh, 0) rotate(calc(var(--spin) * 0.5)); }
  75% { transform: translate3d(calc(var(--sway) * -1), 84vh, 0) rotate(calc(var(--spin) * 0.75)); }
  100% { transform: translate3d(0, calc(100vh + 80px), 0) rotate(var(--spin)); }
}
.season--snow i {
  width: calc(3px + var(--s) * 6px); height: calc(3px + var(--s) * 6px);
  border-radius: 50%; background: #fff; opacity: calc(0.45 + var(--s) * 0.5);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  animation-duration: calc(var(--t) * 1.15);
}
.season--snow i:nth-child(4n) { filter: blur(1.5px); }
.season--confetti i { width: 9px; height: 15px; border-radius: 2px; background: var(--toc-yellow); }
.season--confetti i:nth-child(4n+1) { background: #FFFFFF; }
.season--confetti i:nth-child(4n+2) { background: #8E8AE6; width: 6px; height: 10px; }
.season--confetti i:nth-child(4n+3) { background: #F28C28; border-radius: 50%; width: 8px; height: 8px; }
.season--eggs i {
  width: calc(16px + var(--s) * 10px); height: calc(21px + var(--s) * 13px);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, transparent 38%, rgba(255, 255, 255, 0.75) 38% 48%, transparent 48% 60%, rgba(255, 255, 255, 0.5) 60% 66%, transparent 66%), #F6C9D9;
  box-shadow: inset -4px -5px 0 rgba(0, 0, 0, 0.06);
  opacity: 0.92;
  animation-duration: calc(var(--t) * 1.5);
}
.season--eggs i:nth-child(4n+1) { background-color: #CDE8D5; }
.season--eggs i:nth-child(4n+2) { background-color: #D9D3F2; }
.season--eggs i:nth-child(4n+3) { background-color: #FFE7A3; }
.season--blossom i {
  width: calc(9px + var(--s) * 8px); height: calc(9px + var(--s) * 8px);
  border-radius: 100% 0 100% 0; background: #F7C6D9; opacity: 0.9;
  animation-duration: calc(var(--t) * 1.3);
}
.season--blossom i:nth-child(3n) { background: #FFFFFF; }
.season--blossom i:nth-child(3n+1) { background: #F2A7C3; }

/* Twinkling: sparkles and Matariki stars */
.season--sparkles i, .season--stars i {
  top: var(--y);
  animation: season-twinkle var(--tw) ease-in-out var(--delay) infinite;
}
@keyframes season-twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1); }
}
.season--sparkles i {
  width: calc(10px + var(--s) * 14px); height: calc(10px + var(--s) * 14px);
  background: var(--toc-yellow);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
.season--sparkles i:nth-child(3n) { background: #FFF4CC; }
.season--stars i {
  width: calc(2px + var(--s) * 3.5px); height: calc(2px + var(--s) * 3.5px);
  border-radius: 50%; background: #fff; box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.5);
}
.season--stars i:nth-child(1) { --x: 74%; --y: 14%; --s: 1.0; width: 7px; height: 7px; box-shadow: 0 0 10px 3px rgba(255, 244, 204, 0.7); }
.season--stars i:nth-child(2) { --x: 77%; --y: 11%; --s: 0.85; width: 7px; height: 7px; box-shadow: 0 0 10px 3px rgba(255, 244, 204, 0.7); }
.season--stars i:nth-child(3) { --x: 80%; --y: 15%; --s: 0.9; width: 7px; height: 7px; box-shadow: 0 0 10px 3px rgba(255, 244, 204, 0.7); }
.season--stars i:nth-child(4) { --x: 78%; --y: 18%; --s: 0.8; width: 7px; height: 7px; box-shadow: 0 0 10px 3px rgba(255, 244, 204, 0.7); }
.season--stars i:nth-child(5) { --x: 83%; --y: 12%; --s: 0.75; width: 7px; height: 7px; box-shadow: 0 0 10px 3px rgba(255, 244, 204, 0.7); }
.season--stars i:nth-child(6) { --x: 75%; --y: 19%; --s: 0.7; width: 7px; height: 7px; box-shadow: 0 0 10px 3px rgba(255, 244, 204, 0.7); }
.season--stars i:nth-child(7) { --x: 81%; --y: 20%; --s: 0.7; width: 7px; height: 7px; box-shadow: 0 0 10px 3px rgba(255, 244, 204, 0.7); }
.season--stars i:nth-child(8) { --x: 85%; --y: 17%; --s: 0.65; width: 7px; height: 7px; box-shadow: 0 0 10px 3px rgba(255, 244, 204, 0.7); }
.season--stars i:nth-child(9) { --x: 72%; --y: 10%; --s: 0.6; width: 7px; height: 7px; box-shadow: 0 0 10px 3px rgba(255, 244, 204, 0.7); }

/* Rising: Waitangi Day lights */
.season--glow i {
  top: auto; bottom: -60px;
  width: calc(10px + var(--s) * 26px); height: calc(10px + var(--s) * 26px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 170, 0.9) 0%, rgba(249, 200, 29, 0.35) 45%, rgba(249, 200, 29, 0) 70%);
  animation: season-rise calc(var(--t) * 1.6) ease-in var(--delay) infinite;
}
@keyframes season-rise {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  15% { opacity: 0.9; }
  100% { transform: translate3d(var(--sway), calc(-100vh - 80px), 0); opacity: 0; }
}

/* Decorations on the logo */
.crest { position: relative; z-index: 0; isolation: isolate; width: 92px; margin: 0 auto var(--space-4); }
.crest .login-card__logo { display: block; width: 100%; margin: 0; }
.crest__deco { position: absolute; inset: 0; pointer-events: none; }
.deco { position: absolute; display: block; height: auto; filter: drop-shadow(0 4px 6px rgba(19, 17, 47, 0.25)); }
.deco--santa-hat { width: 80%; top: -34%; left: 34%; transform: rotate(16deg); }
.deco--party-hat { width: 48%; top: -54%; left: 44%; transform: rotate(16deg); }
.deco--bunny-ears { width: 84%; top: -52%; left: 8%; z-index: -1; filter: drop-shadow(0 2px 4px rgba(19, 17, 47, 0.18)); }
.deco--crown { width: 58%; top: -38%; left: 21%; transform: rotate(-6deg); }
.deco--hard-hat { width: 68%; top: -30%; left: 16%; transform: rotate(-4deg); }
.login-card__pin { position: absolute; top: 18px; right: 18px; width: 54px; transform: rotate(-12deg); }
.login-card__pin .deco { position: static; width: 100%; }

.season-greeting {
  display: inline-block; margin: 0 0 var(--space-2); padding: 5px 14px;
  border-radius: 999px; background: var(--toc-yellow-soft); color: var(--toc-navy);
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.01em;
}

/* Per-theme touches */
.theme--christmas .login-card__accent { background: repeating-linear-gradient(135deg, #C8102E 0 12px, #FFFFFF 12px 18px, #1E7B4A 18px 30px, #FFFFFF 30px 36px); }
.theme--christmas .season-greeting { background: #FDECEE; color: #9E0C24; }
.theme--new-year .login-card__accent { background: linear-gradient(90deg, var(--toc-yellow), #FFF4CC, var(--toc-yellow)); }
.theme--easter .login-card__accent { background: linear-gradient(90deg, #F6C9D9, #FFE7A3, #CDE8D5, #D9D3F2); }
.theme--easter .season-greeting { background: #FBE7EF; color: #8A2C55; }
.theme--anzac .login-card__accent { background: #C8102E; }
.theme--anzac .season-greeting { background: #F1F1F4; color: #3A3A44; }
.theme--anzac .mosaic__tile img { filter: grayscale(0.85) contrast(1.05); }
.theme--anzac .mosaic__col, .theme--anzac .mosaic__sweep { animation-play-state: paused; }
.theme--kings-birthday .login-card__accent { background: linear-gradient(90deg, #6B3FA0, var(--toc-yellow)); }
.theme--matariki .login-card__accent { background: linear-gradient(90deg, #13112F, #4B47A8, #13112F); }
.theme--matariki .season-greeting { background: #EEEDF8; color: var(--toc-navy-deep); }
.theme--matariki .mosaic__tile img { filter: saturate(0.6) brightness(0.62); }
.theme--labour .login-card__accent { background: linear-gradient(90deg, #F28C28, #F7C6D9); }
.theme--labour .season-greeting { background: #FDEBDD; color: #8C4510; }
.theme--waitangi .login-card__accent { background: linear-gradient(90deg, var(--toc-navy), var(--toc-yellow)); }

@media (max-width: 640px) {
  .crest { width: 56px; margin-bottom: var(--space-2); }
  .login-card__pin { top: 12px; right: 12px; width: 40px; }
  .season-greeting { font-size: 0.75rem; padding: 4px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .season { display: none; }
}
