/* The downgrade window of Driftboard, a made-up SaaS, on a near black page. The plan card sits in the middle; the
   window opens out of it with a clip that grows from the card's own rectangle, so card and window are the same plate.
   One accent, a warm amber: the ticks, the hold ring and what would be archived. */
:root {
  --page: #0b0b0c;          /* the page */
  --plate: #151517;         /* the card and the window */
  --plate-hi: #1c1c1f;      /* the tiles of the two plans */
  --edge: rgba(255, 255, 255, 0.075); /* thin edges */
  --edge-hi: rgba(255, 255, 255, 0.16); /* the edge that catches the light */
  --ink: #ededee;           /* the words */
  --muted: #8b8b93;         /* the small words */
  --off: #5a5a61;           /* what is switched off */
  --accent: #f0b45a;        /* the one accent, warm amber */
  --button: #f2f2f3;        /* the main button */
  --button-ink: #0b0b0c;    /* the words on it */
}

* { box-sizing: border-box; }

html { touch-action: manipulation; }

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

p, h1, h2, ul { margin: 0; padding: 0; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 12px;
}

.glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(120vw, 900px);
  height: min(90vh, 640px);
  transform: translate(-50%, -54%);
  background: radial-gradient(closest-side, rgba(240, 180, 90, 0.07), rgba(240, 180, 90, 0.02) 55%, transparent);
  pointer-events: none;
}

/* ---- the plan card ---- */
.plan {
  grid-area: 1 / 1;
  position: relative;
  width: min(340px, calc(100vw - 32px));
  border-radius: 18px;
  background: linear-gradient(180deg, #19191c, var(--plate) 60%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px var(--edge),
    0 18px 40px -18px rgba(0, 0, 0, 0.7),
    0 2px 6px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.plan__sheen {
  position: absolute;
  inset: -40% auto -40% -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  transform: skewX(-12deg);
  opacity: 0;
  pointer-events: none;
}

.plan__face {
  padding: 18px 18px 16px;
}

.plan__face--free {
  position: absolute;
  inset: 0;
  visibility: hidden;
}

.plan__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  font-variation-settings: 'wdth' 104;
  color: var(--ink);
}

.brand svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.tag {
  font-size: 11px;
  font-weight: 560;
  color: var(--accent);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(240, 180, 90, 0.1);
  box-shadow: inset 0 0 0 1px rgba(240, 180, 90, 0.22);
}

.tag--quiet {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--edge);
}

.plan__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.plan__name {
  font-size: 30px;
  line-height: 1;
  font-weight: 640;
  font-variation-settings: 'wdth' 112;
  letter-spacing: -0.02em;
}

