:root {
  color-scheme: dark;
  --bg: #080a0d;
  --pane: #0b0e12;
  --pane-2: #10141a;
  --ink: #edf0f3;
  --ink-2: #aab2bc;
  --ink-3: #7e8995;
  --mint: #7ee0a8;
  --mint-dark: #06120c;
  --blue: #79cfe6;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.19);
  --header-height: 64px;
  --status-height: 32px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  scroll-snap-type: y mandatory;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  padding-bottom: var(--status-height);
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    monospace;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

h1,
h2,
p,
figure,
dl,
dd,
ul {
  margin: 0;
}

h1,
h2 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: rgba(126, 224, 168, 0.28);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 14px;
  z-index: 100;
  padding: 9px 12px;
  background: var(--mint);
  color: var(--mint-dark);
  font-size: 0.78rem;
  font-weight: 700;
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 max(20px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 13, 0.96);
}

.brand,
.header-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 9px;
  font-size: 0.92rem;
  font-weight: 700;
}

.brand > :first-child {
  color: var(--mint);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 0.8rem;
}

.header-actions a {
  padding: 0 10px;
}

.header-actions a:hover {
  color: var(--ink);
}

.header-actions .testflight-link {
  min-height: 34px;
  border: 1px solid rgba(126, 224, 168, 0.4);
  color: var(--mint);
}

.window {
  height: calc(100svh - var(--header-height) - var(--status-height));
  min-height: 0;
  padding: 14px 20px;
  overflow: hidden;
  scroll-margin-top: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.window:nth-child(even) {
  background: #090c10;
}

.window-shell {
  width: min(100%, var(--max-width));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr);
  border: 1px solid var(--line-strong);
  background: var(--pane);
}

.window-titlebar,
.pane-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink-3);
  font-size: 0.7rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.window-titlebar {
  min-width: 0;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--pane-2);
}

.window-titlebar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-titlebar b {
  color: var(--mint);
  font-weight: 600;
}

.window-body {
  min-height: 0;
  padding: clamp(18px, 3.4vh, 34px);
  overflow: hidden;
}

.window-body.split {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 1.06fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: stretch;
}

.copy-pane {
  min-width: 0;
  align-self: center;
}

.context-line {
  color: var(--ink-3);
  font-size: 0.75rem;
  line-height: 1.4;
}

.context-line span {
  color: var(--mint);
}

.hero-copy h1 {
  margin: clamp(12px, 2vh, 20px) 0 0 -0.07em;
  color: var(--mint);
  font-size: clamp(5rem, 9vw, 8.2rem);
  font-weight: 800;
  letter-spacing: -0.09em;
  line-height: 0.78;
}

.headline {
  max-width: 650px;
  margin-top: clamp(20px, 3vh, 30px);
  font-size: clamp(1.65rem, 2.7vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.lede {
  max-width: 620px;
  margin-top: clamp(12px, 2vh, 20px);
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: clamp(16px, 2.5vh, 24px);
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 0.82rem;
  font-weight: 700;
}

a.button:hover {
  border-color: var(--ink-3);
  background: var(--pane-2);
}

.button.primary {
  border-color: var(--mint);
  background: var(--mint);
  color: var(--mint-dark);
}

a.button.primary:hover {
  border-color: var(--mint);
  background: var(--pane-2);
  color: var(--mint);
}

.proof {
  margin-top: clamp(13px, 2vh, 20px);
  color: var(--ink-3);
  font-size: 0.72rem;
}

.proof i {
  padding: 0 0.45em;
  color: var(--mint);
  font-style: normal;
}

.media-pane {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #050608;
}

.pane-label {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  min-height: 30px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 13, 0.92);
}

.pane-label span:last-child {
  color: var(--mint);
}

.device-stage {
  position: absolute;
  top: 42px;
  right: 18px;
  bottom: 14px;
  left: 18px;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  container-type: size;
  perspective: 1200px;
}

.device-frame {
  --device-bezel: clamp(5px, 0.55vw, 8px);
  --device-radius: clamp(28px, 4.6vh, 52px);
  position: relative;
  width: min(72cqw, 40.526cqh, 280px);
  height: auto;
  max-width: 100%;
  aspect-ratio: 1260 / 2736;
  padding: var(--device-bezel);
  border: 1px solid #3b424d;
  border-radius: var(--device-radius);
  background: linear-gradient(145deg, #353b45 0%, #171a20 38%, #090b0e 100%);
  box-shadow:
    0 28px 58px rgba(0, 0, 0, 0.52),
    0 4px 12px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(0, 0, 0, 0.72);
  transition: transform 260ms ease;
}

.device-frame::before {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: 1;
  border-radius: calc(var(--device-radius) - 2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
  pointer-events: none;
}

.device-frame::after {
  content: "";
  position: absolute;
  top: 27%;
  right: -4px;
  width: 3px;
  height: 12%;
  border-radius: 0 2px 2px 0;
  background: #454c57;
  box-shadow: inset 1px 0 rgba(255, 255, 255, 0.16);
}

.device-screen {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--device-radius) - var(--device-bezel) - 2px);
  object-fit: contain;
  object-position: center;
  overflow: hidden;
}

.terminal-tabs {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  margin-right: -10px;
}

.terminal-tab {
  min-width: 0;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid var(--line);
  appearance: none;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.terminal-tab:hover,
.terminal-tab:focus-visible {
  background: var(--pane-2);
  color: var(--ink);
}

.terminal-tab:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: -2px;
}

.terminal-tab.is-active {
  background: var(--pane-2);
  color: var(--mint);
}

.terminal-stage {
  position: absolute;
  top: 42px;
  right: 18px;
  bottom: 14px;
  left: 18px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.terminal-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  visibility: hidden;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 0s linear 160ms;
}

.terminal-panel.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
  transition-delay: 0s;
}

