/* ============================================================
   EditFrame - editorial review publication
   Self-hosted fonts: Fraunces (display), Inter (body)
   ============================================================ */

@import url('../fonts/fonts.css');

:root {
  --paper: #FAF8F4;
  --paper-tint: #F2EEE6;
  --ink: #1A1713;
  --ink-soft: #3A342C;
  --muted: #6B6258;
  --hairline: #E1DACD;
  --accent: #D64520;
  --accent-strong: #B23A1A;
  --white: #FFFFFF;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --measure: 68ch;
  --radius: 4px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
img { background: var(--paper-tint); }
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
ul, ol { padding-left: 1.4em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 600; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; color: var(--paper); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
main { padding-bottom: 4rem; }
.section { padding-block: 3rem; }
.section + .section { border-top: 1px solid var(--hairline); }
.section-tint { background: var(--paper-tint); }
.prose { max-width: var(--measure); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}
h1 { font-size: clamp(2.25rem, 5.5vw, 3.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.625rem, 3.5vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.375rem; margin: 2rem 0 0.75rem; }
h4 { font-size: 1.125rem; margin: 1.5rem 0 0.5rem; }
p { margin-bottom: 1.1em; }
.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.75rem;
}
.meta {
  font-size: 0.875rem;
  color: var(--muted);
}
em { font-style: italic; }
.drop-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.375rem;
  line-height: 1.4;
  color: var(--ink-soft);
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 2rem 0;
}
.drop-quote footer {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 1rem 1.5rem;
  min-height: 48px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-strong); color: var(--white); }
.btn-primary:hover { background: var(--accent); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  min-height: 48px;
}
.brand svg { width: 30px; height: 30px; }
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}
.brand:hover .brand-name { color: var(--ink); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: background 0.15s ease;
  content: '';
}
.nav-toggle-bars::before { position: absolute; top: -7px; }
.nav-toggle-bars::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }
.nav-toggle-bars::before, .nav-toggle-bars::after { transition: transform 0.15s ease, top 0.15s ease; }

.site-nav { display: none; }
.site-nav.is-open {
  display: block;
  position: absolute;
  left: 0; right: 0;
  top: 68px;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
  z-index: 100;
}
.site-header { position: relative; }
.site-nav ul { list-style: none; padding: 0; margin: 0; }
.site-nav li + li { margin-top: 0; }
.site-nav a, .dropdown-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  color: var(--ink);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--sans);
}
.site-nav a:hover, .dropdown-toggle:hover { color: var(--accent-strong); background: var(--paper-tint); }
.site-nav a[aria-current="page"] { color: var(--accent-strong); font-weight: 600; }
.dropdown { display: none; }
.has-dropdown.is-open .dropdown { display: block; }
.dropdown a { padding-left: 2.25rem; }
.dropdown-toggle::after {
  content: '';
  margin-left: auto;
  width: 8px; height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.has-dropdown.is-open .dropdown-toggle::after { transform: rotate(225deg); }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; }
  .site-nav > ul { display: flex; align-items: center; gap: 0.25rem; }
  .site-nav a, .dropdown-toggle { width: auto; padding: 0.5rem 0.85rem; min-height: 48px; }
  .site-nav a:hover, .dropdown-toggle:hover { background: transparent; }
  .has-dropdown { position: relative; }
  .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 15rem;
    background: var(--white);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(26, 23, 19, 0.08);
    padding: 0.35rem 0;
  }
  .dropdown a { padding-left: 1rem; }
  .dropdown-toggle::after { margin-left: 0.5rem; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 3rem; }
.hero-grid { display: grid; gap: 2rem; }
.hero h1 { margin-bottom: 1rem; }
.hero .lede { margin-bottom: 1.75rem; }
.hero-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (min-width: 900px) {
  .hero { padding-block: 4.5rem; }
  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: 3.5rem;
  }
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .card-feature { grid-column: span 2; }
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.card-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.card h3 {
  font-size: 1.375rem;
  margin: 0 0 0.6rem;
}
.card p { color: var(--muted); font-size: 0.9375rem; margin-bottom: 1rem; }
.card-cta {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--accent-strong);
}

