/* ============================================================
   TidyMerge website — shared stylesheet
   Dark theme matching the app: near-black surfaces, teal accent.
   No external dependencies. Segoe UI font stack.
   ============================================================ */

:root {
  --bg:           #0b0e13;
  --bg-raised:    #11151c;
  --bg-card:      #151a23;
  --bg-inset:     #0e1218;
  --border:       #232a36;
  --border-soft:  #1b212c;
  --text:         #e6eaf0;
  --text-dim:     #9aa4b2;
  --text-faint:   #6b7684;
  --accent:       #14b8a6;
  --accent-bright:#2dd4bf;
  --accent-dim:   rgba(20, 184, 166, 0.12);
  --accent-line:  rgba(20, 184, 166, 0.35);
  --radius:       10px;
  --radius-sm:    6px;
  --max-w:        1080px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem; /* keep anchors clear of sticky header */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

code {
  font-family: "Cascadia Code", "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.9em;
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.muted { color: var(--text-dim); }
.small { font-size: 0.875rem; }

/* ---------- Keyboard shortcut keys ---------- */

kbd {
  display: inline-block;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8em;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(180deg, #1d2430, #161c26);
  border: 1px solid #2c3543;
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.15em 0.5em;
  margin: 0 0.08em;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.kbd-combo { white-space: nowrap; }
.kbd-combo .plus { color: var(--text-faint); margin: 0 0.1em; font-size: 0.85em; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 19, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.6rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  font-size: 1.1rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .logo { flex: 0 0 auto; display: block; }
.brand .by {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-faint);
  display: block;
  line-height: 1.1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.site-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a.nav-cta {
  color: var(--bg);
  background: var(--accent);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.site-nav a.nav-cta:hover { background: var(--accent-bright); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.3rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #06231f; }
.btn-primary:hover { background: var(--accent-bright); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent-line); text-decoration: none; }

/* ---------- Microsoft Store badge (CSS/SVG-drawn placeholder) ---------- */

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: #000;
  border: 1px solid #3a4250;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  color: #fff;
}
.store-badge:hover {
  text-decoration: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.store-badge .ms-logo { flex: 0 0 auto; display: block; }
.store-badge .badge-text { line-height: 1.15; text-align: left; }
.store-badge .badge-text .line1 {
  display: block;
  font-size: 0.68rem;
  color: #c8cdd5;
  letter-spacing: 0.02em;
}
.store-badge .badge-text .line2 {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
}

/* ---------- Hero ---------- */

.hero {
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(900px 420px at 75% -10%, rgba(20, 184, 166, 0.08), transparent 65%),
    radial-gradient(600px 320px at 10% 110%, rgba(20, 184, 166, 0.05), transparent 60%);
  border-bottom: 1px solid var(--border-soft);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy .tagline {
  color: var(--accent-bright);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
}

.hero-copy p.lede {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 34em;
}

.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.6rem 0 0.9rem;
}

.hero-meta {
  color: var(--text-faint);
  font-size: 0.875rem;
}
.hero-meta .sep { margin: 0 0.45em; }

.hero-art { min-width: 0; }

/* ---------- Sections ---------- */

.section { padding: 4rem 0; }
.section + .section { border-top: 1px solid var(--border-soft); }

.section-head { max-width: 44em; margin-bottom: 2.5rem; }
.section-head .eyebrow {
  color: var(--accent-bright);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.section-head p { color: var(--text-dim); font-size: 1.05rem; }

/* Alternating feature rows (the big three) */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 2.2rem 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--border-soft); }
.feature-row.flip .feature-visual { order: -1; }

.feature-copy h3 { font-size: 1.45rem; margin-bottom: 0.6rem; }
.feature-copy p { color: var(--text-dim); }

.shortcut-callout {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--text);
}
.shortcut-callout .label { color: var(--text-dim); font-size: 0.85rem; }

.feature-visual { min-width: 0; }

/* ---------- CSS-drawn UI mockups ---------- */

.mock-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  font-size: 0.875rem;
}
.mock-panel .mock-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.9rem;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 0.8rem;
}
.mock-panel .mock-titlebar .dots span {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  margin-left: 6px;
}
.mock-body { padding: 0.9rem; }

/* Quick-switcher mockup */
.mock-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-inset);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.7rem;
  color: var(--text);
}
.mock-search .caret {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--accent-bright);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.mock-list { display: flex; flex-direction: column; gap: 4px; }
.mock-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
}
.mock-item .item-name { font-weight: 600; white-space: nowrap; }
.mock-item .item-path {
  color: var(--text-faint);
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mock-item.selected {
  background: var(--accent-dim);
  border-left-color: var(--accent);
}
.mock-item.selected .item-path { color: var(--text-dim); }
.mock-hint {
  margin-top: 0.7rem;
  color: var(--text-faint);
  font-size: 0.78rem;
  display: flex;
  gap: 1.1rem;
}

/* Workspaces mockup */
.mock-ws-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-inset);
}
.mock-ws-row + .mock-ws-row { margin-top: 0.5rem; }
.mock-ws-row .ws-name { font-weight: 600; }
.mock-ws-row .ws-count { color: var(--text-faint); font-size: 0.8rem; }
.mock-ws-row .ws-restore {
  color: var(--accent-bright);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
}

