/* Termetheus site. Palette from the app (src/renderer/src/styles.css):
   Ember #F15A0D, Flare #FF9E2C, Obsidian #0B0D12, Basalt #1F232B,
   Ash #6B7280, Parchment #F6EDE2, Moss #2E7D52, Garnet #C03A3A.
   Text and button colors are darkened where needed to pass WCAG AA. */

:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;

  --bg: #f6ede2;
  --bg-2: #efe3d4;
  --surface: #fffbf6;
  --card: #fffdf9;
  --line: #e3d6c5;
  --line-strong: #d3c2ad;
  --text: #16181d;
  --text-2: #3f434c;
  --muted: #565b66;
  --accent-text: #b23f06;
  --btn: #c44a0a;
  --btn-hover: #a83e07;
  --btn-text: #ffffff;
  --btn2-line: #cbb9a3;
  --btn2-hover: #efe3d4;
  --focus: #b23f06;
  --field: #ffffff;
  --field-line: #cdbca8;
  --code-bg: rgba(22, 24, 29, 0.06);
  --danger: #a32f2f;
  --danger-bg: #fbeaea;
  --danger-line: #e5b3b3;
  --ok: #24663f;
  --ok-bg: #e8f3ec;
  --ok-line: #b5d8c3;
  --shadow-card: 0 1px 2px rgba(40, 24, 8, 0.05), 0 12px 32px -8px rgba(40, 24, 8, 0.16);
  --shadow-shot: 0 1px 2px rgba(40, 24, 8, 0.06), 0 30px 70px -18px rgba(40, 24, 8, 0.38);
  --glow: rgba(241, 90, 13, 0.13);
  --stage: #ece0d0;

  --band-bg: #0b0d12;
  --band-card: #14171e;
  --band-line: #262a33;
  --band-text: #f6ede2;
  --band-text-2: #c9c1b6;
  --band-accent: #ff9e2c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --bg-2: #0f1117;
    --surface: #14171e;
    --card: #171a22;
    --line: #23272f;
    --line-strong: #323742;
    --text: #f6ede2;
    --text-2: #cbc3b8;
    --muted: #9ba1ac;
    --accent-text: #ff9e2c;
    --btn-hover: #ad4008;
    --btn2-line: #3a3f4a;
    --btn2-hover: #1b1e26;
    --focus: #ff9e2c;
    --field: #0f1117;
    --field-line: #363b46;
    --code-bg: rgba(246, 237, 226, 0.08);
    --danger: #ff8f87;
    --danger-bg: #2a1517;
    --danger-line: #5c2a2d;
    --ok: #74d39f;
    --ok-bg: #11251a;
    --ok-line: #24503a;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.55);
    --shadow-shot: 0 0 0 1px rgba(246, 237, 226, 0.06), 0 30px 80px -20px rgba(0, 0, 0, 0.8);
    --glow: rgba(241, 90, 13, 0.16);
    --stage: #12151b;

    --band-bg: #12151b;
    --band-card: #191c24;
    --band-line: #2a2e38;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

::selection {
  background: rgba(241, 90, 13, 0.25);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--code-bg);
  border-radius: 5px;
  padding: 0.12em 0.38em;
  overflow-wrap: anywhere;
}

kbd {
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  background: var(--card);
  padding: 0.05em 0.36em;
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--btn);
  color: var(--btn-text);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
  margin: -3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}

.nav a:hover {
  color: var(--text);
  background: var(--btn2-hover);
}

.nav .nav-cta {
  margin-left: 6px;
  border: 1px solid var(--btn2-line);
  color: var(--text);
}

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

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 11px;
  border: 1px solid transparent;
  background-color: var(--btn);
  background-image: linear-gradient(180deg, #c94c0a, #b8440a);
  color: var(--btn-text);
  font: inherit;
  font-weight: 650;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(60, 20, 0, 0.25);
  transition: background-color 120ms ease, transform 120ms ease;
}

