/* Fara website. Palette and voice: brand/style-guide.md. */

:root {
  --plum: #3B2032;
  --persimmon: #F36B4A;
  --butter: #F7D988;
  --ivory: #FAF6EE;

  --ink: var(--plum);
  --ink-2: rgba(59, 32, 50, 0.72);
  --ink-3: rgba(59, 32, 50, 0.52);
  --hairline: rgba(59, 32, 50, 0.12);
  --paper: var(--ivory);
  --card: #FFFFFF;
  --wash: #F3ECDF;

  --serif: "Newsreader", ui-serif, "New York", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;

  --page: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 24px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-color: rgba(59, 32, 50, 0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--persimmon); }

:focus-visible { outline: 3px solid var(--persimmon); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 14px; z-index: 10; }

/* Type */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0;
}
h1 { font-size: clamp(44px, 7.2vw, 84px); }
h2 { font-size: clamp(34px, 4.6vw, 54px); }
h3 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; }

p { margin: 0; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 34em; }
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.accent { color: var(--persimmon); font-style: italic; }

/* Header */

.site-header { position: sticky; top: 0; z-index: 5; background: rgba(250, 246, 238, 0.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.site-header.scrolled { border-bottom-color: var(--hairline); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font-size: 15px; }
.nav a:not(.button) { text-decoration: none; color: var(--ink-2); }
.nav a:not(.button):hover { color: var(--ink); }
@media (max-width: 560px) { .nav .hide-small { display: none; } }

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--plum);
  color: var(--ivory);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), background 0.2s;
}
.button:hover { background: #4d2a42; transform: translateY(-1px); }
.button:active { transform: scale(0.98); }
.button.small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.button.light { background: var(--ivory); color: var(--plum); }
.button.light:hover { background: #fff; }
.button svg { width: 18px; height: 18px; flex: none; }

/* Hero */

.hero { position: relative; padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.hero .kicker { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); line-height: 1.3; margin: 0; }
.hero .display { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; line-height: 1.08; font-size: clamp(44px, 7.2vw, 84px); margin: 14px 0 22px; }
.hero .lede { margin-bottom: 32px; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--ink-3); }
.hero-visual { position: relative; display: flex; justify-content: center; }
.ribbon { position: absolute; top: -10%; left: -6%; width: 136%; height: 120%; pointer-events: none; z-index: 0; overflow: visible; }
.ribbon path { fill: none; stroke: var(--persimmon); stroke-width: 34; stroke-linecap: round; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: left; }
  .hero-visual { margin-top: 8px; }
}

/* Phone */

/* Every measurement derives from --w, so the bezel and corners keep the same
   proportions at any size. iPhone's screen corners are about 13.7% of its width;
   the frame's corner is the screen's plus the bezel, so the two stay concentric. */
.phone {
  --w: min(320px, 78vw);
  --bezel: calc(var(--w) * 0.034);
  --screen-radius: calc((var(--w) - 2 * var(--bezel)) * 0.137);
  position: relative;
  z-index: 1;
  width: var(--w);
  padding: var(--bezel);
  border-radius: calc(var(--screen-radius) + var(--bezel));
  background: #1d1118;
  box-shadow:
    0 0 0 max(1px, calc(var(--w) * 0.004)) rgba(255, 255, 255, 0.08) inset,
    0 calc(var(--w) * 0.12) calc(var(--w) * 0.24) calc(var(--w) * -0.09) rgba(59, 32, 50, 0.45),
    0 calc(var(--w) * 0.055) calc(var(--w) * 0.09) calc(var(--w) * -0.055) rgba(59, 32, 50, 0.35);
  backface-visibility: hidden;
}
.phone img { width: 100%; height: auto; aspect-ratio: 1206 / 2622; border-radius: var(--screen-radius); background: var(--paper); }
.phone.tilt-l { transform: rotate(-3deg); }
.phone.tilt-r { transform: rotate(3deg); }

/* Fact band */

.facts { background: var(--plum); color: var(--ivory); padding: clamp(56px, 8vw, 104px) 0; position: relative; overflow: hidden; }
.facts .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 26rem)); gap: clamp(28px, 4vw, 56px); }
.fact .num { font-family: var(--serif); font-size: clamp(52px, 6vw, 76px); line-height: 1; color: var(--butter); letter-spacing: -0.02em; }
.fact p { margin-top: 14px; color: rgba(250, 246, 238, 0.82); font-size: 17px; max-width: 18em; }
.facts h2 { margin-bottom: clamp(36px, 5vw, 56px); max-width: 15em; }
.facts .source { margin-top: clamp(32px, 4vw, 48px); font-size: 13px; color: rgba(250, 246, 238, 0.6); }
.facts .source a { text-decoration-color: rgba(250, 246, 238, 0.4); }
@media (max-width: 760px) { .facts .grid { grid-template-columns: 1fr; } }

/* Features */

