:root {
  --bg: #05080c;
  --panel: rgba(10, 18, 25, 0.76);
  --panel-strong: #0b151d;
  --text: #f4fbfc;
  --muted: #91a8b2;
  --quiet: #60737d;
  --line: rgba(153, 215, 217, 0.16);
  --line-strong: rgba(126, 238, 234, 0.28);
  --teal: #1fe3d2;
  --teal-soft: #7ff8ef;
  --coral: #ff6259;
  --violet: #a78bfa;
  --radius: 24px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

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

.home-page {
  min-width: 300px;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 42%, rgba(21, 59, 66, 0.18), transparent 34%),
    linear-gradient(145deg, #05080c 0%, #070c12 48%, #05080c 100%);
}

.home-page::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(115, 207, 209, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115, 207, 209, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, black 24%, black 75%, transparent);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.11) 0 0.5px, transparent 0.7px),
    radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.08) 0 0.5px, transparent 0.7px);
  background-position: 0 0, 7px 9px;
  background-size: 13px 13px, 17px 17px;
  mix-blend-mode: soft-light;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: min(48vw, 720px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.13;
  animation: ambient-drift 14s var(--ease) infinite alternate;
}

.ambient-teal {
  top: -28%;
  left: 20%;
  background: var(--teal);
}

.ambient-coral {
  right: -16%;
  bottom: -40%;
  background: var(--coral);
  animation-delay: -7s;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding:
    max(12px, env(safe-area-inset-top))
    max(clamp(18px, 3vw, 52px), env(safe-area-inset-right))
    max(9px, env(safe-area-inset-bottom))
    max(clamp(18px, 3vw, 52px), env(safe-area-inset-left));
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr) 26px;
  gap: 7px;
}

.topbar,
.home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar {
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.brand-icon-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.brand-icon-wrap::before {
  position: absolute;
  inset: 8px;
  content: "";
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--coral));
  filter: blur(12px);
  opacity: 0.72;
  animation: icon-breathe 4s ease-in-out infinite;
}

.brand-icon {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 9px;
}

.brand-wordmark {
  font-size: 18px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(31, 227, 210, 0.1), 0 0 16px rgba(31, 227, 210, 0.7);
}

.meta-separator {
  width: 1px;
  height: 12px;
  background: var(--line-strong);
}

.home-main {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(370px, 1.2fr) minmax(220px, 0.8fr);
  align-items: center;
  gap: clamp(28px, 5vw, 84px);
  padding: clamp(7px, 1.7vh, 18px) 0 clamp(3px, 1vh, 10px);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.eyebrow,
.toolbelt-kicker {
  margin: 0;
  color: var(--teal-soft);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: clamp(9px, 0.78vw, 11px);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  margin-right: 7px;
  text-shadow: 0 0 12px var(--teal);
}

.hero h1 {
  margin: clamp(8px, 1.4vh, 14px) 0 0;
  font-size: clamp(42px, 5.15vw, 78px);
  font-weight: 780;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero h1 span {
  display: inline-block;
  padding: 0 0.12em 0.04em 0;
  color: transparent;
  background: linear-gradient(93deg, var(--teal-soft) -5%, #f5ffff 44%, #ffd1ce 104%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-lede {
  max-width: 530px;
  margin: clamp(13px, 2vh, 22px) 0 0;
  color: #b4c4ca;
  font-size: clamp(14px, 1.22vw, 18px);
  line-height: 1.48;
  letter-spacing: -0.015em;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: clamp(12px, 1.8vh, 18px);
  color: var(--muted);
  font-size: clamp(10px, 0.82vw, 12px);
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-row i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 9px rgba(31, 227, 210, 0.8);
}

.trust-row span:last-child i {
  background: var(--coral);
  box-shadow: 0 0 9px rgba(255, 98, 89, 0.76);
}

.cta-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: clamp(16px, 2.5vh, 28px);
}

.button {
  min-height: 52px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 240ms var(--ease), border-color 240ms ease, box-shadow 240ms ease, background 240ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0) scale(0.985);
}

.button-primary {
  position: relative;
  min-width: min(250px, 65%);
  padding: 7px 48px 7px 20px;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  color: #061011;
  background: linear-gradient(105deg, #edfffd 0%, #b5fff8 58%, #ffccc9 145%);
  box-shadow: 0 14px 42px rgba(31, 227, 210, 0.15);
}

.button-primary::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(105deg, transparent 15%, rgba(255, 255, 255, 0.8) 42%, transparent 67%);
  transform: translateX(-130%);
  transition: transform 700ms var(--ease);
}

.button-primary:hover::before {
  transform: translateX(130%);
}

.button-kicker,
.button-label,
.button-arrow {
  position: relative;
  z-index: 1;
}

.button-kicker {
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
}

.button-label {
  margin-top: 3px;
  font-size: 17px;
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.035em;
}

.button-arrow {
  position: absolute;
  top: 50%;
  right: 18px;
  font-size: 19px;
  transform: translateY(-50%);
}

.button-secondary {
  min-width: 116px;
  gap: 12px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  color: #d9eaed;
  background: rgba(12, 23, 31, 0.66);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 680;
  backdrop-filter: blur(18px);
}

.button-secondary:hover {
  border-color: rgba(31, 227, 210, 0.52);
  background: rgba(17, 34, 42, 0.86);
  box-shadow: 0 12px 34px rgba(31, 227, 210, 0.08), inset 0 1px rgba(255, 255, 255, 0.05);
}

.button:focus-visible,
.view-all-button:focus-visible,
.dialog-close:focus-visible {
  outline: 2px solid var(--teal-soft);
  outline-offset: 3px;
}

.demo-zone {
  position: relative;
  min-width: 0;
  width: min(100%, 330px);
  height: min(58vh, 560px);
  max-height: 100%;
  justify-self: center;
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.demo-zone::before {
  position: absolute;
  z-index: -1;
  inset: 6% -16% -5%;
  content: "";
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(31, 227, 210, 0.35), rgba(255, 98, 89, 0.26));
  filter: blur(44px);
  opacity: 0.52;
}

.demo-card {
  position: relative;
  overflow: visible;
  height: 100%;
  aspect-ratio: 1350 / 2760;
  background: transparent;
  filter:
    drop-shadow(0 30px 45px rgba(0, 0, 0, 0.48))
    drop-shadow(-12px -8px 30px rgba(31, 227, 210, 0.08))
    drop-shadow(14px 10px 34px rgba(255, 98, 89, 0.08));
  transform: rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg));
  transform-style: preserve-3d;
  transition: transform 400ms var(--ease), filter 400ms ease;
  will-change: transform;
}