.btn:hover {
  background-image: none;
  background-color: var(--btn-hover);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled],
.btn[disabled]:hover {
  cursor: progress;
  opacity: 0.88;
  background-image: none;
  background-color: var(--btn-hover);
}

.btn.is-busy::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-secondary {
  background-color: transparent;
  background-image: none;
  color: var(--text);
  border-color: var(--btn2-line);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: var(--btn2-hover);
}

.btn-block {
  width: 100%;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(24px, 5vw, 64px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -120px 0 auto 0;
  height: 720px;
  background: radial-gradient(52% 60% at 78% 20%, var(--glow), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: start;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 64px;
  }
}

.hero-icon {
  width: 104px;
  height: 104px;
  margin: -10px 0 18px -10px;
  filter: drop-shadow(0 10px 24px rgba(241, 90, 13, 0.25));
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  margin-bottom: 20px;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f15a0d;
  box-shadow: 0 0 0 3px rgba(241, 90, 13, 0.2);
}

.hero h1 {
  font-size: clamp(2.6rem, 1.5rem + 4.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 760;
  max-width: 11em;
}

.lede {
  margin-top: 22px;
  font-size: clamp(1.12rem, 1rem + 0.45vw, 1.32rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 32em;
}

.hero-facts {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 8px;
  font-size: 15px;
  color: var(--muted);
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-facts li::before {
  content: ">";
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent-text);
}

/* ---------- forms ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: clamp(22px, 3vw, 32px);
}

.card h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.card-intro {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 16px;
}

.form {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-weight: 600;
  font-size: 15px;
}

.field .optional {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 10px;
  padding: 11px 13px;
  min-height: 48px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--focus);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-radius: 10px;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.field-error {
  font-size: 14px;
  font-weight: 600;
  color: var(--danger);
}

.code-input {
  font-family: var(--mono) !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.code-input::placeholder {
  text-transform: none;
  letter-spacing: 0;
}

.form-alert {
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 600;
}

.form-note {
  font-size: 14px;
  color: var(--muted);
}

.success {
  border: 1px solid var(--ok-line);
  background: var(--ok-bg);
  border-radius: 14px;
  padding: 20px;
  margin-top: 22px;
}

.success h3 {
  color: var(--ok);
  font-size: 1.15rem;
  line-height: 1.3;
}

.success h3:focus {
  outline: none;
}

.success p {
  margin-top: 6px;
  color: var(--text);
  font-size: 16px;
}

.success .email {
  font-weight: 650;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

/* ---------- screenshots ---------- */

.shot {
  position: relative;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(22, 18, 12, 0.14);
  box-shadow: var(--shadow-shot);
  background: #0b0d12;
  container-type: inline-size;
}

.shot img {
  width: 100%;
}

/* macOS window controls drawn into the empty corner of the app's
   hidden-inset title bar (the app reserves this space for them). */
.shot.lights::before {
  content: "";
  position: absolute;
  left: 1.3cqw;
  top: 1.45cqw;
  width: 0.98cqw;
  height: 0.98cqw;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 1.6cqw 0 0 #febc2e, 3.2cqw 0 0 #28c840;
}

.hero-shot {
  margin-top: clamp(48px, 7vw, 88px);
}

.stage {
  background: var(--stage);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 44px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.stage .shot {
  max-width: 100%;
}

.stage-tall .shot {
  width: 340px;
}

.stage-card .shot {
  width: 440px;
}

.shot.dialog {
  border-radius: 14px;
  border: 0;
  background: transparent;
}

figcaption {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section-tight {
  padding-top: 0;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 12px;
}

.section h2 {
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.028em;
  font-weight: 730;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head > p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 1.1rem;
}

.features {
  display: grid;
  gap: clamp(88px, 12vw, 152px);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 64px;
  }
  .feature.flip > .feature-copy {
    order: 2;
  }
  .feature.wide {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .feature.wide .feature-copy {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 16px 64px;
    align-items: start;
  }
  .feature.wide .feature-copy > .eyebrow,
  .feature.wide .feature-copy > h2 {
    grid-column: 1;
  }
  .feature.wide .feature-copy > .feature-body {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding-top: 30px;
  }
}

.feature-body > * + * {
  margin-top: 14px;
}

.feature-copy h2 + .feature-body {
  margin-top: 18px;
}

.feature-body p {
  color: var(--text-2);
}

.points {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 12px;
}

.points li {
  position: relative;
  padding-left: 26px;
  color: var(--text-2);
  font-size: 16px;
}

.points li::before {
  content: ">";
  position: absolute;
  left: 2px;
  top: 0;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent-text);
}

.aside-note {
  font-size: 15px;
  color: var(--muted);
  border-left: 3px solid var(--line-strong);
  padding-left: 14px;
}

/* ---------- more features grid ---------- */

.tiles {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 24px;
}

.tile h3 {
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.tile p {
  margin-top: 8px;
  font-size: 15.5px;
  color: var(--text-2);
}

/* ---------- dark band (your data) ---------- */

.band {
  background: var(--band-bg);
  color: var(--band-text);
  position: relative;
  overflow: hidden;
}

.band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 60% at 85% 50%, rgba(241, 90, 13, 0.14), transparent 70%);
  pointer-events: none;
}

.band .wrap {
  position: relative;
}

.band .eyebrow {
  color: var(--band-accent);
}

.band .feature-body p,
.band .points li {
  color: var(--band-text-2);
}

.band .points li::before {
  color: var(--band-accent);
}

.band code {
  background: rgba(246, 237, 226, 0.1);
}

.band a {
  color: var(--band-accent);
}

.band :focus-visible {
  outline-color: var(--band-accent);
}

.band .stage {
  background: rgba(246, 237, 226, 0.04);
  border: 1px solid var(--band-line);
}

/* ---------- coming soon ---------- */

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

@media (min-width: 720px) {
  .soon-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.soon-list li {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 18px 20px;
  display: grid;
  align-content: start;
  gap: 4px;
}

.soon-list strong {
  font-family: var(--font-display);
  font-size: 1.04rem;
  letter-spacing: -0.01em;
}

.soon-list span {
  font-size: 15.5px;
  color: var(--text-2);
}

/* ---------- closing call to action ---------- */

.cta {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 18px;
}

.cta img {
  width: 88px;
  height: 88px;
}

.cta p {
  color: var(--text-2);
  max-width: 34em;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 28px 40px;
  font-size: 15px;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer a {
  color: var(--text-2);
}

.site-footer a:hover {
  color: var(--text);
}

/* ---------- invite page ---------- */

.invite-main {
  position: relative;
  padding-block: clamp(24px, 6vw, 72px) clamp(64px, 10vw, 120px);
}

.invite-main::before {
  content: "";
  position: absolute;
  inset: -120px 0 auto 0;
  height: 760px;
  background: radial-gradient(42% 46% at 50% 42%, var(--glow), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.invite-card {
  max-width: 560px;
  margin: 0 auto;
}

.invite-card .hero-icon {
  width: 88px;
  height: 88px;
  margin: -8px 0 14px -8px;
}

.invite-card h1 {
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 750;
}

.download {
  margin-top: 24px;
  display: grid;
  gap: 20px;
}

.download h2:focus {
  outline: none;
}

.steps-title {
  font-size: 1rem;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.download-meta {
  font-size: 15px;
  color: var(--muted);
}

.checksum {
  display: grid;
  gap: 6px;
}

.checksum-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}

.checksum code {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  word-break: break-all;
}

.copy-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--btn2-line);
  border-radius: 7px;
  padding: 4px 10px;
  min-height: 32px;
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--btn2-hover);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 12px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  font-size: 16px;
  color: var(--text-2);
  min-height: 28px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-text);
  border: 1px solid var(--line-strong);
  background: var(--card);
}

.steps strong {
  color: var(--text);
}

.invite-alt {
  margin-top: 22px;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}
