/* Top Timer — static suspension page */

@font-face {
  font-family: "Jost";
  src: url("assets/fonts/jost-latin-var.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette taken from toptimer.net and the app UI */
  --ink: #0c0d1a;          /* app timer panel navy */
  --ink-2: #14162b;
  --white: #f4f5fb;
  --muted: #a9adc6;
  --magenta: #ff1aa8;      /* timer digits */
  --blue: #2f40ff;         /* timer frame */
  --cyan: #00b2ff;
  --lime: #95f609;
  --brand-gradient: linear-gradient(-45deg, var(--blue) 0%, var(--cyan) 50%, var(--lime) 100%);

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--white);
  font-family: "Jost", "Futura", "Century Gothic", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }
a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- Atmosphere ---------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 85% 40%, #1b1e3d 0%, transparent 60%),
    radial-gradient(80% 70% at 0% 100%, #15102a 0%, transparent 60%),
    var(--ink);
}

/* Diagonal stripes — the app's signature background */
.stage__stripes {
  position: absolute;
  inset: -20%;
  background: repeating-linear-gradient(
    -32deg,
    rgba(255, 255, 255, .035) 0 14px,
    transparent 14px 34px
  );
  mask-image: radial-gradient(70% 70% at 70% 45%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 70% at 70% 45%, #000 0%, transparent 75%);
}

/* Skewed gradient band, lifted from the original toptimer.net hero */
.stage__band {
  position: absolute;
  top: 8%;
  right: -38%;
  width: 95%;
  height: 22rem;
  border-radius: 22rem 0 0 22rem;
  background: var(--brand-gradient);
  transform: skew(29deg, -32deg);
  opacity: .22;
  filter: blur(2px);
}

.stage__glow {
  position: absolute;
  left: -10rem;
  top: 30%;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 26, 168, .16), transparent 65%);
}

/* ---------- Layout ---------- */

.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  width: 100%;
  max-width: 82rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 4.5rem) var(--gutter) 1rem;
}

.hero__copy { max-width: 36rem; }

.brand {
  display: inline-block;
  margin-bottom: clamp(2rem, 6vh, 3.5rem);
}
.brand img { width: clamp(13rem, 24vw, 17.5rem); }

/* ---------- Timer frame around the headline ---------- */

.frame {
  position: relative;
  width: fit-content;
  max-width: 100%;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2.5rem);
  background: rgba(12, 13, 26, .72);
  margin-bottom: 1.75rem;
}

/* Two-tone border: magenta "elapsed" segment, blue remainder — as in the app */
.frame__ring {
  position: absolute;
  inset: 0;
  border: 5px solid var(--blue);
  pointer-events: none;
}
.frame__ring::before,
.frame__ring::after {
  content: "";
  position: absolute;
  background: var(--magenta);
}
.frame__ring::before { /* top edge, left part */
  top: -5px;
  left: -5px;
  height: 5px;
  width: 38%;
  transform-origin: left;
}
.frame__ring::after {  /* left edge, top part */
  top: -5px;
  left: -5px;
  width: 5px;
  height: 42%;
  transform-origin: top;
}

.frame__status {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 .85rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}
.frame__bars {
  display: inline-block;
  width: .7rem;
  height: .8rem;
  border-left: 3px solid var(--magenta);
  border-right: 3px solid var(--magenta);
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.02em;
  width: min-content;
}

.lead {
  margin: 0 0 .5rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--white);
}

.thanks {
  margin: 0 0 2rem;
  color: var(--muted);
}

.modes {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 0;
  margin: 0 0 1.5rem;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.modes span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: .32rem;
  height: .32rem;
  margin: 0 .9rem;
  vertical-align: middle;
  background: var(--lime);
}

.contact {
  margin: 0;
  color: var(--muted);
}
.contact a {
  color: var(--white);
  text-decoration: none;
  background-image: linear-gradient(var(--lime), var(--lime));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: color .2s;
}
.contact a:hover { color: var(--lime); }

/* ---------- App screens ---------- */

.hero__visual {
  position: relative;
  margin: 0;
  justify-self: end;
  width: min(100%, 44rem);
}
.hero__visual img {
  width: 100%;
  filter: brightness(.72) saturate(.95) drop-shadow(0 40px 60px rgba(0, 0, 0, .55));
  /* Fade the edges into the page so the copy keeps priority */
  --fade: linear-gradient(90deg, transparent 0%, #000 24%, #000 94%, transparent 100%),
          linear-gradient(0deg, transparent 0%, #000 30%, #000 94%, transparent 100%);
  -webkit-mask-image: var(--fade);
  -webkit-mask-composite: source-in;
  mask-image: var(--fade);
  mask-composite: intersect;
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 82rem;
  margin: 0 auto;
  padding: 1.25rem var(--gutter) 1.75rem;
  font-size: .85rem;
  color: #8c90ab;
}
.footer p { margin: 0; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .brand, .frame, .lead, .thanks, .modes, .contact {
    animation: rise .9s var(--ease) both;
  }
  .frame   { animation-delay: .1s; }
  .lead    { animation-delay: .25s; }
  .thanks  { animation-delay: .32s; }
  .modes   { animation-delay: .4s; }
  .contact { animation-delay: .46s; }

  .frame__ring::before { animation: grow-x 1.4s var(--ease) .5s both; }
  .frame__ring::after  { animation: grow-y 1.4s var(--ease) .5s both; }

  /* A paused timer blinks */
  .frame__bars { animation: blink 1.6s steps(1, end) 2s infinite; }

  .hero__visual { animation: float-in 1.4s var(--ease) .15s both; }
  .hero__visual img { animation: drift 12s ease-in-out 1.6s infinite alternate; }

  .stage__band { animation: band 2s var(--ease) both; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes blink  { 50% { opacity: .15; } }
@keyframes float-in {
  from { opacity: 0; transform: translate(40px, 20px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes drift {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}
@keyframes band {
  from { opacity: 0; transform: skew(29deg, -32deg) translateX(8%); }
  to   { opacity: .22; transform: skew(29deg, -32deg); }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 2rem;
    overflow: hidden;
  }
  .hero__copy {
    position: relative;
    z-index: 1;
    max-width: 38rem;
  }
  /* Screens sit behind the copy as a faded backdrop */
  .hero__visual {
    position: absolute;
    z-index: 0;
    top: 4.5rem;
    right: -12%;
    width: min(90%, 34rem);
  }
  .hero__visual img {
    opacity: .38;
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 50%);
    mask-image: linear-gradient(0deg, transparent 0%, #000 50%);
  }
  .stage__band { top: 2%; right: -70%; width: 150%; height: 14rem; }
}

@media (max-width: 520px) {
  .brand { margin-bottom: 2rem; }
  .frame__status { font-size: .72rem; }
  .modes { font-size: .72rem; letter-spacing: .12em; }
  .modes span:not(:last-child)::after { margin: 0 .5rem; }
  .hero__visual { width: 120%; right: -38%; top: 5rem; }
  .hero__visual img { opacity: .32; }
}

@media (max-height: 640px) and (min-width: 961px) {
  .brand { margin-bottom: 1.5rem; }
  h1 { font-size: 3rem; }
}
