:root {
  /* Brand */
  --primary: #0047ab;
  --secondary: #001b3a;
  --tertiary: #e0e0e0;

  --bg: var(--primary);
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.22);

  /* Page content starts once the intro clears */
  --start: 1.7s;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --mx: 0;
  --my: 0;
}

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

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 70% at 50% 42%, #0a56c2 0%, var(--primary) 50%, #003a8c 100%),
    var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Intro */
.intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: var(--primary);
  pointer-events: none;
  animation: curtain 0.8s var(--ease-out) 1.2s forwards;
}

.intro__mark {
  width: clamp(88px, 14vw, 140px);
  height: auto;
  fill: var(--fg);
  overflow: visible;
  animation: mark-out 0.8s var(--ease-out) 1.2s forwards;
}

.intro__a {
  opacity: 0;
  transform: translateX(-45%);
  animation: piece-in 0.9s var(--ease-out) 0.15s forwards;
}

.intro__b {
  opacity: 0;
  transform: translate(45%, -45%);
  animation: piece-in 0.9s var(--ease-out) 0.35s forwards;
}

@keyframes piece-in {
  to { opacity: 1; transform: none; }
}

@keyframes mark-out {
  to { opacity: 0; transform: scale(0.6); }
}

@keyframes curtain {
  to { transform: translateY(-100%); }
}

/* Background */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Fade the arcs out behind the copy */
.bg__arcs {
  position: absolute;
  inset: 0;
  -webkit-mask-image: radial-gradient(ellipse 55% 50% at 50% 50%, transparent 30%, #000 95%);
  mask-image: radial-gradient(ellipse 55% 50% at 50% 50%, transparent 30%, #000 95%);
}

.arcs {
  position: absolute;
  top: 0;
  right: 0;
  width: max(110vw, 110vh);
  height: max(110vw, 110vh);
  transform: translate(calc(var(--mx) * -24px), calc(var(--my) * 24px));
  transition: transform 0.6s ease-out;
}

.arcs path {
  fill: none;
  stroke: #fff;
  stroke-width: 1.2;
  stroke-opacity: 0.12;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    draw 1.6s var(--ease-out) calc(var(--start) + var(--i) * 0.06s) forwards,
    ripple 7s ease-in-out calc(var(--start) + 1.6s + var(--i) * 0.22s) infinite;
}

.arcs path.is-bold {
  stroke-width: 2.6;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes ripple {
  0%, 30%, 100% { stroke-opacity: 0.12; }
  15% { stroke-opacity: 0.32; }
}

.bg__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70vmax;
  height: 70vmax;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 60%);
  animation: drift 14s ease-in-out infinite alternate;
}

@keyframes drift {
  to { transform: translate(-42%, -56%) scale(1.1); }
}

/* Header */
.top {
  display: flex;
  align-items: center;
  padding: 28px clamp(16px, 5vw, 56px);
}

.logo {
  display: inline-flex;
  color: var(--fg);
  opacity: 0;
  animation: fade 0.8s ease-out calc(var(--start) + 0.2s) forwards;
}

.logo__mark {
  display: block;
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* Hero */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 16px;
}

.hero__title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(44px, 9vw, 116px);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Each line slides up from behind a mask */
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
}

.hero__title .line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: reveal 1.1s var(--ease-out) var(--start) forwards;
}

.hero__title .line:nth-child(2) > span {
  animation-delay: calc(var(--start) + 0.12s);
}

.hero__title em {
  font-style: italic;
  color: var(--tertiary);
  padding-right: 0.05em;
}

@keyframes reveal {
  to { transform: none; }
}

/* Value • Visibility • Vivid */
.vs {
  --cycle: 6s;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 22px;
  margin-top: 36px;
}

.vs__item {
  font-size: clamp(20px, 2.6vw, 28px);
  letter-spacing: 0.01em;
  opacity: 0;
  animation: rise 1s var(--ease-out) forwards;
}

.vs__item:nth-child(1) { animation-delay: calc(var(--start) + 0.4s); }
.vs__item:nth-child(3) { animation-delay: calc(var(--start) + 0.5s); }
.vs__item:nth-child(5) { animation-delay: calc(var(--start) + 0.6s); }

.vs__word {
  color: var(--muted);
  animation: word-on var(--cycle) ease-in-out infinite;
}

/* Each word takes a 2s turn; start after the entry animation */
.vs__item:nth-child(1) .vs__word { animation-delay: calc(var(--start) + 1.4s); }
.vs__item:nth-child(3) .vs__word { animation-delay: calc(var(--start) + 3.4s); }
.vs__item:nth-child(5) .vs__word { animation-delay: calc(var(--start) + 5.4s); }

.vs__sep {
  color: var(--line);
  font-size: 18px;
  opacity: 0;
  animation: fade 1s ease-out calc(var(--start) + 0.6s) forwards;
}

@keyframes word-on {
  0%, 40%, 100% { color: var(--muted); }
  10%, 30% { color: var(--fg); }
}

.hero__lead {
  margin-top: 32px;
  font-size: 15px;
  color: var(--muted);
  opacity: 0;
  animation: rise 1s var(--ease-out) calc(var(--start) + 0.75s) forwards;
}

.mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding: 14px 26px;
  border-radius: 999px;
  color: var(--primary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  background: #fff;
  box-shadow: 0 12px 32px -12px rgba(0, 27, 58, 0.7);
  transition: background 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
  opacity: 0;
  animation: rise 1s var(--ease-out) calc(var(--start) + 0.9s) forwards;
}

.mail:hover,
.mail:focus-visible {
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 16px 36px -12px rgba(0, 27, 58, 0.85);
  transform: translateY(-2px);
}

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

@keyframes fade {
  to { opacity: 1; }
}

/* Footer */
.foot {
  padding: 24px 16px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  opacity: 0;
  animation: fade 1s ease-out calc(var(--start) + 1s) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .intro {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}
