:root {
  color-scheme: light;
  --paper: #f4f0e6;
  --paper-raised: #fffdf7;
  --ink: #0b0e13;
  --ink-raised: #1b1e25;
  --text: #11151b;
  --muted: #565e69;
  --cobalt: #2449dd;
  --lime: #b9ee5b;
  --amber: #d88935;
  --line: rgba(11, 14, 19, 0.3);
  --display: "Instrument Sans", "Arial Narrow", Arial, sans-serif;
  --editorial: "Newsreader", Georgia, serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --page: min(100% - 40px, 1400px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --contact-shadow: 7px 7px 0 var(--ink);
}

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

html {
  scroll-padding-top: 88px;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.72), transparent 28rem),
    var(--paper);
  color: var(--text);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

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

button,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

h1,
h2,
h3,
p,
blockquote,
figure,
ol,
ul {
  margin-top: 0;
}

h1,
h2,
h3 {
  margin-bottom: 0;
  font-family: var(--display);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 0.96;
  overflow-wrap: normal;
  text-wrap: balance;
  word-break: normal;
}

p {
  max-width: 68ch;
}

::selection {
  background: var(--cobalt);
  color: white;
}

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  transform: translateY(-150%);
  background: var(--lime);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: var(--page);
  margin-inline: auto;
}

.micro-label,
.eyebrow,
.screen-label,
.status-pill,
.dev-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.095em;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
  background: var(--paper);
}

.site-header__inner {
  display: flex;
  width: var(--page);
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-inline: auto;
}

.product-brand {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 0.72rem;
  color: var(--ink);
  text-decoration: none;
}

.product-brand__mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
}

.product-brand__copy {
  display: grid;
  gap: 0.1rem;
}

.product-brand__copy strong {
  font-size: 0.98rem;
  line-height: 1;
}

.product-brand__copy span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.5rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nav-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.55rem 0.72rem;
  border-bottom: 2px solid transparent;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover {
  border-bottom-color: var(--ink);
}

.status-pill {
  display: inline-flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  padding: 0.48rem 0.68rem;
  border: 1px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: none;
}

.hero {
  border-bottom: 12px solid var(--cobalt);
  padding: clamp(3rem, 7vw, 7rem) 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.hero__copy {
  min-width: 0;
}

.hero__copy .eyebrow {
  margin-bottom: 1.4rem;
  color: var(--cobalt);
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(4rem, 7.6vw, 8.5rem);
}

.hero__lede {
  margin: 1.8rem 0 0;
  max-width: 35rem;
  font-family: var(--editorial);
  font-size: clamp(1.2rem, 1.8vw, 1.62rem);
  line-height: 1.42;
}

.hero__actions,
.actions,
.remote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero__actions {
  margin-top: 2rem;
}

.button,
button {
  display: inline-flex;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.78rem 1rem;
  background: var(--paper-raised);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease),
    background-color 180ms ease;
}

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

.button:active,
button:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.button--primary,
#setupBtn,
#remoteSigninBtn,
#remoteOpenBtn {
  background: var(--cobalt);
  box-shadow: 4px 4px 0 var(--ink);
  color: white;
}

.button--primary:hover,
#setupBtn:hover,
#remoteSigninBtn:hover,
#remoteOpenBtn:hover {
  background: #214be7;
  box-shadow: 6px 6px 0 var(--ink);
}

.button--secondary,
button.secondary,
.button.secondary {
  background: var(--paper-raised);
  box-shadow: 4px 4px 0 rgba(11, 14, 19, 0.28);
}

.button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.48;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.hero__note {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.hero-proof {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 2px solid var(--ink);
  background: var(--ink);
  box-shadow: 12px 12px 0 var(--cobalt);
}

.hero-proof__top,
.screen-frame__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 42px;
  padding: 0.65rem 0.8rem;
  background: var(--lime);
  color: var(--ink);
}

.hero-proof__top span:last-child {
  text-align: right;
}

.hero-proof video {
  width: 100%;
  max-height: 660px;
  margin-inline: auto;
  background: var(--ink);
  object-fit: contain;
}

.hero-proof figcaption,
.screen-frame figcaption {
  margin: 0;
  padding: 0.9rem 1rem;
  background: var(--ink);
  color: #f7f3ea;
  font-family: var(--editorial);
  font-size: 1rem;
}

.section {
  padding: clamp(4.5rem, 9vw, 8.5rem) 0;
}

.section--ink {
  border-bottom: 12px solid var(--lime);
  background: var(--ink);
  color: #f7f3ea;
}

.section--cobalt {
  border-bottom: 12px solid var(--ink);
  background: var(--cobalt);
  color: white;
}

