:root {
  --ink: #1a1a1a;
  --midnight: #2c2c2c;
  --teal: #8B0000;
  --gold: #8B0000;
  --gold-dark: #660000;
  --sand: #DBDDDA;
  --paper: #f5f5f5;
  --fog: #DBDDDA;
  --accent: #8B0000;
  --error: #b42318;
  --success: #1f7a4c;
  --maroon: #8B0000;
  --maroon-dark: #660000;
  --grey: #4a4a4a;
  --grey-light: #808080;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --shadow-lg: 0 30px 60px rgba(26, 26, 26, 0.18);
  --shadow-md: 0 18px 35px rgba(26, 26, 26, 0.14);
  --shadow-sm: 0 10px 20px rgba(26, 26, 26, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 10px;
  top: -40px;
  background: var(--maroon);
  color: var(--paper);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  z-index: 20;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--maroon);
}

main a:not(.cta) {
  color: var(--maroon);
  text-decoration: underline;
}

main a:not(.cta):hover {
  color: var(--maroon-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.cta:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.container {
  width: min(1200px, 95vw);
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section--contrast {
  background: var(--sand);
}

.section--deep {
  background: linear-gradient(135deg, #0f2a33 0%, #123942 48%, #0f2a33 100%);
  color: var(--paper);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--maroon);
}

h2 {
  color: var(--maroon);
}

.display {
  font-family: "Fraunces", "Georgia", serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 4.8vw, 4.6rem);
  line-height: 1.05;
  margin: 12px 0 20px;
  color: var(--maroon);
}

.display--sm {
  font-size: clamp(2.1rem, 3.8vw, 3.6rem);
}

.lead {
  font-size: 1.1rem;
  max-width: 560px;
  color: #2e3c44;
}

.section--deep .lead {
  color: #dfe7e9;
}

.section--deep .eyebrow,
.section--deep .display,
.section--deep h2,
.section--deep h3 {
  color: #ffffff;
}

.topbar {
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
}

.topbar .container {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  align-items: center;
  padding: 6px 0;
}

.topbar a {
  color: var(--paper);
  font-weight: 600;
}

.topbar .top-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.notice-bar {
  background: #1a1f23;
  color: #cfd6da;
  font-size: 0.78rem;
}

.notice-bar .container {
  padding: 8px 0 10px;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: blur(10px);
  z-index: 10;
  border-bottom: 1px solid rgba(12, 23, 30, 0.08);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo span {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo .scales-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo .scales-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--maroon);
  stroke: var(--maroon);
  display: block;
}

.logo img {
  display: none;
}

.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  font-weight: 600;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 6px 0;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--maroon);
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(12, 23, 30, 0.2);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--maroon);
  color: var(--maroon);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  text-decoration: none;
}

.cta--primary {
  background: var(--maroon);
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
}

.cta--primary:hover {
  background: var(--maroon-dark);
  color: #ffffff !important;
}

.cta--ghost {
  border: 1px solid var(--grey-light);
  color: var(--ink);
}

.cta--ghost:hover {
  background: var(--sand);
}

.section--deep .cta--ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

.section--deep .cta--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.hero {
  position: relative;
  padding: 120px 0 110px;
  overflow: hidden;
  z-index: 0;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(0);
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(208, 124, 79, 0.25), rgba(208, 124, 79, 0));
  top: -80px;
  right: 5%;
}

.hero::after {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(29, 77, 79, 0.32), rgba(29, 77, 79, 0));
  bottom: -200px;
  left: -80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.hero-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--maroon);
}

.hero-card h1 {
  color: var(--maroon);
}

.tagline {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--maroon);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.split--offset .card {
  margin-left: 48px;
}

.split--offset .card {
  padding: 22px;
}

.split--offset .card h2,
.split--offset .card h3 {
  font-size: 1.02rem;
}

.split--offset .card p {
  font-size: 0.95rem;
}

.card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(12, 23, 30, 0.08);
}

.card a {
  color: var(--maroon);
  text-decoration: none;
}

