/* Quiline marketing site — shared stylesheet.
   Tokens are consumed by the editor app too; names and values are contractual. */

:root {
  --bg: #FAFAF8;
  --bg-elevated: #FFFFFF;
  --text: #33302A;
  --text-muted: #6E6A61;
  --accent: #C2410C;
  --on-accent: #FFFFFF;
  --border: #E5E2DA;
  --code-bg: #F1EFEA;
  --selection: rgba(194, 65, 12, .18);
  --font-sans: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
  --content-max-width: 68ch;
  --line-height: 1.7;
  --radius: 10px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #1A1A1D;
  --bg-elevated: #222226;
  --text: #E8E6E1;
  --text-muted: #9B978E;
  --accent: #FB923C;
  --on-accent: #1A1A1D;
  --border: #323237;
  --code-bg: #26262B;
  --selection: rgba(251, 146, 60, .25);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #1A1A1D;
    --bg-elevated: #222226;
    --text: #E8E6E1;
    --text-muted: #9B978E;
    --accent: #FB923C;
    --on-accent: #1A1A1D;
    --border: #323237;
    --code-bg: #26262B;
    --selection: rgba(251, 146, 60, .25);
    color-scheme: dark;
  }
}

/* Base */

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

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

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

::selection { background: var(--selection); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .5em;
}

h1 { font-size: 2.4rem; letter-spacing: -.01em; }
h2 { font-size: 1.55rem; margin-top: 2.2em; }
h3 { font-size: 1.15rem; margin-top: 1.8em; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: .92em;
  background: var(--code-bg);
  border-radius: 5px;
  padding: .12em .38em;
}

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

ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

.wrap {
  width: min(100% - 2.5rem, var(--content-max-width));
  margin-inline: auto;
}

.wrap-wide {
  width: min(100% - 2.5rem, 66rem);
  margin-inline: auto;
}

/* Reference and feature pages: one column wide enough for a screenshot or a
   comparison table, so headings, copy, figures, and tables all share the same
   left and right edges. 68ch of prose in a 1056px container left a void on the
   right and made every figure look misaligned. */
.wrap-page {
  width: min(100% - 2.5rem, 52rem);
  margin-inline: auto;
}

/* Copy inside a wide container keeps a readable measure instead of stretching to
   the container. Figures, tables, and figcaptions use the full width. */
.wrap-wide :is(p, li, blockquote),
.wrap-page :is(p, li, blockquote) {
  max-width: var(--content-max-width);
}

/* Centred copy keeps its auto margins: capping the block width would otherwise
   left-align it inside the wider column and only the text would look centred. */
.hero p,
.section-head p,
.cta-band p {
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-elevated);
  color: var(--text);
  padding: .5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus { left: .75rem; top: .75rem; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-block: .7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.brand svg { display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .95rem;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

.nav-dropdown { position: relative; }

.nav-dropdown summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  user-select: none;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary:hover { color: var(--text); }
.nav-dropdown summary::after {
  content: "";
  border: 4px solid transparent;
  border-top-color: currentColor;
  transform: translateY(2px);
}
.nav-dropdown[open] summary::after {
  border-top-color: transparent;
  border-bottom-color: currentColor;
  transform: translateY(-2px);
}

.nav-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  min-width: 11rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  display: grid;
}
.nav-menu a {
  padding: .45rem .6rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: .92rem;
}
.nav-menu a:hover { background: var(--code-bg); }

.header-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); background: var(--bg-elevated); }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }

/* Buttons */

.btn {
  display: inline-block;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-elevated);
  cursor: pointer;
}
.btn:hover { border-color: var(--text-muted); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover { background: var(--accent); filter: brightness(1.06); border-color: var(--accent); }

/* Hero */

.hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.hero h1 { font-size: 3rem; margin-bottom: .35em; }

.hero .lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 auto 1.6rem;
}

.hero-cta {
  display: flex;
  gap: .8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-cta .btn { padding: .7rem 1.4rem; font-size: 1rem; }

/* Screenshots and the paste demo. One frame style for both, so a still and the
   video read as the same object on the page. */

figure.shot {
  /* auto, not 0: a shorthand here outranks any helper class, so centring must live
     in this rule or it silently loses the cascade. */
  margin: 1.7rem auto;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .10);
  overflow: hidden;
  text-align: left;
}

figure.shot img,
figure.shot video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--code-bg);
}

