/* TetherOps download site. Static, no web fonts, no external requests.
   Colours follow src/styles/tokens.css (primary #0f6577, accent #8f4b0b). */

:root {
  color-scheme: light;
  --primary: #0f6577;
  --primary-50: #eaf3f6;
  --primary-100: #d4e8ed;
  --primary-900: #073644;
  --accent: #8f4b0b;
  --accent-50: #f8e4c8;
  --bg: #e8ecef;
  --bg-subtle: #eef1f2;
  --surface: #ffffff;
  --border: #d5dbe0;
  --border-strong: #b4bdc3;
  --text: #1a2b33;
  --text-soft: #2f3940;
  --muted: #556274;
  --nav-text: #d7e8ec;
  --nav-muted: #a3c4cc;
  --focus: #d59a52;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 2px 6px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 18px 48px rgba(7, 54, 68, 0.18);
  --wrap: 1160px;
  --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Cascadia Mono', Consolas, 'SFMono-Regular', Menlo, monospace;
}

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

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

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

body {
  margin: 0;
  background: var(--bg-subtle);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a {
  color: var(--primary);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--primary-900);
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.92em;
}

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

@media (min-width: 768px) {
  .wrap {
    padding: 0 32px;
  }
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--primary-900);
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

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

/* Header */

.site-header {
  background: var(--primary-900);
  color: var(--nav-text);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand:hover {
  color: #ffffff;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.98rem;
  padding: 6px 0;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    gap: 2px 18px;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-900);
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary-900);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--primary-50);
  color: var(--primary-900);
}

.btn-on-dark {
  background: #ffffff;
  color: var(--primary-900);
}