.demo-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  background: transparent;
}

.demo-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-clip-path: inset(0.7% 1.15% 0.8% round 22.3% / 7.35%);
  clip-path: inset(0.7% 1.15% 0.8% round 22.3% / 7.35%);
  opacity: 0;
  transition: opacity 360ms ease;
}

.demo-frame[data-has-demo="true"] .demo-video {
  opacity: 1;
}

.demo-frame[data-has-demo="true"] .demo-fallback {
  opacity: 0;
  visibility: hidden;
}

.demo-toggle {
  position: absolute;
  z-index: 9;
  right: 9px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(218, 248, 248, 0.3);
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  color: white;
  background: rgba(3, 8, 11, 0.66);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: opacity 220ms ease, visibility 220ms ease, transform 220ms var(--ease), border-color 220ms ease;
}

.demo-frame[data-has-metadata="true"] .demo-toggle {
  opacity: 1;
  visibility: visible;
}

.demo-toggle:hover {
  border-color: rgba(126, 238, 234, 0.72);
  transform: scale(1.06);
}

.demo-toggle:focus-visible {
  outline: 2px solid var(--teal-soft);
  outline-offset: 2px;
}

.demo-toggle span::before,
.demo-toggle span::after {
  position: absolute;
  top: 9px;
  width: 3px;
  height: 11px;
  content: "";
  border-radius: 1px;
  background: currentColor;
}

.demo-toggle span::before { left: 10px; }
.demo-toggle span::after { right: 10px; }