figure.shot figcaption {
  padding: .7rem .95rem .8rem;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Size buckets. Each cap stays at or below the capture's natural CSS width
   (half of its pixel width, since every still is a 2x capture), so a screenshot
   is never upscaled into blur. A figure never leaves its column: on prose pages
   its edges line up with the paragraphs above it. */

/* 832px: the split views, the demo video, and the toolbar strips. */
figure.shot.shot-l { max-width: 52rem; }

/* 704px: the table grid and the Edit table chip. */
figure.shot.shot-m { max-width: 44rem; }

/* 400px: portrait dialogs and the settings column, both captured no wider. */
figure.shot.shot-s { max-width: 25rem; }

.hero figure.shot { margin-top: 2.4rem; }

.section-cta { text-align: center; margin-top: 1.6rem; }

/* Sections */

.section { padding: 2.5rem 0; }

.section-head { text-align: center; margin-bottom: 2.2rem; }
.section-head h2 { margin-top: 0; font-size: 1.9rem; }
.section-head p { color: var(--text-muted); max-width: 52ch; margin-inline: auto; }

/* Feature grid */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1rem;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.1rem;
}

.feature-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
  font-family: var(--font-sans);
  font-weight: 650;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: .95rem;
}

.feature-card .feature-icon { color: var(--accent); margin-bottom: .6rem; }

/* Comparison table */

.table-scroll { overflow-x: auto; margin-bottom: 1rem; }

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 44rem;
}

table.compare caption {
  text-align: left;
  color: var(--text-muted);
  font-size: .9rem;
  padding-bottom: .5rem;
}

table.compare th,
table.compare td {
  text-align: left;
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.compare thead th {
  font-family: var(--font-serif);
  font-size: 1rem;
  border-bottom: 2px solid var(--border);
}

table.compare tbody tr:last-child th,
table.compare tbody tr:last-child td { border-bottom: 0; }

table.compare tbody th { font-weight: 600; }

table.compare .col-us {
  background: var(--code-bg);
  font-weight: 600;
}
table.compare thead .col-us { color: var(--accent); }

/* "What it is not" */

.not-list { list-style: none; padding: 0; }
.not-list li {
  padding-left: 1.7em;
  position: relative;
  margin-bottom: .6em;
}
.not-list li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.check-list { list-style: none; padding: 0; }
.check-list li {
  padding-left: 1.7em;
  position: relative;
  margin-bottom: .6em;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Feature detail sections (features page) */

.feature-detail { border-top: 1px solid var(--border); padding: 1.6rem 0 .4rem; }
.feature-detail:first-of-type { border-top: 0; }
.feature-detail h2 { margin-top: 0; font-size: 1.35rem; }
.feature-detail p { color: var(--text-muted); }
.feature-detail p strong { color: var(--text); }

/* FAQ */

.faq-item { border-bottom: 1px solid var(--border); padding: 1.4rem 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item h2 { margin-top: 0; font-size: 1.2rem; }
.faq-item p { color: var(--text-muted); }
.faq-item p:first-of-type { color: var(--text); }

/* Callout */

.callout {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }

/* CTA band */

.cta-band {
  text-align: center;
  padding: 3.2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
}
.cta-band h2 { margin-top: 0; font-size: 1.8rem; }
.cta-band p { color: var(--text-muted); max-width: 46ch; margin: 0 auto 1.4rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2.2rem 0 2.6rem;
  color: var(--text-muted);
  font-size: .9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1.5rem;
}

.footer-grid h2 {
  font-family: var(--font-sans);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 0 0 .7rem;
}

.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .4em; }
.footer-grid a { color: var(--text-muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); }

.footer-brand p { max-width: 34ch; }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Prose helpers */

.lede { font-size: 1.1rem; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.center { text-align: center; }

/* Responsive */

@media (max-width: 720px) {
  h1 { font-size: 2rem; }
  .hero { padding: 3rem 0 2.2rem; }
  .hero h1 { font-size: 2.3rem; }
  .header-inner { flex-wrap: wrap; gap: .6rem .9rem; }
  .site-nav { order: 3; width: 100%; margin-left: 0; justify-content: flex-start; flex-wrap: wrap; }
  .header-actions { margin-left: auto; }
  .nav-menu { left: 0; right: auto; }
  .header-cta-label { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  table.compare { min-width: 38rem; font-size: .88rem; }
}

@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}
