/* hiddenliquid.com. One idea carries the page: the price is the surface of the water, and your stops
   lie under it, sealed, where nobody can see them. Above the surface (the light hero) is what
   anyone sees; the rest of the page is the water. Tokens are the app's (web/src/styles.css); coral
   marks stop levels only, as it does on the app's chart. */
:root {
  --foam: #eaf2ff;
  --air: #dbe7f8;
  --foam-ink: #0a1526;
  --foam-soft: #42567a;
  --surface: #5be0f0;
  --surface-ink: #03121c;
  --shallow: #123150;
  --deep: #0a1526;
  --abyss: #050b16;
  --stop: #ff6b81;
  --ink: #eaf2ff;
  --ink-soft: #9fb2cf;
  --ink-faint: #5f7393;
  --rule: #1b2c47;
  --seal: repeating-linear-gradient(45deg, rgba(91, 224, 240, 0.55) 0 1px, transparent 1px 4px);
  --font: 'Instrument Sans', system-ui, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--abyss);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--surface);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Everything sits in one column of a readable width, however wide the window. */
.wrap {
  width: 100%;
  max-width: calc(1180px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1,
h2,
.claim {
  font-family: var(--font-display);
  font-variation-settings: 'wdth' 88, 'opsz' 48;
  font-weight: 750;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

/* Only the headline goes narrow and tight: it is the picture. */
h1 {
  font-variation-settings: 'wdth' 76, 'opsz' 96;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 28px;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.3;
}

p {
  margin: 0;
}

.btn {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.btn-dark {
  background: var(--foam-ink);
  color: var(--foam);
}

.btn-dark:hover {
  background: #17304f;
}

.btn-mint {
  background: var(--surface);
  color: var(--surface-ink);
}

.btn-mint:hover {
  background: #86eaf5;
}

/* Above the surface */
.air {
  background: var(--foam);
  color: var(--foam-ink);
}

.top {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-block: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 750 1.6rem/1 var(--font-display);
  font-variation-settings: 'wdth' 85;
  letter-spacing: -0.01em;
}

.top nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.top nav a {
  color: var(--foam-soft);
  text-decoration: none;
  font-size: 1rem;
}

.top nav a:hover {
  color: var(--foam-ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(24px, 6vh, 72px) clamp(40px, 6vh, 72px);
}

.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(3.4rem, 6.6vw, 6.4rem);
  line-height: 0.88;
}

.lede {
  max-width: 34ch;
  margin-bottom: 32px;
  color: var(--foam-soft);
  font-size: clamp(1.1rem, 1.35vw, 1.25rem);
}

.actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.quiet {
  color: var(--foam-soft);
  font-weight: 650;
}

/* The tank: a cross-section of water. Air above the surface, the stops below it, each as deep as
   it is below the price. */
.tank {
  --surface-y: 132px;
  position: relative;
  margin: 0;
  min-height: 540px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    var(--air) 0 var(--surface-y),
    var(--shallow) var(--surface-y),
    var(--deep) 62%,
    var(--abyss) 100%
  );
  box-shadow: 0 36px 70px rgba(5, 11, 22, 0.22);
  color: var(--ink);
}

.view-toggle {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: rgba(10, 21, 38, 0.08);
}

.view-toggle button {
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--foam-soft);
  font: 650 0.95rem var(--font);
  cursor: pointer;
}

.view-toggle button[aria-pressed='true'] {
  background: var(--foam-ink);
  color: var(--foam);
}

.waterline {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--surface-y) - 20px);
  height: 40px;
  overflow: hidden;
}

.waterline svg {
  display: block;
  width: 200%;
  height: 100%;
  animation: swell 12s linear infinite;
}

.waterline path {
  fill: var(--shallow);
}

.waterline .crest {
  fill: none;
  stroke: var(--surface);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

@keyframes swell {
  to {
    transform: translateX(-50%);
  }
}

/* The price floats on the surface. */
.price {
  position: absolute;
  right: 24px;
  top: calc(var(--surface-y) - 62px);
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--foam-soft);
  font-size: 0.95rem;
}

.price strong {
  color: var(--foam-ink);
  font: 800 2.2rem/1 var(--font-display);
  font-variation-settings: 'wdth' 80;
}

.stops {
  list-style: none;
  margin: 0;
  padding: 0;
}

@keyframes sink {
  from {
    opacity: 0;
    transform: translateY(calc(-1 * var(--fall, 40px)));
  }
}

.stops li {
  position: absolute;
  left: 24px;
  right: 24px;
  display: grid;
  grid-template-columns: 1fr auto 5.5em;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 8px solid transparent;
  border-image: var(--seal) 0 0 100% 0 / 0 0 8px 0;
  /* Backwards only: after it, the bots view may hide them again. */
  animation: sink 1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  transition: opacity 0.5s ease, filter 0.5s ease;
}

/* Depth below the surface, by how far below the price. */
.stops .d3 {
  top: calc(var(--surface-y) + 46px);
  --fall: 40px;
  animation-delay: 0.2s;
}