/* ---------- Tool review blocks ---------- */
.tool {
  border-top: 1px solid var(--hairline);
  padding: 2rem 0;
}
.tool:first-of-type { border-top: 0; padding-top: 0; }
.tool-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.tool-rank {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}
.tool-head h3 { margin: 0; font-size: 1.625rem; }
.tool-tag { font-size: 0.875rem; color: var(--muted); }
.tool-cols {
  display: grid;
  gap: 1.25rem;
  margin: 1.25rem 0;
}
@media (min-width: 700px) { .tool-cols { grid-template-columns: 1fr 1fr; } }
.pros-cons {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.pros-cons h4 { margin: 0 0 0.5rem; font-family: var(--sans); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.pros-cons ul { margin: 0; font-size: 0.9375rem; }
.verdict {
  background: var(--paper-tint);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
}
.verdict p:last-child { margin-bottom: 0; }
.verdict strong { font-family: var(--serif); font-size: 1.125rem; }

/* ---------- Comparison table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--white);
  margin: 1.5rem 0;
}
table.compare {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.compare th, .compare td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.compare thead th {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody tr:nth-child(even) { background: var(--paper); }
.compare td:first-child { font-weight: 600; }

/* ---------- FAQ ---------- */
.faq details {
  border-bottom: 1px solid var(--hairline);
  padding: 1rem 0;
}
.faq summary {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.faq details p { margin: 0.75rem 0 0.5rem; }

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
.team-member img {
  width: 100%;
  max-width: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  margin-bottom: 1rem;
}
.team-member h3 { margin: 0 0 0.25rem; font-size: 1.375rem; }
.team-role {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.75rem;
}
.team-member p { font-size: 0.9375rem; color: var(--muted); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1.25rem; max-width: 40rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.4rem;
}
.field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  min-height: 48px;
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field .field-error {
  display: none;
  color: var(--accent-strong);
  font-size: 0.875rem;
  margin-top: 0.35rem;
}
.field.has-error input, .field.has-error textarea { border-color: var(--accent-strong); }
.field.has-error .field-error { display: block; }
.hp-field {
  position: absolute;
  left: -100vw;
  width: 1px; height: 1px;
  overflow: hidden;
}
.form-status {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-weight: 500;
}
.form-status:empty { display: none; }
.form-status.is-ok { background: #EDF3E8; border: 1px solid #9DB78D; color: #2F4A26; }
.form-status.is-error { background: #F9E9E4; border: 1px solid var(--accent); color: var(--accent-strong); }

/* ---------- Contact details ---------- */
.contact-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.detail-list { list-style: none; padding: 0; }
.detail-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
}
.detail-list li:first-child { padding-top: 0; }
.detail-list dt {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.detail-list dd { margin: 0; }
.map-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  margin-top: 1.5rem;
}

/* ---------- Figures ---------- */
figure { margin: 2rem 0; }
figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
}
figcaption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* ---------- Article meta / TOC ---------- */
.article-head {
  padding-block: 3rem 2rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 2.5rem;
}
.article-head h1 { margin-bottom: 1rem; }
.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.article-body h2 { margin-top: 2.5rem; }
.article-body figure:first-child { margin-top: 0; }

/* ---------- Legal pages ---------- */
.legal h2 { margin-top: 2.5rem; }
.legal .updated { font-size: 0.875rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--paper-tint);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.footer-brand p {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 46ch;
  margin-top: 1rem;
}
.footer-nav ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}
@media (min-width: 768px) { .footer-nav ul { grid-template-columns: 1fr 1fr; } }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
}
.footer-nav a:hover { color: var(--accent-strong); }
.footer-copy {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------- Consent banner ---------- */
.consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 300;
  background: var(--white);
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -8px 30px rgba(26, 23, 19, 0.10);
  padding: 1.25rem 0;
}
.consent-inner {
  display: grid;
  gap: 1rem;
}
.consent-text { font-size: 0.9375rem; color: var(--ink-soft); max-width: 70ch; }
.consent-text p { margin-bottom: 0.35rem; }
.consent-text a { font-weight: 500; }
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.consent-actions .btn { padding: 0.85rem 1.25rem; min-height: 48px; font-size: 0.9375rem; }
.consent-settings {
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
  display: grid;
  gap: 0.75rem;
}
.consent-settings[hidden] { display: none; }
.consent-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  cursor: pointer;
}
.consent-option input {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.15rem;
  accent-color: var(--accent-strong);
  flex-shrink: 0;
}
.consent-option input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent-option .option-note { display: block; font-size: 0.8125rem; color: var(--muted); }
.consent-save-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
@media (min-width: 768px) {
  .consent-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .consent-settings { grid-column: 1 / -1; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
