/* ==========================================
   FrameShift — AI Writing Tools Comparison
   ========================================== */

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

:root {
  --bg: #0a0f1e;
  --bg2: #0f1629;
  --bg3: #141d33;
  --surface: #1a2540;
  --border: #22304d;
  --text: #e8eaf6;
  --text-muted: #7a86a8;
  --accent: #00d4ff;
  --accent2: #ff3cac;
  --green: #00c896;
  --yellow: #f5a623;
  --orange: #ff8c42;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--accent); }
.nav-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.25);
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- Disclosure ---- */
.disclosure {
  background: rgba(0, 212, 255, 0.04);
  border-bottom: 1px solid rgba(0, 212, 255, 0.12);
  padding: 10px 24px;
}
.disclosure-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.disclosure-inner svg { flex-shrink: 0; color: var(--accent); }

/* ---- Hero ---- */
.hero {
  padding: 60px 24px 40px;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 212, 255, 0.07) 0%, transparent 70%);
}
.hero-inner { max-width: 820px; margin: 0 auto; }

.hero-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.hero-breadcrumb a { color: var(--accent); text-decoration: none; }
.hero-breadcrumb a:hover { text-decoration: underline; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.7;
  max-width: 680px;
}
.hero-sub strong { color: var(--text); }
.hero-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sep { color: var(--border); }

/* ---- Shared Section ---- */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.3rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ---- Ranking Section ---- */
.ranking-section {
  padding: 70px 24px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ranking-inner { max-width: 1000px; margin: 0 auto; }

/* Top 3 picks */
.top-picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.pick-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}
.pick-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.pick-1 { border-color: var(--accent); }
.pick-1:hover { box-shadow: 0 12px 40px rgba(0,212,255,0.15); }
.pick-2 { border-color: var(--green); }
.pick-2:hover { box-shadow: 0 12px 40px rgba(0,200,150,0.12); }
.pick-3 { border-color: var(--yellow); }
.pick-3:hover { box-shadow: 0 12px 40px rgba(245,166,35,0.12); }

.pick-rank {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.pick-1 .pick-rank { color: var(--accent); }
.pick-2 .pick-rank { color: var(--green); }
.pick-3 .pick-rank { color: var(--yellow); }

.pick-body { flex: 1; }
.pick-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.pick-best {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.pick-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.pick-reason {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.pick-cta {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}
.pick-2 .pick-cta { color: var(--green); }
.pick-3 .pick-cta { color: var(--yellow); }

/* Runners-up table */
.runners-up { }
.runners-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.runners-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.runners-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.runners-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
}
.runners-table tr:last-child td { border-bottom: none; }
.runners-table tbody tr { transition: background 0.15s; }
.runners-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.tool-cell .tool-name {
  font-weight: 700;
  color: var(--text);
}
.table-cta {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.85rem;
}
.table-cta:hover { text-decoration: underline; }

/* ---- Tool Sections ---- */
.tool-section {
  padding: 80px 24px;
  border-bottom: 1px solid var(--border);
}
.tool-alt { background: var(--bg2); }
.tool-inner { max-width: 1000px; margin: 0 auto; }

.tool-header {
  margin-bottom: 40px;
}
.tool-rank-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 12px;
}
.rank-1 { background: rgba(0,212,255,0.1); color: var(--accent); border: 1px solid rgba(0,212,255,0.3); }
.rank-2 { background: rgba(0,200,150,0.1); color: var(--green); border: 1px solid rgba(0,200,150,0.3); }
.rank-3 { background: rgba(245,166,35,0.1); color: var(--yellow); border: 1px solid rgba(245,166,35,0.3); }

.tool-name-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.tool-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.tool-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

.tool-review p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.75;
  font-size: 0.95rem;
}
.tool-review strong { color: var(--text); }
.tool-review h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 12px;
}
.pricing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pricing-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.pricing-list li strong { color: var(--text); }

