:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #070a0d;
  color: #f6f8f9;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  display: grid;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr) auto;
  background:
    radial-gradient(circle at 18% 4%, rgba(0, 121, 255, 0.18), transparent 31rem),
    radial-gradient(circle at 84% 44%, rgba(81, 155, 83, 0.11), transparent 30rem),
    #070a0d;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 4px;
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

main {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding-top: clamp(18px, 3.5vh, 38px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(14px, 2.5vh, 26px);
}

.intro {
  display: grid;
  grid-template-areas:
    "eyebrow store"
    "title store"
    "lede store";
  grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.8fr);
  column-gap: clamp(28px, 5vw, 72px);
  align-items: end;
}

.eyebrow,
.artifact-label {
  margin: 0 0 14px;
  color: #58a6ff;
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.intro .eyebrow {
  grid-area: eyebrow;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  grid-area: title;
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(2.65rem, 5.2vw, 4.8rem);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 0.93;
}

.lede {
  grid-area: lede;
  max-width: 680px;
  margin-bottom: 0;
  color: #aab4bc;
  font-size: clamp(0.92rem, 1.4vw, 1.08rem);
  line-height: 1.5;
}

.store-page-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  grid-area: store;
  justify-self: end;
  margin-bottom: 3px;
  padding: 12px 16px;
  border: 1px solid rgba(88, 166, 255, 0.42);
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.09);
  color: #dcecff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(88, 166, 255, 0.72);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.store-page-link::after {
  color: #58a6ff;
  content: "↗";
  text-decoration: none;
}

.store-page-link:hover {
  border-color: rgba(88, 166, 255, 0.78);
  background: rgba(88, 166, 255, 0.15);
  color: white;
}

.demo-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.85fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  padding: clamp(18px, 3.2vh, 42px) clamp(22px, 4.2vw, 54px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(10, 14, 18, 0.84);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.34);
}

.watch-column {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.watch {
  --watch-size: min(350px, 33vw, 38vh);
  position: relative;
  display: grid;
  width: var(--watch-size);
  margin: calc(var(--watch-size) * 0.15) 0;
  place-items: center;
}

.watch-strap {
  position: absolute;
  left: 50%;
  z-index: 0;
  width: 47%;
  height: 39%;
  transform: translateX(-50%);
  border: 1px solid #24282d;
  background:
    linear-gradient(90deg, #111419, #252a30 50%, #101318),
    #16191d;
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.035);
}

.watch-strap::after {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 0.7px, transparent 0.7px);
  background-size: 3px 3px;
  content: "";
  opacity: 0.55;
}

.watch-strap-top {
  bottom: 82%;
  border-radius: 21% 21% 6% 6%;
}

.watch-strap-bottom {
  top: 82%;
  border-radius: 6% 6% 18% 18%;
}

.watch-case {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  padding: clamp(9px, 1.6vw, 14px);
  border: 1px solid #6a7075;
  border-radius: 30%;
  background:
    linear-gradient(135deg, #a3a7aa 0%, #363a3e 17%, #16191c 45%, #73777a 76%, #262a2e 100%);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(0, 0, 0, 0.9);
}

.watch-screen {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  padding: 12% 7% 6%;
  overflow: hidden;
  border: 2px solid #050607;
  border-radius: 27%;
  background:
    radial-gradient(circle at 50% 6%, rgba(45, 54, 65, 0.24), transparent 38%),
    #000;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 24px #000;
}

.watch-screen::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 22%);
  content: "";
  pointer-events: none;
}

.case-seam {
  position: absolute;
  top: 49%;
  z-index: 2;
  width: 12px;
  height: 3px;
  background: #15181a;
  box-shadow: 0 -1px #777b7e, 0 1px #050607;
}

.case-seam-left {
  left: -2px;
}

.case-seam-right {
  right: -2px;
}

.flexpool-logo {
  width: 78%;
  height: auto;
  object-fit: contain;
}

.watch-readings {
  display: flex;
  width: 100%;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: clamp(11px, 1.6vw, 18px);
  padding-top: 4%;
  text-align: center;
}

.watch-readings p,
.watch-credit p {
  margin: 0;
  color: white;
  font-weight: 680;
  letter-spacing: 0.005em;
  line-height: 1.18;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.13);
}

.watch-readings p {
  font-size: clamp(0.69rem, 1.75vw, 1.05rem);
  white-space: nowrap;
}

.watch-credit {
  display: grid;
  gap: 6px;
  text-align: center;
}

.watch-credit p {
  font-size: clamp(0.59rem, 1.28vw, 0.78rem);
}

.simulation-status {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #9ca8b1;
  font-size: 0.78rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #5bd869;
  box-shadow: 0 0 12px rgba(91, 216, 105, 0.8);
}