.demo-toggle.is-paused span::before {
  top: 8px;
  left: 11px;
  width: 10px;
  height: 13px;
  border-radius: 0;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.demo-toggle.is-paused span::after {
  display: none;
}

.demo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(177, 237, 238, 0.2);
  border-radius: clamp(28px, 5vh, 46px);
  background:
    radial-gradient(circle at 22% 30%, rgba(31, 227, 210, 0.12), transparent 30%),
    radial-gradient(circle at 78% 70%, rgba(255, 98, 89, 0.11), transparent 32%),
    #03070b;
  text-align: center;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.demo-fallback > img {
  width: clamp(54px, 8vh, 76px);
  border-radius: 24%;
  filter: drop-shadow(-10px 8px 24px rgba(31, 227, 210, 0.16)) drop-shadow(12px 6px 24px rgba(255, 98, 89, 0.13));
  animation: fallback-float 5s ease-in-out infinite;
}

.demo-fallback > div {
  display: grid;
  gap: 6px;
}

.demo-fallback strong {
  font-size: clamp(12px, 1.5vh, 15px);
  letter-spacing: -0.03em;
}

.demo-fallback span {
  color: var(--muted);
  font-size: 8px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(31, 227, 210, 0.1);
  border-radius: 50%;
  pointer-events: none;
  transform: rotate(-12deg);
}

.orbit-one {
  width: 130%;
  height: 62%;
  top: 19%;
  left: -15%;
}

.orbit-two {
  width: 108%;
  height: 92%;
  top: 4%;
  left: -4%;
  border-color: rgba(255, 98, 89, 0.09);
  transform: rotate(20deg);
}

.floating-chip {
  position: absolute;
  z-index: 7;
  height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(176, 236, 237, 0.22);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b9ced3;
  background: rgba(8, 18, 24, 0.86);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: chip-float 5s ease-in-out infinite;
}

.floating-chip span {
  color: var(--teal-soft);
}

.floating-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 8px rgba(255, 98, 89, 0.8);
}

.floating-chip-top {
  top: -12px;
  right: 8%;
}

.floating-chip-bottom {
  right: -12px;
  bottom: 15%;
  animation-delay: -2.5s;
}