/* Verdict box */
.verdict-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 80px;
}
.verdict-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.verdict-score {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 20px;
}
.verdict-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.verdict-list li {
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.verdict-list li::before {
  flex-shrink: 0;
  font-weight: 700;
  margin-top: 1px;
}
.verdict-list li.pro { color: var(--green); }
.verdict-list li.pro::before { content: '✓'; }
.verdict-list li.con { color: var(--text-muted); }
.verdict-list li.con::before { content: '✗'; color: #ff5c5c; }
.verdict-cta {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), #00a8cc);
  color: #0a0f1e;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: filter 0.15s, transform 0.15s;
}
.verdict-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ---- Primary Button ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), #00a8cc);
  color: #0a0f1e;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.45);
  filter: brightness(1.08);
}

/* ---- Comparison Matrix ---- */
.matrix-section {
  padding: 80px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.matrix-inner { max-width: 1000px; margin: 0 auto; }

.matrix-scroll { overflow-x: auto; }
.matrix-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.matrix-table th {
  padding: 12px 16px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.matrix-table th.feature-col { text-align: left; min-width: 200px; }
.matrix-table td {
  padding: 11px 16px;
  text-align: center;
  border: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
  font-size: 0.83rem;
}
.matrix-table tbody tr:nth-child(odd) td { background: rgba(255,255,255,0.01); }
.matrix-table tbody tr:hover td { background: rgba(0,212,255,0.03); }
.feature-name { text-align: left !important; font-weight: 600; color: var(--text) !important; }

.rating { letter-spacing: 1px; font-size: 0.78rem; }
.r5 { color: var(--accent); }
.r4 { color: var(--green); }
.r3 { color: var(--yellow); }
.r2 { color: var(--text-muted); }

.check { font-weight: 700; font-size: 0.9rem; }
.check:not(.partial):not(.no) { color: var(--green); }
.check.partial { color: var(--yellow); }
.check.no { color: #ff5c5c; }

.matrix-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ---- FAQ ---- */
.faq-section {
  padding: 80px 24px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.faq-inner { max-width: 760px; margin: 0 auto; }

.faq-list { display: flex; flex-direction: column; gap: 2px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item:hover { border-color: rgba(0, 212, 255, 0.2); }
.faq-item[open] { border-color: rgba(0, 212, 255, 0.3); }

summary {
  padding: 18px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.15s;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 700;
  transition: transform 0.2s;
  flex-shrink: 0;
}
details[open] summary::after { transform: rotate(45deg); }
details[open] summary { color: var(--accent); }

.faq-item p {
  padding: 0 24px 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.faq-item p strong { color: var(--text); }

/* ---- Email Opt-in ---- */
.optin-section {
  background: linear-gradient(135deg, #0d1528 0%, #0f2040 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
}
.optin-inner {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}
.optin-badge {
  display: inline-block;
  background: rgba(0, 200, 150, 0.15);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0, 200, 150, 0.3);
  margin-bottom: 20px;
}
.optin-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.25;
}
.optin-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.6;
}
.optin-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto 14px;
}
.optin-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}
.optin-input::placeholder { color: var(--text-muted); }
.optin-input:focus { border-color: var(--accent); }
.optin-btn {
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-body);
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.optin-btn:hover { opacity: 0.88; }
.optin-note {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- Guide Upsell ---- */
.guide-upsell {
  padding: 80px 24px;
  background: var(--bg);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.guide-upsell-inner { max-width: 640px; margin: 0 auto; }
.guide-upsell-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent2);
  background: rgba(255, 60, 172, 0.1);
  border: 1px solid rgba(255, 60, 172, 0.25);
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 20px;
}
.guide-upsell-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.guide-upsell-body {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}
.guide-upsell-body a { color: var(--accent); text-decoration: none; }
.guide-upsell-body a:hover { text-decoration: underline; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn-outline:hover { background: var(--accent); color: #0a0f1e; }

/* ---- Footer ---- */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 24px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .tool-body { grid-template-columns: 1fr; }
  .verdict-box { position: static; }
  .top-picks { grid-template-columns: 1fr; }
  .runners-table { font-size: 0.8rem; }
}

@media (max-width: 640px) {
  .optin-form { flex-direction: column; }
  .optin-btn { width: 100%; }
  .footer-inner { flex-direction: column; text-align: center; }
  .hero-meta { flex-direction: column; gap: 4px; }
  .sep { display: none; }
}