.section--lime {
  border-block: 2px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: 2rem;
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

.section-heading .eyebrow {
  margin: 0;
  color: var(--cobalt);
}

.section--ink .section-heading .eyebrow {
  color: var(--lime);
}

.section--cobalt .section-heading .eyebrow {
  color: white;
}

.section-heading h2 {
  max-width: 18ch;
  font-size: clamp(2.7rem, 5.7vw, 6.6rem);
}

.section-heading p {
  margin: 1.4rem 0 0;
  font-family: var(--editorial);
  font-size: clamp(1.15rem, 1.7vw, 1.48rem);
  line-height: 1.5;
}

.difference-intro {
  max-width: 930px;
  margin: 0 0 clamp(3rem, 6vw, 5rem);
  font-family: var(--editorial);
  font-size: clamp(1.55rem, 3.2vw, 3.3rem);
  line-height: 1.17;
}

.difference-list {
  margin: 0;
  border-top: 2px solid rgba(247, 243, 234, 0.7);
}

.difference-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.62fr) minmax(0, 1.38fr);
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(247, 243, 234, 0.38);
}

.difference-row dt {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.difference-row dd {
  margin: 0;
  max-width: 44rem;
  font-family: var(--editorial);
  font-size: clamp(1.12rem, 1.7vw, 1.45rem);
}

.origin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: end;
  gap: clamp(3rem, 8vw, 8rem);
}

.origin-quote {
  margin: 0;
  max-width: 25ch;
  font-family: var(--editorial);
  font-size: clamp(2.1rem, 4.4vw, 5rem);
  font-weight: 450;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.origin-proof {
  padding: 1.5rem;
  border: 2px solid white;
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.origin-proof p {
  margin-bottom: 1.3rem;
  font-family: var(--editorial);
  font-size: 1.12rem;
}

.origin-proof strong {
  font-family: var(--display);
  font-size: 1.28rem;
  line-height: 1.2;
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

.screen-frame {
  min-width: 0;
  margin: 0;
  border: 2px solid var(--ink);
  background: var(--ink);
  box-shadow: var(--contact-shadow);
}

.screen-frame:nth-child(2) {
  margin-top: clamp(2rem, 8vw, 7rem);
  box-shadow: 7px 7px 0 var(--cobalt);
}

.screen-frame__viewport {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: clamp(0.65rem, 2vw, 1.4rem);
  background: #05070a;
}

.screen-frame__viewport img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 76svh;
  object-fit: contain;
}

.rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: start;
  gap: clamp(3rem, 8vw, 8rem);
}

.rules-grid h2 {
  max-width: 12ch;
  font-size: clamp(3rem, 6.3vw, 7rem);
}

.rules-copy {
  padding-top: 0.5rem;
}

.rules-copy > p {
  margin-bottom: 2rem;
  font-family: var(--editorial);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
}

.rules-list {
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
  list-style: none;
}

.rules-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(11, 14, 19, 0.42);
  font-size: 1.08rem;
  font-weight: 600;
}

.rules-list span {
  font-family: var(--mono);
  font-size: 0.72rem;
}

.setup-section {
  border-bottom: 12px solid var(--cobalt);
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  align-items: start;
  gap: clamp(3rem, 7vw, 7rem);
}

.setup-panel,
.setup-aside,
.remote-card,
.remote-device,
.remote-log {
  min-width: 0;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
}

.setup-panel {
  padding: clamp(1.4rem, 4vw, 2.7rem);
  box-shadow: 10px 10px 0 var(--ink);
}

.gate-tag {
  display: inline-flex;
  margin-bottom: 1.4rem;
  padding: 0.34rem 0.5rem;
  border: 1px solid var(--ink);
  background: var(--lime);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.setup-panel h2,
.setup-aside h2 {
  font-size: clamp(2.5rem, 5vw, 5.6rem);
}

.setup-panel > p,
.setup-aside > p {
  margin: 1.25rem 0 0;
  font-family: var(--editorial);
  font-size: 1.16rem;
}

.steps {
  margin: 2rem 0;
  border-top: 2px solid var(--ink);
}

.step {
  display: grid;
  grid-template-columns: minmax(145px, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.step strong {
  font-family: var(--mono);
  font-size: 0.73rem;
}

.step span {
  font-family: var(--editorial);
}

.command-box {
  margin-top: 1.3rem;
}

.command-box textarea {
  width: 100%;
  min-height: 152px;
  resize: vertical;
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 1rem;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
}

.command-box .actions {
  margin-top: 0.8rem;
}

.notice,
.remote-log {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 2px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.notice.error,
.remote-log.error {
  background: #ffb8b3;
}

.gate-foot {
  margin: 1.4rem 0 0 !important;
  color: var(--muted);
  font-family: var(--mono) !important;
  font-size: 0.7rem !important;
}

.setup-aside {
  padding: clamp(1.4rem, 4vw, 2.5rem);
  background: var(--cobalt);
  box-shadow: 10px 10px 0 var(--lime);
  color: white;
}

.setup-aside .button {
  margin-top: 1.4rem;
}

.compatibility {
  display: grid;
  gap: 0;
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  list-style: none;
}

.compatibility li {
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.36);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.site-footer {
  padding: 3rem 0 calc(3rem + env(safe-area-inset-bottom));
  background: var(--ink);
  color: #f7f3ea;
}

.site-footer__top,
.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.erebora-signature {
  display: inline-block;
  font-family: "Allura", "Segoe Script", "Snell Roundhand", cursive;
  font-size: clamp(2.8rem, 5vw, 4.3rem);
  line-height: 0.75;
  text-decoration: none;
  transform: rotate(-2deg);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
}

.site-footer__rule {
  height: 2px;
  margin: 2rem 0;
  background: rgba(247, 243, 234, 0.42);
}

.site-footer__bottom {
  align-items: flex-end;
  color: rgba(247, 243, 234, 0.72);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.dev-tag {
  display: inline-flex;
  padding: 0.28rem 0.44rem;
  border: 1px solid var(--lime);
  color: var(--lime);
  letter-spacing: 0.03em;
}

.remote-app {
  min-height: 100vh;
  min-height: 100svh;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--paper);
}

body.remote-mode #setupShell {
  display: none;
}

body.remote-mode .remote-app {
  display: block !important;
}

.remote-topbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--ink);
  padding: calc(0.7rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.7rem max(1rem, env(safe-area-inset-left));
  background: var(--paper-raised);
}

.remote-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
}

.remote-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.remote-status {
  max-width: 46vw;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--ink);
  background: var(--lime);
  font-family: var(--mono);
  font-size: 0.65rem;
  overflow-wrap: anywhere;
}