.stops .d8 {
  top: calc(var(--surface-y) + 150px);
  --fall: 130px;
  animation-delay: 0.4s;
}

.stops .d15 {
  top: calc(var(--surface-y) + 300px);
  --fall: 260px;
  animation-delay: 0.6s;
}

.stops span {
  color: var(--ink-soft);
}

.stops strong {
  color: var(--stop);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stops em {
  color: var(--ink-faint);
  font-style: normal;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bots-note {
  position: absolute;
  left: 24px;
  right: 24px;
  top: calc(var(--surface-y) + 120px);
  max-width: 30ch;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tank[data-view='bots'] .stops li {
  opacity: 0;
  filter: blur(6px);
}

.tank[data-view='bots'] .bots-note {
  opacity: 1;
}

.shore {
  display: block;
  width: 100%;
  height: clamp(36px, 5vw, 64px);
  margin-top: -1px;
}

.shore path {
  fill: var(--abyss);
}

.shore .crest {
  fill: none;
  stroke: var(--surface);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

/* The water */
main > section {
  padding-block: clamp(72px, 10vw, 128px) 0;
}

main > section:first-child {
  padding-top: clamp(40px, 6vw, 80px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 48px;
  margin-bottom: 32px;
}

.section-head h2 {
  margin: 0;
}

.section-head p {
  max-width: 52ch;
  color: var(--ink-soft);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 14px;
  /* Lit from the surface above. */
  box-shadow: 0 -1px 0 rgba(91, 224, 240, 0.4), 0 40px 90px rgba(0, 0, 0, 0.55);
}

/* A real sequence, so numbered */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 16px;
  color: var(--surface);
  font: 800 3rem/1 var(--font-display);
  font-variation-settings: 'wdth' 75;
}

.steps p,
.checks p,
.faq p {
  color: var(--ink-soft);
}

.claim {
  max-width: 22ch;
  margin-bottom: 48px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
}

/* Checks, one a row: what is claimed, why, and where to see it. */
.checks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr) minmax(0, 0.8fr);
  gap: 16px 40px;
  align-items: baseline;
  padding-block: 26px;
  border-top: 1px solid var(--rule);
}

.checks li:last-child {
  border-bottom: 1px solid var(--rule);
}

.checks h3 {
  margin: 0;
}

.checks a {
  justify-self: end;
  color: var(--surface);
  font-size: 1rem;
}

.fees dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
}

.fees dt {
  font: 800 clamp(2.8rem, 5vw, 4rem) / 1 var(--font-display);
  font-variation-settings: 'wdth' 75;
  font-variant-numeric: tabular-nums;
}

.fees dd {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

.faq-list {
  max-width: 780px;
}

details {
  border-top: 1px solid var(--rule);
}

details:last-child {
  border-bottom: 1px solid var(--rule);
}

summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  color: var(--surface);
  font-weight: 400;
}

details[open] summary::after {
  content: '−';
}

details p {
  max-width: 64ch;
  padding-bottom: 22px;
}

/* The way in, at the bottom of the water */
.close {
  padding-bottom: clamp(72px, 10vw, 128px);
}

.close h2 {
  margin-bottom: 12px;
}

.close p {
  max-width: 52ch;
  margin-bottom: 28px;
  color: var(--ink-soft);
}

.bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding-block: 28px 40px;
  /* The rule spans the content, not the gutters. */
  background: linear-gradient(var(--rule), var(--rule)) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px;
  color: var(--ink-faint);
  font-size: 0.95rem;
}

.bottom .brand {
  margin-right: auto;
  color: var(--ink);
  font-size: 1.25rem;
}

.bottom a {
  color: var(--ink-soft);
}

@media (max-width: 960px) {
  .top nav {
    display: none;
  }

  .top .btn {
    margin-left: auto;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .lede {
    max-width: 52ch;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .checks li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .checks a {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 1.05rem;
  }

  .brand {
    font-size: 1.35rem;
  }

  .brand img {
    width: 26px;
    height: auto;
  }

  .top .btn {
    padding: 11px 16px;
  }

  .tank {
    --surface-y: 136px;
    min-height: 490px;
  }

  .view-toggle {
    top: 14px;
    left: 14px;
  }

  .price {
    right: 18px;
    top: calc(var(--surface-y) - 56px);
  }

  .price strong {
    font-size: 1.8rem;
  }

  .stops li {
    left: 16px;
    right: 16px;
    grid-template-columns: 1fr auto;
    row-gap: 2px;
  }

  .stops strong {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .stops em {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    font-size: 0.9rem;
  }

  .stops .d8 {
    top: calc(var(--surface-y) + 140px);
  }

  .stops .d15 {
    top: calc(var(--surface-y) + 260px);
  }

  .fees dl {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .waterline svg,
  .stops li {
    animation: none;
  }

  .stops li,
  .bots-note {
    transition: none;
  }
}
