/*
 * Tandem promo page. The colour tokens are the app's (documentation/design.md section 6, copied
 * from apps/frontend/src/index.css), dark first; type is IBM Plex Sans and JetBrains Mono.
 */
:root,
:root[data-theme='dark'] {
  color-scheme: dark;
  --chrome: #121416;
  --panel: #17191c;
  --editor: #1c1f22;
  --raised: #23262a;
  --hover: #2b2f34;
  --selected: rgba(74, 222, 128, 0.1);
  --border: #2d3136;
  --border-strong: #3d4249;
  --text: #d7dadd;
  --muted: #8f969c;
  --faint: #687078;
  --accent: #4ade80;
  --accent-fill: #16803c;
  --accent-soft: rgba(74, 222, 128, 0.18);
  --agent: #e8916f;
  --agent-line: #d97757;
  --agent-soft: rgba(217, 119, 87, 0.12);
  --advisor: #b49cf7;
  --advisor-soft: rgba(180, 156, 247, 0.1);
  --user-coding: #6cb6ff;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

:root[data-theme='light'] {
  color-scheme: light;
  --chrome: #eceef1;
  --panel: #f6f7f9;
  --editor: #ffffff;
  --raised: #ffffff;
  --hover: #e6e9ed;
  --selected: rgba(22, 128, 60, 0.09);
  --border: #d8dce1;
  --border-strong: #bfc5cc;
  --text: #1f2328;
  --muted: #57606a;
  --faint: #7d8590;
  --accent: #15803d;
  --accent-fill: #16803c;
  --accent-soft: rgba(22, 128, 60, 0.16);
  --agent: #b4532f;
  --agent-line: #d97757;
  --agent-soft: rgba(217, 119, 87, 0.1);
  --advisor: #6d3fd1;
  --advisor-soft: rgba(109, 63, 209, 0.08);
  --user-coding: #0969da;
  --shadow: 0 16px 40px rgba(31, 35, 40, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  background: var(--editor);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code,
.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.875em;
}
code {
  background: var(--hover);
  padding: 1px 6px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Title bar ---------------------------------------------------------------------------------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--chrome);
  border-bottom: 1px solid var(--border);
}
.bar .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 48px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}
.brand svg {
  color: var(--accent);
}
.bar nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.bar nav a {
  color: var(--muted);
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 4px;
}
.bar nav a:hover {
  background: var(--hover);
  color: var(--text);
  text-decoration: none;
}
.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.toggle:hover {
  background: var(--hover);
  color: var(--text);
}
:root[data-theme='dark'] .icon-moon,
:root[data-theme='light'] .icon-sun {
  display: none;
}

/* Buttons ------------------------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.btn:hover {
  background: var(--hover);
  text-decoration: none;
}
.btn.primary {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: #fff;
}
.btn.primary:hover {
  filter: brightness(1.1);
}

/* Hero --------------------------------------------------------------------------------------- */
.hero {
  background: var(--chrome);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 0;
  overflow: hidden;
}
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
h1 {
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  max-width: 18em;
}
.lede {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--muted);
  max-width: 40em;
  margin: 0 0 28px;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}
.soon {
  color: var(--muted);
  font-size: 14px;
}
.cta .soon {
  padding: 0 6px;
}
.hero {
  padding-bottom: 64px;
}
.hero-soon {
  margin: -12px 0 32px;
}
.duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
@media (min-width: 900px) {
  .duo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.pane {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}
.pane h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin: 0;
}
.pane p {
  color: var(--muted);
  margin: 0;
}
.pane .tag {
  margin: 0;
}
.pane .btn {
  margin-bottom: 12px;
}
.pane .shot {
  margin: auto 0 0;
  width: 100%;
  aspect-ratio: 16 / 11;
}
.pane .shot img {
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

/* Screenshots -------------------------------------------------------------------------------- */
.shot {
  display: block;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--editor);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}
.shot img {
  cursor: zoom-in;
}

/* Lightbox ----------------------------------------------------------------------------------- */
#lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: transparent;
  overflow: auto;
  cursor: zoom-out;
}
#lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}
#lightbox img {
  display: block;
  margin: 0 auto;
  max-width: min(100%, 1600px);
  height: auto;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.lb-close {
  position: fixed;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--raised);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 600px) {
  #lightbox {
    padding: 8px;
  }
}

:root[data-theme='dark'] .shot .for-light,
:root[data-theme='light'] .shot .for-dark {
  display: none;
}

/* Sections ----------------------------------------------------------------------------------- */
section {
  padding: 72px 0;
}
section + section {
  border-top: 1px solid var(--border);
}
.alt {
  background: var(--panel);
}
h2 {
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
h3 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  margin: 0 0 6px;
}
.intro {
  color: var(--muted);
  max-width: 42em;
  margin: 0 0 40px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.feature .copy p {
  color: var(--muted);
  margin: 0 0 12px;
  max-width: 34em;
}
.feature ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text);
}
.feature li {
  padding: 4px 0 4px 20px;
  position: relative;
  font-size: 15px;
}
.feature li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
@media (min-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 48px;
  }
  .feature.flip {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
  .feature.flip .copy {
    order: 2;
  }
}
.feature.wide {
  grid-template-columns: minmax(0, 1fr);
}
.feature.wide .copy p {
  max-width: 42em;
}
.feature ul.trio {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 24px;
}
@media (min-width: 800px) {
  .feature ul.trio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.feature ul.trio li {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--muted);
}
.feature ul.trio li::before {
  display: none;
}
.feature ul.trio b {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 4px;
}

/* Plans -------------------------------------------------------------------------------------- */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  font-size: 14px;
}
.steps li {
  display: flex;
  align-items: center;
  color: var(--muted);
}
.steps li + li::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--border-strong);
  margin: 0 10px;
}
.steps .n {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-size: 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.steps .on {
  color: var(--text);
  font-weight: 500;
}
.steps .on .n {
  border-color: var(--accent);
  color: var(--accent);
}
.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
@media (min-width: 800px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.card {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.card .shot {
  margin-top: auto;
  box-shadow: none;
}
.tag {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--agent);
  background: var(--agent-soft);
  border-radius: 999px;
  padding: 1px 10px;
  margin-bottom: 6px;
}

/* Footer ------------------------------------------------------------------------------------- */
footer {
  background: var(--chrome);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--muted);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: space-between;
}
footer p {
  margin: 0 0 6px;
  max-width: 34em;
}
footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  section {
    padding: 48px 0;
  }
  .hero {
    padding-top: 40px;
  }
  .bar nav a.hide-sm {
    display: none;
  }
  .steps li + li::before {
    width: 12px;
    margin: 0 6px;
  }
}

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