:root {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #f4f4f0;
  background: #091526;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 76% 38%, #203b59, transparent 57%),
    linear-gradient(145deg, #0f2034, #081322 70%);
}
.layout {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(100%, 1500px);
  min-height: 100svh;
  margin: auto;
  padding: 0 clamp(20px, 5.6vw, 84px);
}
header {
  min-height: 86px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid #c8d5e52b;
}
.wordmark {
  width: clamp(108px, 13vw, 158px);
  aspect-ratio: 980 / 420;
  background: url("ideal-logo.png") center / 110.2041% auto no-repeat;
  filter: brightness(0) invert(1);
}
.phone-icon { width: 17px; height: 17px; flex: none; }
.phone {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #f8f5ef;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
  padding: 12px 16px;
  border: 1px solid #d7c5a875;
  border-radius: 5px;
}
.phone:hover { background: #d7c5a824; }
main {
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  align-items: center;
  gap: clamp(28px, 4vw, 70px);
  padding-block: clamp(32px, 6vw, 94px);
}
.intro { grid-area: 1 / 1; }
h1 {
  margin: 0 0 30px;
  font: 400 clamp(2.65rem, 5.1vw, 5.2rem)/1.04 Georgia, serif;
  letter-spacing: -.065em;
  text-wrap: balance;
}
h1 em { color: #ead1a8; }
.visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 23px;
  color: #182439;
  background: #ecd4ad;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 720;
  border-radius: 5px;
}
.visit:hover { background: #ffe7c0; }
.stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1.15;
  grid-area: 1 / 2;
  overflow: hidden;
  perspective: 850px;
  background: radial-gradient(ellipse at 50% 53%, #8cb6df38, transparent 69%);
}
.horizon {
  position: absolute;
  z-index: -1;
  inset: -15% -36%;
  background: repeating-radial-gradient(ellipse at 50% 58%, transparent 0 34px, #a6bed02a 35px 36px, transparent 37px 61px);
  transform: rotate(-17deg);
  mask-image: linear-gradient(transparent, #000 25% 72%, transparent);
}
.logo-frame {
  width: 92%;
  animation: reveal 1.55s cubic-bezier(.18,.75,.25,1) both;
  filter:
    drop-shadow(0 1px 0 #89a7c7)
    drop-shadow(0 2px 0 #6887ab)
    drop-shadow(1px 2px 0 #354e6c)
    drop-shadow(1px 3px 0 #1a2e48)
    drop-shadow(2px 5px 0 #0b1727)
    drop-shadow(0 16px 13px #020a16b0);
}
.logo { position: relative; aspect-ratio: 980 / 420; }
.logo span {
  position: absolute;
  inset: 0;
  background: url("ideal-logo.png") center / 110.2041% auto no-repeat;
}
.center { clip-path: polygon(30% 0, 75% 0, 69% 100%, 30% 100%); }
.wing-left {
  clip-path: polygon(0 0, 30% 0, 30% 100%, 0 100%);
  --offset: 15%;
}
.wing-right {
  clip-path: polygon(75% 0, 100% 0, 100% 100%, 69% 100%);
  --offset: -15%;
}
.wing-left, .wing-right { animation: wings 1.15s .2s cubic-bezier(.2,.75,.25,1) both; }
@keyframes wings { from { opacity: 0; transform: translate(var(--offset), 5%); } to { opacity: 1; transform: none; } }
@keyframes reveal {
  0% { opacity: 0; transform: translateY(22px) rotateX(36deg) rotateY(-32deg) scale(.83); }
  72% { opacity: 1; transform: translateY(-4px) rotateX(-6deg) rotateY(8deg) scale(1.025); }
  100% { opacity: 1; transform: rotateX(7deg) rotateY(-9deg); }
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: 10px;
  border-top: 1px solid #c8d5e52b;
}
footer a {
  padding: 10px 6px;
  color: #bac9dc;
  text-decoration: none;
  font-size: .875rem;
}
footer a:hover { color: #f1ddba; text-decoration: underline; }

.redirect { width: min(100%, 390px); margin-top: 17px; color: #c7d3e2; font-size: .875rem; }
.redirect-copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 12px; }
.redirect p { margin: 8px 0; }
#seconds { font-variant-numeric: tabular-nums; }
button {
  min-height: 44px;
  padding: 0;
  color: #f1ddba;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
a:focus-visible, button:focus-visible { outline: 2px solid #f8dbab; outline-offset: 4px; }
.track { height: 2px; background: #b9c9dd32; }
.track::before {
  content: "";
  display: block;
  height: 100%;
  background: #ecd4ad;
  transform-origin: left;
}
.running .track::before { animation: elapsed 10s linear both; }
@keyframes elapsed { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 760px) {
  header { min-height: 70px; }
  .phone { padding-inline: 11px; font-size: .91rem; }
  main { grid-template-columns: minmax(0, 1fr); align-content: center; }
  .stage { grid-area: 1 / 1; aspect-ratio: 1.65; }
  .logo-frame { max-width: 440px; }
  .intro { grid-area: 2 / 1; }
  h1 { margin-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .track { display: none; }
}