.card a:hover {
  color: var(--maroon-dark);
}

.card-with-image {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.card-with-image .hover-img {
  display: none;
}

.card-with-image:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.image-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 40px;
  animation: fadeIn 0.3s ease;
  pointer-events: none;
}

.image-overlay.active {
  display: flex;
}

.image-overlay img {
  max-width: 700px;
  max-height: 550px;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  animation: zoomIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.card h2,
.card h3 {
  position: relative;
  z-index: 1;
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--maroon);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.value {
  padding: 20px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.value h3 {
  margin: 0 0 8px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.page-hero {
  padding: 90px 0 60px;
  background: var(--sand);
}

.page-hero h1 {
  margin-bottom: 8px;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--maroon);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.form-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.9rem;
  color: #3c4a52;
}

.form-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: rgba(12, 23, 30, 0.06);
}

.form-status--error {
  color: var(--error);
  background: rgba(180, 35, 24, 0.1);
}

.form-status--success {
  color: var(--success);
  background: rgba(31, 122, 76, 0.12);
}

.required {
  color: var(--gold-dark);
  margin-left: 4px;
}

.field-error {
  border-color: var(--error);
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(12, 23, 30, 0.2);
  font-family: inherit;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.footer {
  background: #0d1f28;
  color: #d2d9dd;
  font-size: 0.8rem;
}

.footer .container {
  padding: 60px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.footer h4 {
  color: var(--paper);
  margin-top: 0;
}

.footer a {
  color: #d2d9dd;
}

.footer .logo span {
  color: var(--grey-light);
  font-size: 0.95rem;
}

.footer .logo .scales-icon svg {
  fill: var(--grey-light);
  stroke: var(--grey-light);
  display: block;
}

.footer-note {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  font-size: 0.85rem;
}

.badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }

  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .main-nav {
    gap: 16px;
  }

  .nav-wrap.nav-collapsible {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .nav-wrap.nav-collapsible .logo {
    flex: 1;
  }

  .nav-wrap.nav-collapsible .nav-toggle {
    display: inline-flex;
  }

  .nav-wrap.nav-collapsible .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 6px;
  }

  .nav-wrap.nav-collapsible:not(.is-open) .main-nav {
    display: none !important;
  }

  .nav-wrap.nav-collapsible.is-open .main-nav {
    display: flex;
  }

  .nav-wrap.nav-collapsible .main-nav a {
    padding: 8px 0;
  }

  .hero {
    padding-top: 90px;
  }

  .cta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .split--offset .card {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .topbar .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo {
    gap: 10px;
  }

  .logo span {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
  }

  .logo .scales-icon {
    width: 24px;
    height: 24px;
  }

  .display {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .display--sm {
    font-size: clamp(1.8rem, 6.5vw, 2.4rem);
  }

  .hero {
    padding: 90px 0 80px;
  }

  .section {
    padding: 60px 0;
  }

  .card,
  .hero-card {
    padding: 20px;
  }

  .cta {
    width: 100%;
    justify-content: center;
  }

  .hero-card {
    padding: 20px;
  }
}

/* Old Website Overlay and Break Apart Animation */
.old-site-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(6, 1fr);
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.old-site-overlay.hidden {
  display: none;
}

.old-site-overlay .piece {
  position: relative;
  overflow: hidden;
  background-image: url('../img/old-site.jpg');
  background-size: 800% 600%;
  background-position: var(--bg-x) var(--bg-y);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.old-site-overlay.breaking .piece {
  transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0);
  opacity: 0;
}

/* Click indicator */
.old-site-overlay::before {
  content: 'Click to Enter';
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--maroon);
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 35px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: pulse 2s ease-in-out infinite;
  z-index: 100000;
}

@keyframes pulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) scale(1.05);
    opacity: 0.8;
  }
}

/* Timer progress bar */
.old-site-overlay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--maroon);
  animation: countdown 1.5s linear forwards;
  z-index: 100001;
}

@keyframes countdown {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}
