/* Fonts */
@font-face {
  font-family: "Alegreya Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/alegreya-sans-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Alegreya Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/alegreya-sans-bold.woff2") format("woff2");
}

/* Tokens */
:root {
  --blue: #335168;
  --text: #262a24;
  --max-width: 980px;
  --font-h2: clamp(32px, 3.5vw, 40px);
  --font-body: clamp(18px, 1.8vw, 20px);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}
body {
  font-family: "Alegreya Sans", sans-serif;
  color: var(--text);
  background: #fff;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.timeline :focus-visible,
.page-404 :focus-visible {
  outline-color: #fff;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  background: #fff;
  color: var(--blue);
  font-weight: 700;
  padding: 10px 16px;
  border: 2px solid var(--blue);
  border-radius: 4px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}
.link-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Hero */
.hero-strip {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}
.hero-bg {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  object-fit: cover;
  object-position: 40% 70%;
}
.hero-inner {
  position: absolute;
  inset: 0;
  max-width: var(--max-width);
  margin: 0;
  padding: 80px 24px 0 clamp(24px, 5vw, 120px);
  pointer-events: none;
}
.hero-inner a {
  pointer-events: auto;
}
.brand {
  display: inline-block;
}
.brand img {
  width: 229px;
  height: 107px;
  margin-bottom: 24px;
}
.nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.nav a {
  font-size: 20px;
  line-height: 28px;
  color: #000;
  transition: color 0.2s;
}
.nav a:hover {
  color: var(--blue);
}

/* Timeline */
.timeline {
  position: relative;
  background: var(--blue);
  color: #fff;
  padding: 120px 24px 80px;
}
.timeline a {
  color: #fff;
  transition: opacity 0.2s;
}
.timeline a:hover {
  opacity: 0.8;
}
.timeline-line {
  position: absolute;
  left: 50%;
  top: 134px;
  bottom: 80px;
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  pointer-events: none;
  transition: clip-path 1.4s cubic-bezier(0.65, 0.05, 0.35, 1) 0.1s;
}
.timeline-line.is-visible {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
@media (prefers-reduced-motion: reduce) {
  .timeline-line {
    transition: none;
    clip-path: none;
  }
}

/* Grid & Steps */
.step {
  display: grid;
  grid-template-columns: 1fr 30px 1fr;
  column-gap: 24px;
  align-items: start;
  max-width: var(--max-width);
  margin: 0 auto 48px;
}
.step.tight {
  margin-bottom: 16px;
}
.step:last-child {
  margin-bottom: 0;
}
.left {
  grid-column: 1;
  text-align: right;
  max-width: 440px;
  margin-left: auto;
}
.right {
  grid-column: 3;
  text-align: left;
  max-width: 440px;
  margin-right: auto;
}
.dot {
  grid-column: 2;
  justify-self: center;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  margin-top: 14px;
  z-index: 2;
}

/* Typography & Content */
h2 {
  font-size: var(--font-h2);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 16px;
}
h3 {
  font-size: var(--font-body);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}
p {
  font-size: var(--font-body);
  line-height: 1.4;
  margin-bottom: 8px;
}
p:last-child {
  margin-bottom: 0;
}
.quote {
  margin-bottom: 24px;
}
.spacer-gap,
.contact-name {
  margin-top: 24px;
}
.contact-name {
  margin-bottom: 8px;
}
.star-col {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}
.star-gif {
  width: 115px;
  height: 115px;
}

/* Footer */
footer {
  background: #fff;
  color: var(--text);
  text-align: center;
  padding: 24px 24px;
  font-size: 14px;
}

/* 404 */
.page-404 {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--blue);
}
.page-404 .hero-strip {
  flex: 0 0 auto;
  min-height: auto;
}
.page-404 .hero-bg {
  height: clamp(380px, 60vh, 600px);
}
.error-strip {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 32px 24px 40px;
  max-width: 520px;
  margin: 0 auto;
}
.error-code {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: -2px;
  margin-bottom: 4px;
}
.error-strip h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}
.error-strip p {
  font-size: 18px;
  line-height: 1.45;
  opacity: 0.9;
  margin-bottom: 20px;
}
.error-btn {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 32px;
  letter-spacing: 0.3px;
  transition: 0.2s;
}
.error-btn:hover {
  background: #fff;
  color: var(--blue);
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  .hero-strip {
    min-height: auto;
  }
  .hero-bg {
    height: clamp(320px, 55vh, 420px);
  }
  .hero-inner {
    padding: 24px 16px;
  }
  .brand img {
    margin-bottom: 16px;
  }
  .nav a {
    font-size: 18px;
    line-height: 26px;
  }
  .timeline {
    padding: 40px 16px 60px 48px;
  }
  .timeline-line {
    left: 24px;
    top: 52px;
    bottom: 60px;
    transform: none;
  }
  .step {
    position: relative;
    display: block;
    margin-bottom: 32px;
  }
  .dot {
    position: absolute;
    left: -32px;
    top: 0;
    margin-top: 12px;
  }
  .left,
  .right {
    text-align: left;
    max-width: 100%;
    margin: 0;
  }
  .step.contact {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
  }
  .step.contact .right {
    order: 1;
    max-width: 220px;
  }
  .step.contact .star-col {
    order: 2;
    justify-content: flex-start;
    padding-top: 0;
    align-self: flex-end;
  }
  .star-gif {
    width: 80px;
    height: 80px;
  }
  .page-404 .hero-bg {
    height: clamp(320px, 55vh, 440px);
  }
  .error-strip {
    padding: 24px 16px 32px;
  }
  .error-code {
    font-size: 52px;
    margin-bottom: 4px;
  }
  .error-strip h2 {
    font-size: 24px;
    margin-bottom: 8px;
  }
  .error-strip p {
    font-size: 16px;
    margin-bottom: 16px;
  }
  .error-btn {
    font-size: 15px;
    padding: 10px 24px;
  }
}

/* Print */
@media print {
  body {
    color: #000;
    background: #fff;
  }
  .hero-strip,
  .timeline {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
  }
  .hero-bg,
  .star-gif,
  .timeline-line,
  .dot,
  .skip-link {
    display: none !important;
  }
  .step {
    display: block !important;
    page-break-inside: avoid;
    margin-bottom: 24px !important;
  }
  .left,
  .right {
    text-align: left !important;
    max-width: 100% !important;
    color: #000 !important;
  }
  a {
    color: #000 !important;
    text-decoration: underline !important;
  }
}
