/* styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --header-h: 56px;
  --footer-h: 42px;
  --radius:   8px;
  --radius-lg: 12px;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ───────────────────────────────────────────── */

.tab-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}

.tab-panel::-webkit-scrollbar {
  width: 4px;
}

.tab-panel::-webkit-scrollbar-track {
  background: transparent;
}

.tab-panel::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 99px;
}

.tab-panel::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* ── Lightbox ────────────────────────────────────────────── */

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 32px;
}

#lightbox.visible {
  display: flex;
  animation: lightbox-in 0.15s ease;
}

#lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.feature-img--zoomable {
  cursor: zoom-in;
}

/* ── Header ─────────────────────────────────────────────── */

header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.logo {
  width: 150px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}

.logo img {
  image-rendering: crisp-edges;
}

#logo-home {
  cursor: pointer;
}

.tabs {
  display: flex;
  gap: 2px;
}

.tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}

.tab:hover {
  color: var(--text);
  background: var(--surface-2);
}

.tab.active {
  color: var(--text);
  background: var(--surface-3);
}

.header-spacer {
  width: 150px;
}

/* ── Main ────────────────────────────────────────────────── */

main {
  position: fixed;
  inset: var(--header-h) 0 var(--footer-h) 0;
  overflow: hidden;
}

.tab-panel {
  display: none;
  height: 100%;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
}

/* ── Home tab ────────────────────────────────────────────── */

#tab-home {
  align-items: center;
  padding: 28px 24px 20px;
  gap: 18px;
}

.hero {
  text-align: center;
  flex-shrink: 0;
}

.hero-logo {
  margin-bottom: 10px;
  image-rendering: crisp-edges;
}

.hero h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin-bottom: 6px;
}

.tagline {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 18px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 26px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.12s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary--wide {
  padding-left: 52px;
  padding-right: 52px;
}

.video-frame {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  align-self: center;
  background: var(--surface);
  border: 4px solid var(--border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 0;
  aspect-ratio: 16 / 9;
  position: relative;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--text-dim);
  font-size: 13px;
  user-select: none;
}

/* ── Get Overclaude tab ──────────────────────────────────── */

#tab-get {
  align-items: center;
  justify-content: center;
}

.get-header {
  text-align: center;
}

.get-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  padding: 24px;
  width: 100%;
  max-width: 900px;
}

.get-header h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 13px;
}

.steps {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.step-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.step p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-num {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: var(--surface-3);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.step-arrow {
  flex-shrink: 0;
  align-self: center;
  color: var(--text-dim);
  font-size: 32px;
  padding: 0 4px;
}

.get-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 220px;
  white-space: nowrap;
  background: var(--btn-download-bg);
  color: var(--btn-download-fg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.12s, transform 0.1s;
}

.btn-download:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn-download:active {
  transform: translateY(0);
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  white-space: nowrap;
  background: var(--accent);
  color: var(--accent-fg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 24px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-buy:hover {
  opacity: 0.85;
}

/* ── Features tab ───────────────────────────────────────── */

#tab-features {
  padding: 24px 32px 0;
  gap: 16px;
  overflow: hidden;
  scrollbar-gutter: stable both-edges;
}

#tab-features.scrollable {
  overflow-y: auto;
}

.features-header {
  flex-shrink: 0;
  text-align: center;
}

.features-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 100%;
  flex: 1;
  min-height: 0;
}

.features-secondary-header {
  display: none;
  text-align: center;
  flex-shrink: 0;
  padding-top: 32px;
}

.features-secondary-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.features-secondary-header.visible {
  display: block;
}

.features-secondary {
  display: none;
  grid-template-rows: auto;
  grid-auto-rows: auto;
  flex: none;
  min-height: min-content;
  padding-bottom: 24px;
}

.features-secondary.visible {
  display: grid;
}

.features-more-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 14px 0 18px;
  position: relative;
  z-index: 1;
}

.btn-show-more {
  background: var(--accent);
  color: var(--accent-fg);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 22px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.12s, transform 0.1s;
}

.btn-show-more:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-show-fewer {
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 22px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}

.btn-show-fewer:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 28px;
  gap: 12px;
}

/* Vertical dividers — right edge, inset top and bottom */
.feature-card:not(:nth-child(4n))::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20px;
  bottom: 20px;
  width: 1px;
  background: var(--border-2);
}

/* Horizontal dividers — bottom edge, inset left and right */
.feature-card:nth-child(-n+4)::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: var(--border-2);
}

.feature-img {
  flex-shrink: 0;
  height: 120px;
  background: var(--surface-2);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.feature-img--full {
  height: auto;
  aspect-ratio: 2 / 1;
  background-size: cover;
  background-position: center;
}

.feature-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── FAQ tab ─────────────────────────────────────────────── */

#tab-faq {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.faq-content h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

/* ── Dev tab ─────────────────────────────────────────────── */

#tab-dev {
  overflow-y: auto;
}

.dev-content {
  padding: 24px 28px;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dev-todo {
  background: var(--surface-2);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.dev-content h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: -8px;
}

.theme-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 10px 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.1s, background 0.1s;
  min-width: 120px;
}

.theme-btn strong {
  font-size: 13px;
  color: var(--text);
}

.theme-btn span {
  font-size: 11px;
  color: var(--text-muted);
}

.theme-btn:hover {
  background: var(--surface-3);
  border-color: var(--text-muted);
}

.theme-btn.active {
  border-color: var(--accent);
  background: var(--surface-3);
}

.theme-btn.active strong {
  color: var(--accent);
}

/* ── Footer ──────────────────────────────────────────────── */

footer {
  position: fixed;
  inset: auto 0 0 0;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.12s;
}

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

/* ── Shared: success / resend pages ─────────────────────── */

.centered-page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.back-link {
  font-size: 12px;
  text-align: center;
}

.back-link a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.12s;
}

.back-link a:hover { color: var(--text); }

/* success icon */
.success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success-text);
}

/* form elements */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="email"] {
  background: var(--input-bg);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.12s;
  width: 100%;
}

input[type="email"]:focus {
  border-color: var(--accent);
}

input[type="email"]::placeholder {
  color: var(--text-dim);
}

.btn-submit {
  background: var(--accent);
  color: var(--accent-fg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  transition: background 0.12s;
}

.btn-submit:hover { background: var(--accent-hover); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.status {
  font-size: 13px;
  text-align: center;
  min-height: 18px;
}

.status.success { color: var(--success-text); }
.status.error   { color: var(--error-text); }