.terminal-panel .device-stage {
  inset: 0;
}

h2 {
  max-width: 690px;
  margin-top: clamp(14px, 2.3vh, 22px);
  font-size: clamp(2rem, 3.5vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.tui-table,
.command-lines,
.tui-list {
  margin-top: clamp(18px, 3vh, 30px);
  border-top: 1px solid var(--line-strong);
}

.tui-table div {
  min-height: 43px;
  display: grid;
  grid-template-columns: minmax(85px, 0.34fr) minmax(0, 0.66fr);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
}

.compact-table div {
  min-height: 54px;
}

.tui-table dt {
  color: var(--mint);
}

.tui-table dd {
  color: var(--ink-2);
}

.command-lines > p {
  min-height: 52px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.78rem;
}

.command-lines b {
  color: var(--mint);
  font-weight: 500;
}

.inline-values {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.command-lines code {
  padding: 5px 7px;
  border: 1px solid var(--line);
  background: var(--pane-2);
  color: var(--ink);
  font: inherit;
}

.command-lines code::first-letter {
  color: var(--blue);
}

.tui-list {
  padding: 0;
  list-style: none;
}

.tui-list li {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.8rem;
}

.tui-list b {
  color: var(--mint);
  font-size: 0.7rem;
  font-weight: 500;
}

.get-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.get-layout h2 {
  max-width: 760px;
  margin-top: 0;
  color: var(--ink);
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1;
}

.get-layout > p:not(.context-line) {
  max-width: 660px;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.65;
}

.actions.centered {
  justify-content: center;
}

.tmux-status {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  height: var(--status-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #7bdba4;
  color: #07120c;
  font-size: 0.73rem;
  user-select: none;
}

.session-name {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #0a1710;
  color: var(--mint);
  font-weight: 700;
}

.window-links {
  min-width: 0;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 5px;
}

.window-links a {
  height: 100%;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  font-weight: 500;
  color: rgba(7, 18, 12, 0.82);
  opacity: 1;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}

.window-links a:hover {
  background: rgba(6, 18, 12, 0.07);
  opacity: 1;
}

.window-links a.is-active {
  background: #0a1710;
  color: var(--mint);
  font-weight: 700;
}

.window-links a.is-active::after {
  content: "*";
}

.status-meta {
  padding: 0 13px;
  opacity: 0.74;
  white-space: nowrap;
}

.mobile-window {
  display: none;
}

@media (max-width: 800px) {
  :root {
    --header-height: 56px;
    --status-height: 30px;
  }

  .site-header {
    padding-inline: 14px;
  }

  .window {
    padding: 8px 10px;
  }

  .window-shell {
    grid-template-rows: 30px minmax(0, 1fr);
  }

  .window-body {
    padding: clamp(13px, 2.2vh, 18px);
  }

  .window-body.split {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
  }

  .copy-pane {
    align-self: start;
  }

  .hero-copy h1 {
    font-size: clamp(4.4rem, 21vw, 6rem);
  }

  .headline {
    margin-top: 18px;
    font-size: clamp(1.45rem, 6.5vw, 1.85rem);
  }

  .lede {
    margin-top: 11px;
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .actions {
    margin-top: 15px;
  }

  .button {
    min-height: 40px;
    font-size: 0.75rem;
  }

  .proof {
    margin-top: 12px;
    font-size: 0.66rem;
  }

  h2 {
    margin-top: 12px;
    font-size: clamp(1.85rem, 7.6vw, 2.35rem);
  }

  .context-line {
    font-size: 0.67rem;
  }

  .tui-table,
  .command-lines,
  .tui-list {
    margin-top: 13px;
  }

  .tui-table div {
    min-height: 33px;
    font-size: 0.71rem;
  }

  .command-lines > p {
    min-height: 40px;
    grid-template-columns: 78px minmax(0, 1fr);
    font-size: 0.69rem;
  }

  .command-lines code {
    padding: 4px 6px;
  }

  .tui-list li {
    min-height: 38px;
    font-size: 0.71rem;
  }

  .media-pane {
    padding: 0;
  }

  .device-stage {
    top: 38px;
    right: 10px;
    bottom: 9px;
    left: 10px;
  }

  .device-frame {
    --device-bezel: 4px;
    --device-radius: clamp(20px, 7vw, 30px);
  }

  .terminal-pane-label > span:first-child {
    display: none;
  }

  .terminal-pane-label {
    padding: 0;
  }

  .terminal-tabs {
    width: 100%;
    margin-right: 0;
  }

  .terminal-tab {
    flex: 1;
    padding: 0 4px;
    font-size: 0.56rem;
  }

  .terminal-tab:first-child {
    border-left: 0;
  }

  .terminal-stage {
    top: 38px;
    right: 10px;
    bottom: 9px;
    left: 10px;
  }

  .get-layout h2 {
    margin-top: 0;
    font-size: clamp(2.3rem, 10vw, 3rem);
  }

  .get-layout > p:not(.context-line) {
    margin-top: 14px;
    font-size: 0.9rem;
  }

  .get-layout .button {
    min-height: 44px;
    padding-inline: 17px;
    font-size: 0.8rem;
  }

  .window-links,
  .status-meta {
    display: none;
  }

  .mobile-window {
    flex: 1;
    display: block;
    padding-left: 9px;
    font-weight: 700;
  }

  .tmux-status::after {
    content: '"getremux.app"';
    padding-right: 10px;
    font-size: 0.65rem;
    opacity: 0.7;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 0.85rem;
  }

  .header-actions {
    gap: 1px;
    font-size: 0.7rem;
  }

  .header-actions a {
    padding-inline: 7px;
  }

  .window-titlebar span:last-child {
    display: none;
  }

  .headline {
    font-size: 1.4rem;
  }

  .lede {
    font-size: 0.8rem;
  }

  .proof {
    display: none;
  }

  .button {
    font-size: 0.7rem;
  }

  .command-lines > p {
    min-height: 36px;
  }
}

@media (max-width: 800px) and (max-height: 700px) {
  #terminal .command-lines {
    display: none;
  }
}

@media (max-height: 720px) and (min-width: 801px) {
  .window {
    padding-block: 8px;
  }

  .window-body {
    padding-block: 18px;
  }

  .hero-copy h1 {
    font-size: 5.8rem;
  }

  .headline {
    margin-top: 18px;
    font-size: 1.75rem;
  }

  .lede {
    margin-top: 12px;
    font-size: 0.85rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .tui-table div {
    min-height: 36px;
  }

}

@media (hover: hover) and (pointer: fine) {
  .window-shell:hover .device-frame {
    transform: translateY(-2px) scale(1.006);
  }
}

@keyframes boot-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy,
.hero-media {
  animation: boot-in 420ms ease-out both;
}

.hero-media {
  animation-delay: 80ms;
}

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

  .hero-copy,
  .hero-media {
    animation: none;
  }

  .device-frame,
  .terminal-panel,
  .window-links a {
    transition: none;
  }
}