/* Hotkey-mapping mockup */
.mock-hk-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-inset);
}
.mock-hk-row + .mock-hk-row { margin-top: 0.5rem; }
.mock-hk-row .arrow { color: var(--text-faint); }
.mock-hk-row .hk-path {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Feature card grid ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
}
.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.card h3 .ico {
  flex: 0 0 auto;
  display: inline-flex;
  width: 30px; height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
}
.card p { color: var(--text-dim); font-size: 0.93rem; margin: 0; }
.card .card-kbd { margin-top: 0.7rem; font-size: 0.85rem; color: var(--text-faint); }

/* ---------- Pricing ---------- */

.pricing-wrap {
  display: flex;
  justify-content: center;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  padding: 2.2rem 2.4rem;
  max-width: 26rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 4px var(--accent-dim);
}
.pricing-card .price {
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.pricing-card .price .cur { font-size: 1.6rem; vertical-align: 0.9em; font-weight: 600; }
.pricing-card .price-sub { color: var(--text-dim); margin: 0.4rem 0 1.4rem; }
.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6rem;
  text-align: left;
}
.pricing-card li {
  padding: 0.45rem 0 0.45rem 1.7rem;
  position: relative;
  color: var(--text-dim);
  border-top: 1px solid var(--border-soft);
}
.pricing-card li:first-child { border-top: 0; }
.pricing-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.85rem;
  width: 14px; height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.pricing-card .store-note { color: var(--text-faint); font-size: 0.82rem; margin-top: 1rem; }

/* ---------- FAQ ---------- */

.faq-list { max-width: 46rem; }
.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  margin-bottom: 0.7rem;
  overflow: hidden;
}
.faq-list summary {
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 2.6rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-bright);
  font-size: 1.2rem;
  font-weight: 400;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details .answer {
  padding: 0 1.1rem 1rem;
  color: var(--text-dim);
}
.faq-list details .answer p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  padding: 4.5rem 0;
  background:
    radial-gradient(700px 300px at 50% 120%, rgba(20, 184, 166, 0.1), transparent 65%);
  border-top: 1px solid var(--border-soft);
}
.cta-band h2 { margin-bottom: 0.4rem; }
.cta-band p { color: var(--text-dim); margin-bottom: 1.6rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 2.2rem 0 2.6rem;
  color: var(--text-faint);
  font-size: 0.875rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }

/* ---------- Legal / prose pages ---------- */

.page-head {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--border-soft);
}
.page-head .doc-meta { color: var(--text-faint); font-size: 0.9rem; }
.page-head .doc-meta strong { color: var(--text-dim); font-weight: 600; }

.prose {
  max-width: 46rem;
  padding: 2.5rem 0 4rem;
}
.prose h2 {
  font-size: 1.35rem;
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border-soft);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose p, .prose li { color: var(--text-dim); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0 1.5rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  vertical-align: top;
}
.prose th { background: var(--bg-raised); color: var(--text); font-weight: 600; }
.prose td { color: var(--text-dim); }

.callout {
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin: 1.2rem 0;
  color: var(--text);
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- Support page ---------- */

.support-grid {
  display: grid;
  grid-template-columns: 1fr 20rem;
  gap: 2.5rem;
  align-items: start;
  padding: 2.5rem 0 4rem;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 5rem;
}
.contact-card h3 { margin-bottom: 0.5rem; }
.contact-card p { color: var(--text-dim); font-size: 0.92rem; }
.contact-card .email {
  display: block;
  font-weight: 600;
  font-size: 1.02rem;
  margin: 0.6rem 0 1rem;
  overflow-wrap: anywhere;
}
.faq-group { margin-bottom: 2.4rem; }
.faq-group h2 { font-size: 1.3rem; margin-bottom: 1rem; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero { padding: 3rem 0 2.6rem; }
  .hero-art { max-width: 34rem; margin: 0 auto; }
  .feature-row { grid-template-columns: 1fr; gap: 1.6rem; padding: 2rem 0; }
  .feature-row.flip .feature-visual { order: 0; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .support-grid { grid-template-columns: 1fr; }
  .contact-card { position: static; }
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.7rem 1.25rem; }
  .site-nav a.nav-cta {
    margin: 0.5rem 1.25rem;
    text-align: center;
  }
  .pricing-card { padding: 1.8rem 1.4rem; }
  .section { padding: 3rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mock-search .caret { animation: none; }
}