.btn-on-dark:hover {
  background: var(--primary-50);
  color: var(--primary-900);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Hero */

.hero {
  background: var(--primary-900);
  color: var(--nav-text);
  padding: 40px 0 96px;
}

.hero h1 {
  color: #ffffff;
  max-width: 20ch;
}

.hero-lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 46ch;
  color: var(--nav-text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 24px 0 8px;
}

.hero-meta {
  font-size: 0.95rem;
  color: var(--nav-muted);
  margin: 0;
}

.hero-shot {
  margin: -72px 0 0;
  padding-bottom: 48px;
}

.hero-shot img,
.shot img {
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}

@media (min-width: 768px) {
  .hero {
    padding: 64px 0 180px;
  }

  .hero-shot {
    margin-top: -140px;
  }
}

/* Sections */

.section {
  padding: 56px 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--surface);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-intro {
  max-width: 62ch;
  color: var(--text-soft);
  font-size: 1.1rem;
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.section-alt .card {
  background: var(--bg-subtle);
  box-shadow: none;
}

.card h3 {
  font-size: 1.12rem;
  margin-bottom: 6px;
}

.card p {
  margin: 0;
  color: var(--text-soft);
}

/* Workflow rows */

.feature {
  display: grid;
  gap: 20px;
  align-items: center;
  margin-top: 48px;
}

.feature-copy ul {
  padding-left: 1.2em;
  margin: 0;
  color: var(--text-soft);
}

.feature-copy li + li {
  margin-top: 4px;
}

.shot {
  margin: 0;
}

.shot figcaption {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

.shot-narrow img {
  max-width: min(100%, 520px);
  margin: 0 auto;
}

@media (min-width: 1000px) {
  .feature {
    grid-template-columns: 5fr 7fr;
    gap: 48px;
    margin-top: 72px;
  }

  .feature-reverse .feature-copy {
    order: 2;
  }
}

/* AI section */

.ai-points {
  display: grid;
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .ai-points {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ai-points li {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.ai-points strong {
  display: block;
  color: var(--primary-900);
  margin-bottom: 4px;
}

/* Download */

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

@media (min-width: 1000px) {
  .download-panel {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

.file-box {
  background: var(--primary-900);
  color: var(--nav-text);
  border-radius: 12px;
  padding: 24px;
}

.file-box h3 {
  color: #ffffff;
}

.file-facts {
  margin: 20px 0 0;
  display: grid;
  gap: 12px;
}

.file-facts div {
  display: grid;
  gap: 2px;
}

.file-facts dt {
  font-size: 0.9rem;
  color: var(--nav-muted);
}

.file-facts dd {
  margin: 0;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.file-facts code {
  font-size: 0.88rem;
}

.steps {
  margin: 0;
  padding-left: 1.4em;
}

.steps li {
  margin-bottom: 10px;
}

.note {
  border-left: 4px solid var(--accent);
  background: var(--accent-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  color: var(--text);
}

.note p:last-child {
  margin-bottom: 0;
}

pre {
  margin: 0 0 1em;
  padding: 14px 16px;
  background: var(--primary-900);
  color: #ffffff;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.5;
}

.req-list {
  margin: 0;
  padding-left: 1.2em;
}

/* FAQ */

.faq {
  margin-top: 24px;
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 20px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  list-style-position: inside;
}

.faq details[open] summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.faq details > *:not(summary) {
  color: var(--text-soft);
}

/* Legal pages */

.page-head {
  background: var(--primary-900);
  color: var(--nav-text);
  padding: 40px 0 36px;
}

.page-head h1 {
  color: #ffffff;
  margin-bottom: 8px;
}

.page-head p {
  margin: 0;
  color: var(--nav-text);
}

.legal {
  max-width: 760px;
  padding: 40px 0 56px;
}

.legal-text {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
}

@media (min-width: 768px) {
  .legal-text {
    padding: 36px 40px;
  }
}

.legal-text p:last-child {
  margin-bottom: 0;
}

.legal-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */

.site-footer {
  background: var(--primary-900);
  color: var(--nav-text);
  padding: 32px 0;
  font-size: 0.98rem;
}

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

.site-footer a {
  color: #ffffff;
}

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

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer p {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

.shot-stacked {
  margin-top: 20px;
}

.file-subhead {
  margin-top: 24px;
}

.note + .steps {
  margin-top: 16px;
}

/* Grid children must be allowed to shrink below their images' intrinsic width. */
.feature,
.download-panel,
.cards,
.ai-points {
  grid-template-columns: minmax(0, 1fr);
}

.feature > *,
.download-panel > *,
.cards > *,
.ai-points > * {
  min-width: 0;
}

@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ai-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .feature {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .download-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

pre code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.file-box {
  align-self: start;
}

/* Value-led home page */

.btn-ghost-dark {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-ghost-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.hero-actions + .hero-meta {
  margin-top: 4px;
}

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

.pains li {
  border-top: 3px solid var(--accent);
  padding-top: 14px;
}

.pains h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.pains p {
  margin: 0;
  color: var(--text-soft);
}

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

.value li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.value h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.value p {
  margin: 0;
  color: var(--text-soft);
}

.value-num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.value-foot {
  margin: 24px 0 0;
  max-width: 62ch;
  color: var(--text-soft);
}

.step-label {
  margin: 0 0 4px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.also {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 56px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  color: var(--text-soft);
}

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

.maker {
  max-width: 680px;
  font-size: 1.1rem;
}

.maker-sign {
  font-weight: 700;
  color: var(--primary-900);
  margin: 0;
}

.cta-band {
  background: var(--primary-900);
  color: var(--nav-text);
  padding: 56px 0;
  text-align: center;
}

.cta-band + .site-footer,
main + .site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.cta-band h2 {
  color: #ffffff;
}

.cta-band p {
  max-width: 52ch;
  margin: 0 auto 24px;
}

.timeline {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  max-width: 760px;
}

.timeline li {
  position: relative;
  padding: 0 0 28px 32px;
  border-left: 2px solid var(--primary-100);
  margin-left: 8px;
}

.timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--primary);
}

.timeline-time {
  margin: 0 0 2px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.timeline h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.timeline li p:last-child {
  margin: 0;
  color: var(--text-soft);
}

.section-alt .value li {
  background: var(--bg-subtle);
}

.section:not(.section-alt) .value li {
  background: var(--surface);
}

.section-alt .faq details {
  background: var(--bg-subtle);
}

.legal-more {
  padding-top: 0;
}

.legal-text h2 {
  font-size: 1.35rem;
}

@media (min-width: 768px) {
  .pains {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }

  .value {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .also {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
}

/* Launch polish: header action, two-column hero, readable screenshots on phones. */

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.95rem;
}

.site-header .wrap {
  flex-wrap: nowrap;
}

.site-nav {
  margin-left: auto;
}

@media (max-width: 640px) {
  .site-header .wrap {
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    margin-left: 0;
  }

  .site-nav ul {
    gap: 2px 20px;
  }
}

@media (min-width: 768px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14);
  }

  /* Keeps anchors and keyboard focus clear of the fixed header. */
  html {
    scroll-padding-top: 84px;
  }
}

.ui-label,
.faq strong {
  color: var(--primary-900);
  font-weight: 600;
}

/* Hero */

.hero {
  padding: 40px 0 48px;
  overflow: hidden;
}

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

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.hero-chips li {
  padding: 3px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-shot {
  margin: 0;
  padding: 0;
}

.hero-shot img {
  border-color: rgba(255, 255, 255, 0.18);
}

@media (min-width: 768px) {
  .hero {
    padding: 64px 0 72px;
  }

  .hero-shot {
    margin-top: 0;
  }
}

@media (min-width: 1000px) {
  .hero {
    padding: 80px 0 88px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 48px;
  }

  /* The screenshot runs off the right edge, as on the social preview card. */
  .hero-shot img {
    width: 150%;
    max-width: none;
  }
}

/* Screenshots: on narrow screens show part of each screen at a readable size
   instead of the whole screen too small to read. The alt text describes it all. */

@media (max-width: 767px) {
  .hero-shot,
  .feature .shot {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 3;
    background: var(--surface);
  }

  .hero-shot {
    border-color: rgba(255, 255, 255, 0.18);
  }

  .hero-shot img,
  .feature .shot img {
    width: 190%;
    max-width: none;
    margin-left: -34%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Planned changes and check-ins */

.also {
  align-items: start;
}

.also p {
  margin: 0;
}

.shot-crop {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.shot-crop img {
  width: 150%;
  max-width: none;
  margin-left: -24%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.shot-crop-left img {
  width: 100%;
  margin-left: 0;
}

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

  .also-wide {
    grid-column: 1 / -1;
  }

  .section {
    padding: 72px 0;
  }
}

@media (min-width: 1000px) {
  .section {
    padding: 88px 0;
  }
}