.section { padding: clamp(72px, 10vw, 136px) 0; }
.section-head { max-width: 40em; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { margin: 0 0 16px; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.feature + .feature { margin-top: clamp(80px, 11vw, 144px); }
.feature.flip .feature-text { order: 2; }
.feature-text h2 { margin: 16px 0 16px; font-size: clamp(30px, 3.4vw, 42px); }
.feature-text p { color: var(--ink-2); max-width: 30em; }
.feature-text ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.feature-text li { position: relative; padding-left: 26px; color: var(--ink); }
.feature-text li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 10px; height: 10px; border-radius: 50%; background: var(--persimmon); }
.feature-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 420px; }
.feature-visual .blob { position: absolute; inset: 8% 4%; border-radius: 48% 52% 46% 54% / 55% 45% 55% 45%; background: var(--wash); z-index: 0; }
.feature-visual .blob.butter { background: rgba(247, 217, 136, 0.45); }
.feature-visual .blob.persimmon { background: rgba(243, 107, 74, 0.16); }
.feature-visual .phone { --w: min(290px, 70vw); }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-text { order: 0; }
  .feature-visual { min-height: 0; padding: 24px 0; }
}

/* Learn strip */

.learn { background: var(--wash); }
.covers { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 2vw, 24px); }
.cover { margin: 0; background: var(--card); border-radius: 20px; overflow: hidden; border: 1px solid var(--hairline); }
.cover img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.cover span { display: block; padding: 14px 18px 18px; font-family: var(--serif); font-size: 20px; line-height: 1.2; }
@media (max-width: 860px) { .covers { grid-template-columns: repeat(2, 1fr); } }
.learn-note { margin-top: 28px; font-size: 14px; color: var(--ink-3); max-width: 44em; }

/* Privacy band */

.privacy-band { background: var(--butter); }
.privacy-band .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.privacy-band h2 { margin: 0 0 20px; }
.privacy-band .wrap { align-items: center; }
.privacy-band .lede { color: rgba(59, 32, 50, 0.8); }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.points li { padding: 18px 0; border-bottom: 1px solid rgba(59, 32, 50, 0.16); }
.points li:last-child { border-bottom: 0; }
.points strong { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.25; }
.points span { display: block; margin-top: 4px; color: rgba(59, 32, 50, 0.78); font-size: 16px; }
@media (max-width: 860px) { .privacy-band .wrap { grid-template-columns: 1fr; } }

/* Plans */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 28px); }
.plan { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); padding: clamp(28px, 3.4vw, 40px); }
.plan.plus { background: var(--plum); color: var(--ivory); border-color: var(--plum); position: relative; overflow: hidden; }
.plan h3 { font-size: 32px; }
.plan .tag { display: inline-block; margin-top: 8px; font-size: 15px; color: var(--ink-3); }
.plan.plus .tag { color: var(--butter); }
.plan ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.plan li { padding-left: 28px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 14px; height: 8px; border-left: 2px solid var(--persimmon); border-bottom: 2px solid var(--persimmon); transform: rotate(-45deg); }
.plan.plus li::before { border-color: var(--butter); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* Closing */

.closing { text-align: center; padding: clamp(80px, 11vw, 140px) 0; position: relative; overflow: hidden; }
.closing .mono { width: 64px; margin: 0 auto 28px; }
.closing h2 { max-width: 14em; margin: 0 auto 28px; }
.closing .lede { margin: 0 auto 32px; }

/* Footer */

.site-footer { background: var(--plum); color: rgba(250, 246, 238, 0.78); padding: 56px 0 40px; font-size: 15px; }
.site-footer .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: flex-start; }
.site-footer .brand img { height: 34px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.site-footer a { color: var(--ivory); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--persimmon); }
.site-footer .fine { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(250, 246, 238, 0.14); display: grid; gap: 10px; font-size: 13px; color: rgba(250, 246, 238, 0.6); }

/* Legal and support pages */

.doc { padding: clamp(48px, 7vw, 88px) 0 clamp(72px, 9vw, 120px); }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(40px, 6vw, 60px); margin: 14px 0 16px; }
.doc .updated { color: var(--ink-3); font-size: 15px; }
.doc .summary { margin: 36px 0 8px; padding: 24px 28px; background: var(--card); border: 1px solid var(--hairline); border-radius: 20px; }
.doc .summary h2 { font-size: 22px; margin: 0 0 12px; }
.doc .summary ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.doc h2 { font-size: clamp(26px, 3vw, 32px); margin: 52px 0 14px; }
.doc h3 { font-size: 21px; margin: 28px 0 8px; }
.doc p, .doc li { color: rgba(59, 32, 50, 0.86); }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 22px; display: grid; gap: 8px; margin: 14px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--hairline); }
.doc th { font-weight: 600; }
.table-scroll { overflow-x: auto; }

.faq details { border-bottom: 1px solid var(--hairline); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-family: var(--serif); font-size: 21px; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); transition: transform 0.3s var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 20px; }
.faq details p + p { margin-top: 10px; }

.contact-card { margin: 32px 0 8px; padding: 28px; border-radius: 20px; background: var(--plum); color: var(--ivory); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.contact-card p { color: rgba(250, 246, 238, 0.82); }
.contact-card strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 26px; color: var(--ivory); }

/* Motion */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }
.ribbon path { stroke-dasharray: var(--len, 3000); stroke-dashoffset: var(--len, 3000); animation: draw 2.4s 0.3s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .ribbon path { animation: none; stroke-dashoffset: 0; }
  .button { transition: none; }
}

/* Home FAQ */
.faq-home { padding-top: 0; }
.faq-home .wrap { max-width: 760px; }
.faq-home h2 { margin-bottom: 12px; }
.faq-home .faq p { color: var(--ink-2); }