.remote-screen {
  display: grid;
  width: min(100% - 28px, 760px);
  gap: 1rem;
  margin: 2rem auto;
}

.remote-card,
.remote-device {
  padding: clamp(1.2rem, 4vw, 2rem);
  box-shadow: 6px 6px 0 var(--ink);
}

.remote-card h1 {
  font-size: clamp(2.2rem, 8vw, 4.5rem);
}

.remote-card p,
.remote-note {
  font-family: var(--editorial);
}

.remote-actions {
  margin-top: 1.2rem;
}

.remote-actions .wide {
  flex: 1 1 100%;
}

.remote-device {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.remote-device-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.remote-device-meta {
  margin-top: 0.25rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.remote-led {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--ink);
  background: var(--lime);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.remote-note {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.clipboard-scratch {
  position: fixed;
  top: -9999px;
  left: -9999px;
}

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

  .hero__grid,
  .origin-grid,
  .rules-grid,
  .setup-grid {
    grid-template-columns: 1fr;
  }

  .hero-proof {
    width: min(100%, 540px);
    margin-inline: auto;
  }

  .origin-proof {
    max-width: 620px;
  }

  .rules-grid h2 {
    max-width: 15ch;
  }
}

@media (max-width: 768px) {
  :root {
    --page: min(100% - 32px, 1400px);
  }

  html {
    scroll-padding-top: 74px;
  }

  .site-header__inner {
    min-height: 66px;
    gap: 0.6rem;
  }

  .product-brand {
    gap: 0.45rem;
  }

  .product-brand__mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .product-brand__copy strong {
    font-size: 0.86rem;
  }

  .product-brand__copy span {
    display: none;
  }

  .status-pill {
    max-width: 132px;
    min-height: 34px;
    padding: 0.38rem 0.5rem;
    font-size: 0.61rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    padding: 2.2rem 0 4rem;
  }

  .hero__grid {
    gap: 2.7rem;
  }

  .hero h1 {
    max-width: 11ch;
    font-size: clamp(3.25rem, 15.7vw, 4.35rem);
  }

  .hero__lede {
    margin-top: 1.3rem;
    font-size: 1.12rem;
    line-height: 1.4;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 1.4rem;
  }

  .hero__actions .button {
    width: 100%;
  }

  .hero__note {
    margin-top: 1rem;
  }

  .hero-proof {
    box-shadow: 7px 7px 0 var(--cobalt);
  }

  .section {
    padding: 4.2rem 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.7rem;
  }

  .section-heading h2 {
    font-size: clamp(2.7rem, 13vw, 4.1rem);
  }

  .difference-intro {
    font-size: 1.55rem;
  }

  .difference-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .origin-quote {
    font-size: clamp(2.2rem, 10.8vw, 3.5rem);
  }

  .screen-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .screen-frame:nth-child(2) {
    margin-top: 0;
  }

  .screen-frame__viewport {
    min-height: 0;
    padding: 0.7rem;
  }

  .screen-frame__viewport img {
    max-height: none;
  }

  .rules-grid h2,
  .setup-panel h2,
  .setup-aside h2 {
    font-size: clamp(2.75rem, 13vw, 4.15rem);
  }

  .step {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .actions,
  .remote-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions button,
  .actions .button,
  .remote-actions button,
  .remote-actions .button {
    width: 100%;
  }

  .site-footer__top,
  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