.plan__price {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.plan__price span {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.plan__meta {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.soft,
.up {
  position: relative;
  margin-top: 16px;
  width: 100%;
  height: 38px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 580;
  overflow: hidden;
}

.soft {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--edge-hi);
  transition: background 0.25s, box-shadow 0.25s;
}

.soft.is-ghosthover { background: rgba(255, 255, 255, 0.09); }

.up {
  color: var(--button-ink);
  background: var(--accent);
  box-shadow: 0 6px 18px -8px rgba(240, 180, 90, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.up__light {
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-16deg);
}

.up__text { position: relative; }

@media (hover: hover) {
  .soft:hover { background: rgba(255, 255, 255, 0.09); }
  .keep:hover { background: rgba(255, 255, 255, 0.08); }
}

/* ---- the scrim and the window ---- */
.scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 6, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
}

.window {
  grid-area: 1 / 1;
  position: relative;
  width: min(420px, calc(100vw - 20px));
  pointer-events: none;
}

.window__shadow {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--edge);
  opacity: 0;
}

.modal {
  position: relative;
  border-radius: 20px;
  background: linear-gradient(180deg, #1a1a1d, var(--plate) 40%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px var(--edge);
  pointer-events: auto;
}

.modal { visibility: hidden; }

.modal__in {
  padding: clamp(14px, 4.2vh, 22px) clamp(14px, 4vw, 22px);
}

.head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.head__title {
  font-size: clamp(17px, 5vh, 21px);
  line-height: 1.15;
  font-weight: 640;
  font-variation-settings: 'wdth' 108;
  letter-spacing: -0.015em;
}

.head__sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

.bill {
  text-align: right;
  flex: none;
}

.bill__label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.bill__sum {
  display: inline-flex;
  font-size: clamp(22px, 6.4vh, 28px);
  line-height: 1;
  font-weight: 640;
  font-variation-settings: 'wdth' 100;
  letter-spacing: -0.02em;
}

.col {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  vertical-align: top;
}

.col--tens { width: 0.62em; }

.col__strip {
  display: flex;
  flex-direction: column;
}

.col__strip span {
  height: 1em;
  line-height: 1;
}

/* the two plans side by side, with a frame that slides from Pro to Free */
.tiers {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: clamp(10px, 3.4vh, 18px);
}

.tier {
  position: relative;
  z-index: 1;
  padding: clamp(7px, 2.2vh, 10px) 12px;
  border-radius: 12px;
  background: var(--plate-hi);
  box-shadow: inset 0 0 0 1px var(--edge);
}

.tier__name {
  display: block;
  font-size: 14px;
  font-weight: 620;
  font-variation-settings: 'wdth' 106;
}

.tier__note {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.tiers__frame {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(240, 180, 90, 0.55), 0 0 18px -6px rgba(240, 180, 90, 0.45);
  pointer-events: none;
}

.tiers__arrow {
  width: 22px;
  height: 12px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* the features */
.feats {
  list-style: none;
  margin-top: clamp(8px, 2.6vh, 14px);
}

.feat {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  height: clamp(21px, 5.3vh, 30px);
  font-size: 13px;
}

.feat + .feat { border-top: 1px solid rgba(255, 255, 255, 0.045); }

.feat__mark {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(240, 180, 90, 0.13);
  box-shadow: inset 0 0 0 1px rgba(240, 180, 90, 0.28);
}

.feat__mark svg {
  position: absolute;
  inset: 1px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.feat__name {
  position: relative;
  justify-self: start;
  white-space: nowrap;
  color: var(--ink);
}

.feat__strike {
  position: absolute;
  left: -2px;
  right: -2px;
  top: 52%;
  height: 1px;
  background: var(--muted);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.feat__free,
.feat__keep {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.feat__free { opacity: 0; }

.feat__keep { color: var(--off); }

/* what happens to the projects */
.data {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(8px, 2.6vh, 14px);
  padding: clamp(7px, 2vh, 10px) 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px var(--edge);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(4, 9px);
  gap: 3px;
  flex: none;
}

.tiles i {
  display: block;
  width: 9px;
  height: 7px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.data__window {
  position: relative;
  display: block;
  flex: 1;
  height: 16px;
  overflow: hidden;
  font-size: 12px;
  line-height: 16px;
}

.data__line {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  color: var(--muted);
}

.data__line--warn {
  color: var(--accent);
  opacity: 0;
}

/* the two buttons */
.foot {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  margin-top: clamp(10px, 3.4vh, 18px);
}

.keep,
.switch {
  position: relative;
  height: clamp(36px, 9.6vh, 42px);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 580;
}

.keep {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--edge-hi);
  transition: background 0.25s;
}

.keep.is-ghosthover { background: rgba(255, 255, 255, 0.08); }

.switch {
  color: var(--button-ink);
  background: var(--button);
  box-shadow: inset 0 1px 0 #fff, 0 8px 20px -10px rgba(255, 255, 255, 0.35);
}

.switch__ring {
  position: absolute;
  left: -6px;
  top: -6px;
  overflow: visible;
  pointer-events: none;
}

.switch__ring path {
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.switch__track {
  stroke: rgba(240, 180, 90, 0.18);
  opacity: 0;
}

.switch__fill {
  stroke: var(--accent);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.switch__window {
  position: relative;
  display: block;
  height: 18px;
  overflow: hidden;
}

.switch__strip {
  display: flex;
  flex-direction: column;
}

.switch__line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 18px;
  line-height: 18px;
  white-space: nowrap;
}

.spin {
  width: 14px;
  height: 14px;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.spin circle { stroke: rgba(11, 11, 12, 0.16); }
.spin path { stroke: var(--button-ink); }

.keep:focus-visible,
.switch:focus-visible,
.soft:focus-visible,
.up:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* the cursor of the tour */
.ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  margin: -3px 0 0 -4px;
  fill: #f4f4f5;
  stroke: #0b0b0c;
  stroke-width: 1.3;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}

/* short screens: the subtitle goes, the rows tighten */
@media (max-height: 470px) {
  .head__sub { display: none; }
  .plan__face { padding: 15px 16px 14px; }
  .plan__top { margin-bottom: 12px; }
  .soft, .up { margin-top: 12px; height: 34px; }
}

@media (max-width: 360px) {
  .feat { font-size: 12.5px; gap: 8px; }
  .tier { padding-left: 10px; padding-right: 10px; }
}