#refresh-stats {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #dce3e8;
  cursor: pointer;
  font: inherit;
}

#refresh-stats:hover {
  border-color: rgba(88, 166, 255, 0.62);
  color: white;
}

#refresh-stats:focus-visible,
.store-page-link:focus-visible,
.archive-links a:focus-visible {
  outline: 3px solid rgba(88, 166, 255, 0.75);
  outline-offset: 3px;
}

#refresh-stats:disabled {
  cursor: wait;
  opacity: 0.48;
}

.artifact-notes h2 {
  margin-bottom: 14px;
  font-size: clamp(1.75rem, 3.1vw, 2.75rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.artifact-notes > p:not(.artifact-label) {
  color: #aab4bc;
  font-size: 0.92rem;
  line-height: 1.55;
}

.quick-facts {
  display: grid;
  gap: 0;
  margin: clamp(14px, 2.6vh, 24px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-facts div {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-facts dt {
  color: #75818b;
  font-size: 0.8rem;
}

.quick-facts dd {
  margin: 0;
  color: #e6ebee;
  font-size: 0.84rem;
  font-weight: 650;
}

.archive-links {
  display: grid;
  gap: 8px;
}

.archive-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #cbd5dc;
  font-size: 0.82rem;
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.archive-links a::after {
  content: "↗";
  color: #58a6ff;
}

.archive-links a:hover {
  transform: translateX(2px);
  border-color: rgba(88, 166, 255, 0.46);
  color: white;
}

footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 10px 0 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #68747d;
  font-size: 0.78rem;
}

footer p {
  margin: 0;
}

.noscript-note {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 10;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #8c712b;
  border-radius: 8px;
  background: #281f0a;
  color: #ffe6a4;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  main,
  footer {
    width: min(100% - 20px, 1180px);
  }

  main {
    padding-top: 12px;
    gap: 10px;
  }

  .intro {
    display: block;
  }

  .intro .eyebrow {
    margin-bottom: 7px;
  }

  h1 {
    margin-bottom: 7px;
    font-size: clamp(1.85rem, 9vw, 2.75rem);
    line-height: 0.98;
  }

  .lede {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .store-page-link {
    margin-top: 9px;
    margin-bottom: 0;
    padding: 8px 11px;
    font-size: 0.74rem;
  }

  .demo-layout {
    grid-template-columns: 1fr;
    padding: 12px;
    border-radius: 22px;
  }

  .artifact-notes {
    display: none;
  }

  .watch {
    --watch-size: min(300px, 70vw, 45vh);
  }

  .watch-readings p {
    font-size: clamp(0.65rem, 3.1vw, 0.82rem);
  }

  .simulation-status {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  footer {
    padding: 7px 0 9px;
    font-size: 0.66rem;
    text-align: center;
  }
}

@media (max-height: 700px) and (min-width: 701px) {
  main {
    padding-top: 12px;
    gap: 12px;
  }

  h1 {
    margin-bottom: 8px;
    font-size: clamp(2.15rem, 4.2vw, 3.6rem);
  }

  .lede {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .store-page-link {
    padding: 9px 12px;
    font-size: 0.78rem;
  }

  .demo-layout {
    padding-block: 14px;
  }

  .artifact-notes h2 {
    margin-bottom: 10px;
    font-size: 1.7rem;
  }

  .artifact-notes > p:not(.artifact-label) {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .quick-facts {
    margin: 10px 0;
  }

  .quick-facts div {
    padding: 6px 0;
  }

  footer {
    padding: 7px 0 9px;
  }
}

@media (max-height: 560px) {
  .intro .lede {
    display: none;
  }

  .artifact-notes > p:not(.artifact-label),
  .quick-facts {
    display: none;
  }

  footer {
    display: none;
  }
}

@media (max-width: 700px) and (max-height: 600px) {
  main {
    padding-top: 8px;
    gap: 6px;
  }

  .intro .eyebrow {
    margin-bottom: 4px;
    font-size: 0.62rem;
  }

  h1 {
    margin-bottom: 4px;
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .lede {
    display: none;
  }

  .store-page-link {
    margin-top: 6px;
    padding: 6px 9px;
    font-size: 0.68rem;
  }

  .demo-layout {
    padding: 8px;
  }

  .watch {
    --watch-size: min(240px, 54vw, 42vh);
    margin: calc(var(--watch-size) * 0.1) 0;
  }

  .simulation-status {
    gap: 6px;
    margin-top: 4px;
    font-size: 0.68rem;
  }

  #refresh-stats {
    padding: 3px 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .archive-links a {
    transition: none;
  }

  .store-page-link {
    transition: none;
  }
}
