/* FRCA Focus — landing page */

:root {
  --paper: #faf8f4;
  --paper-2: #f2efe8;
  --card: #ffffff;
  --ink: #16211f;
  --ink-2: #394745;
  --muted: #6a7876;
  --line: #e2ddd3;
  --teal: #2aa7a1;          /* brand */
  --teal-ink: #17736f;      /* brand, dark enough for text on paper */
  --teal-wash: #e4f3f1;
  --poppy: #e9642f;         /* from the logo */
  --danger: #b42318;
  --ok: #17736f;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 33, 31, .06), 0 12px 32px -12px rgba(22, 33, 31, .18);
  --wrap: 1160px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow, main p.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--poppy); margin-bottom: .9em;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font: 600 .95rem/1 var(--sans); color: #fff; background: var(--teal-ink);
  border: 1px solid var(--teal-ink); border-radius: 8px; padding: .7em 1.1em;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { background: #115c59; border-color: #115c59; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-lg { font-size: 1.02rem; padding: .85em 1.35em; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--card); color: var(--ink); border-color: var(--ink-2); }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; transition: margin .15s; }
.link-arrow:hover::after { margin-left: 3px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, .88);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.2rem var(--serif); }
.brand img { height: 40px; width: auto; }
.brand-small { font-size: 1rem; }
.brand-small img { height: 28px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links > a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.nav-links > a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 8px; margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s, opacity .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; }
.bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Screenshot frames */
.frame {
  margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; position: relative; cursor: zoom-in;
}
.frame::before { content: ""; display: block; height: 10px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.frame img { width: 100%; }
.frame-crop img { aspect-ratio: 16 / 11; object-fit: cover; object-position: top left; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; margin: 28px 0 32px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: .95rem; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.facts strong { color: var(--ink); font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin-right: 2px; }
.hero-shot { transform: rotate(1.2deg); transform-origin: left center; }
.hero-shot img { aspect-ratio: 1468 / 1150; object-fit: cover; object-position: top; }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tint { background: var(--paper-2); }
.section-tint .frame::before { background: #f7f5f0; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-sub { color: var(--ink-2); font-size: 1.1rem; }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.step .frame-crop img { aspect-ratio: 4 / 3; object-position: center top; }
.step .frame-left img { object-position: left top; }
.step-text { padding: 22px 4px 0; position: relative; }
.step-n { display: block; font: 600 2.2rem/1 var(--serif); color: var(--poppy); margin-bottom: 10px; }
.step-text p { color: var(--ink-2); margin: 0; }

/* Sample card */
.try-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.try-intro { position: sticky; top: 100px; }
.try-intro p { color: var(--ink-2); }
.sample { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.sample-head { padding: 26px 30px 22px; border-bottom: 1px solid var(--line); }
.sample-topic { font-size: .85rem; color: var(--muted); margin: 0 0 8px; }
.sample-q { font-family: var(--sans); font-size: 1.45rem; font-weight: 650; letter-spacing: -.01em; margin: 0; }
.sample-reveal { padding: 56px 30px; text-align: center; }
.sample-reveal p { margin: 12px 0 0; }
.sample-answer { padding: 26px 30px 30px; animation: rise .35s ease both; }
.card-content { overflow-x: auto; line-height: 1.55; }
.card-content table { border-collapse: collapse; width: 100%; margin: 0 0 1em; }
.card-content td, .card-content th { border-bottom: 1px solid var(--line); padding: 10px 12px; vertical-align: middle; text-align: left; }
.card-content tr:last-child td { border-bottom: 0; }
.card-content img, .card-content .content-image { max-width: min(100%, 240px); height: auto; display: inline-block; vertical-align: middle; cursor: zoom-in; }
.card-content ul, .card-content ol { padding-left: 1.3em; }
.card-content p:last-child { margin-bottom: 0; }
.card-addition { margin-top: 18px; padding: 16px 18px; background: var(--paper); border-radius: 8px; }
.card-link { color: var(--teal-ink); font-size: .9em; white-space: nowrap; }

abbr.acro {
  text-decoration: underline dotted var(--teal); text-decoration-thickness: 2px; text-underline-offset: 4px;
  cursor: help; position: relative;
}
abbr.acro:hover::after, abbr.acro:focus::after {
  content: attr(data-meaning); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: var(--ink); color: #fff; font: 500 .85rem/1.3 var(--sans); padding: 6px 10px; border-radius: 6px;
  white-space: nowrap; max-width: 280px; z-index: 5; pointer-events: none;
}

.rate { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.rate-label { font-weight: 600; margin-bottom: 12px; }
.rate-scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.rate-scale button {
  --h: calc(var(--i, 0) * 12);
  font: 600 .95rem/1 var(--sans); padding: 11px 0; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); transition: background .12s, color .12s, border-color .12s;
}
.rate-scale button:hover, .rate-scale button[aria-pressed="true"] {
  background: hsl(var(--h) 62% 44%); border-color: hsl(var(--h) 62% 44%); color: #fff;
}
.rate-ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.rate-result { margin: 16px 0 0; color: var(--ink-2); min-height: 1.6em; }
.rate-result a { font-weight: 600; }

/* Features */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 6vw, 80px); align-items: center; margin-bottom: clamp(64px, 9vw, 112px); }
.feature-flip .feature-text { order: 2; }
.feature-text p { color: var(--ink-2); }
.feature-text strong { color: var(--ink); }
.stack { position: relative; padding: 0 0 18% 12%; }
.stack-back { width: 88%; margin-left: -12%; }
.stack-back img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.stack-front { position: absolute; right: 0; bottom: 0; width: 58%; }
.stack-front img { aspect-ratio: 1 / 1; object-fit: cover; object-position: center 60%; }
.also { list-style: none; margin: 0; padding: 32px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; color: var(--ink-2); }
.also strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.15rem; margin-bottom: 4px; }

/* About */
.about { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 40px; max-width: 900px; }
.about-mark img { height: 96px; width: auto; }
.about-text p { color: var(--ink-2); font-size: 1.08rem; }
.about-text .small { font-size: .9rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font: 600 1.15rem var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { color: var(--ink-2); margin: 0 0 22px; max-width: 62ch; }

/* Support */
.support-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.support-intro p { color: var(--ink-2); }
.support-form { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: flex; justify-content: space-between; align-items: baseline; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.count { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 1rem/1.4 var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; transition: border-color .15s, background .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); }
.field [aria-invalid="true"] { border-color: var(--danger); background: #fff; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 4px; }
.form-status { margin: 0; font-size: .95rem; }
.form-status.error { color: var(--danger); }
.form-sent { text-align: center; padding: 28px 8px; }
.form-sent h3 { margin-bottom: .3em; }
.form-sent p { color: var(--ink-2); margin: 0; }
.tick { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%; background: var(--teal-wash); display: grid; place-items: center; }
.tick::after { content: ""; width: 10px; height: 20px; border: solid var(--teal-ink); border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* Dialogs, cookie notice, lightbox */
dialog.legal {
  width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 720px); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px 30px; color: var(--ink); background: var(--card); box-shadow: 0 24px 64px rgba(0, 0, 0, .25);
}
dialog.legal::backdrop { background: rgba(22, 33, 31, .45); }
dialog.legal p, dialog.legal li { color: var(--ink-2); font-size: .95rem; }
dialog.legal ul { padding-left: 1.2em; }
dialog.legal form { margin-top: 18px; text-align: right; }
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; margin: 0 auto; max-width: 620px;
  display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); font-size: .92rem;
}
.cookie p { margin: 0; color: var(--ink-2); }
.cookie[hidden], .lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(12, 18, 17, .88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: min(1400px, 100%); max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }

/* Scroll-in */
.reveal-on-scroll { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal-on-scroll.in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
  .sample-answer { animation: none; }
  .hero-shot { transform: none; }
}

/* Tablet */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links > a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-cta { margin: 16px 0 0; }
  .nav-cta .btn { flex: 1; }
  .hero-grid, .try-grid, .feature, .support-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-shot { transform: none; }
  .try-intro { position: static; }
  .feature-flip .feature-text { order: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 48px; max-width: 620px; }
  .also { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* Phone */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sample-head, .sample-answer { padding-left: 18px; padding-right: 18px; }
  .sample-q { font-size: 1.25rem; }
  .card-content td, .card-content th { padding: 8px 6px; font-size: .92rem; }
  .card-content table { min-width: 500px; } /* grid cards scroll sideways rather than shrinking diagrams to nothing */
  .card-content img, .card-content .content-image { max-width: min(100%, 150px); }
  .rate-scale { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .rate-scale button { padding: 12px 0; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .about-mark img { height: 64px; width: auto; }
  .stack { padding: 0 0 22% 0; }
  .stack-back { width: 90%; margin-left: 0; }
  .stack-front { width: 55%; }
  .cookie { flex-direction: column; align-items: stretch; text-align: left; }
  abbr.acro:hover::after, abbr.acro:focus::after { white-space: normal; width: max-content; max-width: 70vw; }
}