.toolbelt {
  position: relative;
  min-width: 0;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.toolbelt-heading {
  min-height: 35px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
}

.toolbelt-kicker {
  color: var(--quiet);
  font-size: 8px;
}

.toolbelt h2 {
  margin: 3px 0 0;
  color: #d9e8eb;
  font-size: clamp(13px, 1.22vw, 17px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.view-all-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(11, 22, 29, 0.66);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms var(--ease);
}

.view-all-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.tool-grid {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 5px;
  list-style: none;
}

.tool-grid li {
  position: relative;
  min-width: 0;
  height: 27px;
  padding: 0 8px;
  border: 1px solid rgba(134, 207, 208, 0.11);
  border-radius: 7px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #9fb3ba;
  background: rgba(9, 19, 26, 0.68);
  font-size: clamp(8px, 0.63vw, 10px);
  font-weight: 630;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms var(--ease);
}

.tool-grid li::before {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  margin-right: 6px;
  border-radius: 50%;
  content: "";
  background: var(--teal);
  box-shadow: 0 0 8px rgba(31, 227, 210, 0.5);
}

.tool-grid li[data-tone="coral"]::before {
  background: var(--coral);
  box-shadow: 0 0 8px rgba(255, 98, 89, 0.48);
}

.tool-grid li[data-tone="violet"]::before {
  background: var(--violet);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.48);
}

.tool-grid li[data-pro="true"]::after {
  margin-left: auto;
  padding-left: 4px;
  color: #d9cfff;
  content: "PRO";
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 5px;
  letter-spacing: 0.07em;
}

.tool-grid li:hover {
  z-index: 2;
  overflow: visible;
  color: var(--text);
  border-color: rgba(126, 238, 234, 0.27);
  background: #10202a;
  transform: translateY(-2px);
}

.tool-rails {
  display: none;
  gap: 4px;
}

.rail-viewport {
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
}

.rail-track {
  width: max-content;
  display: flex;
  gap: 4px;
  animation: rail-left 34s linear infinite;
}

.rail-track.rail-reverse {
  animation-name: rail-right;
  animation-duration: 38s;
}

.rail-track.rail-slow {
  animation-duration: 42s;
}

.rail-track span {
  height: 23px;
  padding: 0 10px;
  border: 1px solid rgba(134, 207, 208, 0.12);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  color: #9fb3ba;
  background: rgba(9, 19, 26, 0.72);
  font-size: 9px;
  font-weight: 620;
  white-space: nowrap;
}

.home-footer {
  color: var(--quiet);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-note {
  color: #435660;
}

.tools-dialog {
  width: min(900px, calc(100% - 30px));
  max-height: calc(100svh - 30px);
  margin: auto;
  padding: clamp(18px, 3vw, 32px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(126, 238, 234, 0.26);
  border-radius: 24px;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(31, 227, 210, 0.11), transparent 31%),
    radial-gradient(circle at 100% 100%, rgba(255, 98, 89, 0.08), transparent 30%),
    rgba(6, 13, 19, 0.97);
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.7), inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(28px);
}

.tools-dialog::backdrop {
  background: rgba(0, 4, 7, 0.74);
  backdrop-filter: blur(12px);
}

.tools-dialog[open] {
  animation: dialog-in 280ms var(--ease) both;
}

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

.dialog-head p {
  margin: 0;
  color: var(--teal-soft);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dialog-head h2 {
  margin: 5px 0 0;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #c7dadf;
  background: rgba(13, 27, 35, 0.76);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.dialog-grid {
  margin-top: clamp(18px, 3vh, 30px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.dialog-grid > span {
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid rgba(126, 212, 214, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #b9ccd1;
  background: rgba(11, 23, 30, 0.68);
  font-size: 11px;
  font-weight: 620;
}

.dialog-grid > span::before {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  content: "";
  background: linear-gradient(135deg, var(--teal), var(--coral));
  box-shadow: 0 0 8px rgba(31, 227, 210, 0.35);
}

.dialog-grid small {
  margin-left: auto;
  color: #cdbfff;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-note {
  margin: clamp(14px, 2vh, 20px) 0 0;
  color: var(--quiet);
  font-size: 10px;
  line-height: 1.5;
}

@keyframes ambient-drift { to { transform: translate3d(10%, 8%, 0) scale(1.12); } }
@keyframes icon-breathe { 50% { opacity: 0.4; transform: scale(1.25); } }
@keyframes fallback-float { 50% { transform: translateY(-5px) rotate(-1deg); } }
@keyframes chip-float { 50% { transform: translateY(-5px); } }
@keyframes rail-left { to { transform: translateX(calc(-50% - 2px)); } }
@keyframes rail-right { from { transform: translateX(calc(-50% - 2px)); } to { transform: translateX(0); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }

@media (max-width: 1099px) {
  .tool-grid {
    display: none;
  }

  .tool-rails {
    display: grid;
  }

  .toolbelt-heading {
    min-height: 31px;
    margin-bottom: 5px;
  }
}

@media (min-width: 1100px) and (min-height: 700px) {
  .hero-copy {
    max-width: 780px;
  }

  .hero h1 {
    margin-top: clamp(12px, 1.8vh, 18px);
  }

  .hero-lede {
    max-width: 600px;
    margin-top: clamp(18px, 2.6vh, 28px);
  }

  .trust-row {
    margin-top: clamp(15px, 2.2vh, 22px);
  }

  .cta-row {
    margin-top: clamp(20px, 3vh, 32px);
  }
}

@media (max-width: 900px) {
  .site-shell {
    padding:
      max(8px, env(safe-area-inset-top))
      max(13px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(13px, env(safe-area-inset-left));
    grid-template-rows: 46px minmax(0, 1fr) 21px;
    gap: 5px;
  }

  .brand {
    gap: 8px;
  }

  .brand-icon-wrap {
    width: 32px;
    height: 32px;
  }

  .brand-wordmark {
    font-size: 16px;
  }

  .topbar-meta {
    gap: 7px;
    font-size: 7px;
    letter-spacing: 0.09em;
  }

  .topbar-meta .meta-separator,
  .topbar-meta span:last-child {
    display: none;
  }

  .home-main {
    gap: 5px;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: stretch;
    gap: clamp(22px, 3.2vh, 30px);
    padding: 7px 0 2px;
  }

  .hero-copy {
    max-width: none;
  }

  .eyebrow {
    font-size: 8px;
  }

  .hero h1 {
    margin-top: 7px;
    font-size: clamp(31px, 10.3vw, 42px);
    line-height: 0.98;
  }

  .hero-lede {
    margin-top: 9px;
    max-width: 540px;
    font-size: clamp(11px, 3.2vw, 14px);
    line-height: 1.35;
  }

  .trust-row {
    gap: 5px 12px;
    margin-top: 8px;
    font-size: 8.5px;
  }

  .trust-row span:last-child {
    display: none;
  }

  .cta-row {
    gap: 7px;
    margin-top: 10px;
  }

  .button {
    min-height: 46px;
    border-radius: 13px;
  }

  .button-primary {
    width: min(58vw, 230px);
    min-width: 168px;
    max-width: 230px;
    flex: 0 1 230px;
    padding-right: 42px;
    padding-left: 15px;
  }

  .button-secondary {
    min-width: 96px;
    flex: 0 0 96px;
    padding: 0 12px;
    gap: 8px;
  }

  .button-kicker { font-size: 7px; }
  .button-label { font-size: 15px; }
  .button-arrow { right: 14px; font-size: 16px; }

  .demo-zone {
    height: 100%;
    min-height: 0;
    width: 100%;
    max-width: none;
    max-height: 540px;
    justify-self: stretch;
  }

  .demo-card {
    height: 100%;
    max-width: 100%;
  }

  .demo-fallback {
    padding: 16px;
  }

  .demo-fallback > img {
    width: min(15vw, 68px);
  }

  .demo-fallback strong {
    font-size: 13px;
  }

  .demo-fallback span {
    font-size: 7px;
  }

  .floating-chip {
    height: 24px;
    padding: 0 8px;
    font-size: 6px;
  }

  .floating-chip-top {
    top: 7px;
    right: 5%;
  }

  .floating-chip-bottom {
    right: -5px;
    bottom: 13%;
  }

  .toolbelt {
    padding-top: 5px;
  }

  .toolbelt-heading {
    min-height: 26px;
    margin-bottom: 4px;
  }

  .toolbelt-kicker {
    display: none;
  }

  .toolbelt h2 {
    margin: 0;
    font-size: 12px;
  }

  .view-all-button {
    min-height: 28px;
    padding: 0 9px;
    font-size: 8px;
  }

  .tool-rails {
    gap: 3px;
  }

  .rail-track span {
    height: 20px;
    padding: 0 8px;
    font-size: 9px;
  }

  .home-footer {
    font-size: 8px;
  }

  .footer-note {
    display: none;
  }

  .tools-dialog {
    width: calc(100% - 18px);
    max-height: calc(100svh - 18px);
    padding: 16px;
    border-radius: 18px;
  }

  .dialog-head p {
    font-size: 7px;
  }

  .dialog-head h2 {
    margin-top: 3px;
    font-size: 25px;
  }

  .dialog-close {
    width: 40px;
    height: 40px;
  }

  .dialog-grid {
    margin-top: 13px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .dialog-grid > span {
    min-height: 25px;
    padding: 3px 6px;
    gap: 5px;
    font-size: clamp(8px, 2.5vw, 10px);
    line-height: 1.05;
  }

  .dialog-grid > span::before {
    width: 4px;
    height: 4px;
  }

  .dialog-note {
    margin-top: 10px;
    font-size: 8px;
  }
}

@media (max-height: 650px) {
  .site-shell {
    grid-template-rows: 40px minmax(0, 1fr) 18px;
    padding-top: max(5px, env(safe-area-inset-top));
    padding-bottom: max(4px, env(safe-area-inset-bottom));
    gap: 3px;
  }

  .brand-icon-wrap {
    width: 29px;
    height: 29px;
  }

  .brand-wordmark {
    font-size: 15px;
  }

  .home-main {
    gap: 3px;
  }

  .hero {
    padding-top: 3px;
    padding-bottom: 1px;
  }

  .hero h1 {
    margin-top: 5px;
    font-size: clamp(29px, 6.2vh, 42px);
  }

  .hero-lede {
    margin-top: 6px;
    font-size: 10px;
  }

  .trust-row {
    margin-top: 5px;
  }

  .cta-row {
    margin-top: 7px;
  }

  .button {
    min-height: 42px;
  }

  .toolbelt {
    padding-top: 3px;
  }

  .toolbelt-heading {
    min-height: 22px;
    margin-bottom: 2px;
  }

  .toolbelt h2 {
    font-size: 10px;
  }

  .view-all-button {
    min-height: 24px;
  }

  .rail-track span {
    height: 18px;
    font-size: 8.5px;
  }

  .floating-chip-bottom {
    display: none;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    grid-template-columns: minmax(205px, 0.8fr) minmax(285px, 1.2fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 14px;
  }

  .hero-lede {
    max-width: 390px;
  }

  .trust-row {
    display: none;
  }

  .demo-zone {
    height: 100%;
    max-height: 100%;
  }

  .demo-card {
    height: 100%;
    width: auto;
  }

  .tool-rails {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rail-viewport {
    border-radius: 5px;
  }

  .tools-dialog {
    padding: 12px;
  }

  .dialog-head h2 {
    font-size: 20px;
  }

  .dialog-close {
    width: 34px;
    height: 34px;
  }

  .dialog-grid {
    margin-top: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
  }

  .dialog-grid > span {
    min-height: 22px;
    padding: 2px 4px;
    font-size: 8px;
  }

  .dialog-note {
    margin-top: 7px;
    font-size: 8px;
  }
}

@media (orientation: landscape) and (max-height: 500px) and (max-width: 559px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .demo-zone {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .demo-card {
    transform: none !important;
  }

  .rail-viewport {
    overflow-x: auto;
    mask-image: none;
    scrollbar-width: none;
  }

  .rail-viewport::-webkit-scrollbar {
    display: none;
  }

  .rail-track span:nth-child(n + 10) {
    display: none;
  }
}
