/* Factastic site: the App Store slides' deep navy, with serif headlines in the icon's warm white → gold → cyan. */

:root {
  --bg: #050d1c;
  --bg-top: #0a2447;       /* the slides' backgroundTop */
  --bg-2: #0e1a30;
  --card: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #f2f6fb;
  --muted: rgba(242, 246, 251, 0.7);
  --faint: rgba(242, 246, 251, 0.46);
  --accent: #1a6fb8;       /* between the slides' cyan and deep blue, dark enough for white text */
  --accent-hover: #2480cc;
  --accent-soft: rgba(56, 189, 240, 0.22);
  --accent-glow: rgba(56, 189, 240, 0.3);
  --link: #ffd185;
  --link-hover: #ffe2b0;
  --headline: linear-gradient(180deg, #fff5db 0%, #ffd185 55%, #9ee6ff 100%);
  --wallpaper: linear-gradient(160deg, #134a82 0%, #0d2d57 45%, #07162d 100%);
  --radius: 18px;
  --max: 1120px;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: radial-gradient(1200px 700px at 50% -10%, var(--bg-top) 0%, var(--bg) 62%) no-repeat, var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }

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

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 20px; }

/* ---------- Nav ---------- */

.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 22px; }
.brand img { width: 40px; height: 40px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.nav-links a.btn-primary { color: #fff; }
@media (max-width: 640px) {
  .nav-links a.hide-sm { display: none; }
  .nav-links { gap: 14px; }
  .brand img { width: 34px; height: 34px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 14px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--card-border); }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); color: var(--text); }
.btn svg { flex: none; }
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: 11px; }

/* ---------- Hero ---------- */

.hero { text-align: center; padding-block: 28px 10px; }
.headline {
  font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em;
  background: var(--headline); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1.05; margin: 0 0 16px; padding-bottom: .06em; }
.hero .lede { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 660px; margin: 0 auto 26px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }
.cta-note { color: var(--faint); font-size: 14px; margin-top: 12px; }

/* ---------- Live demo: a little Mac desktop ---------- */

.playground {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px;
  align-items: stretch; margin: 44px auto 0; text-align: left;
}
@media (max-width: 860px) { .playground { grid-template-columns: 1fr; } }

.desktop {
  position: relative; border-radius: 22px; overflow: hidden;
  background: var(--wallpaper);
  border: 1px solid var(--card-border);
  min-height: 380px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  outline: none;
}
.desktop:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

.menubar {
  position: absolute; inset: 0 0 auto 0; height: 28px; z-index: 2;
  display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 0 14px;
  background: rgba(6, 16, 34, .45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .88);
}
.menubar .dots { margin-right: auto; display: flex; gap: 6px; }
.menubar .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .28); }
.menubar-app {
  position: relative; display: grid; place-items: center; width: 28px; height: 22px; border-radius: 6px;
  border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer;
}
.menubar-app:hover, .menubar-app:focus-visible { background: rgba(255, 255, 255, .16); outline: none; }
.menubar svg { display: block; }

.window {
  position: absolute; left: 7%; top: 64px; width: min(62%, 440px); bottom: -20px;
  background: #242226; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5); padding: 14px 20px;
}
.window .lights { display: flex; gap: 7px; margin-bottom: 18px; }
.window .lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.window .lights i:nth-child(2) { background: #febc2e; }
.window .lights i:nth-child(3) { background: #28c840; }
.window h3 { margin: 0 0 14px; font-size: 16px; color: rgba(255, 255, 255, .92); }
.window .line { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .1); margin-bottom: 11px; }
.window .caret { display: inline-block; width: 2px; height: 14px; background: var(--link); vertical-align: -2px; animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@media (max-width: 560px) { .window { width: 76%; left: 5%; } }

/* The card, as in the app: 360pt wide, 16pt corners, the gradient with a soft light and fine grain. */
.qcard {
  position: absolute; top: 40px; right: 12px; z-index: 3;
  width: min(340px, calc(100% - 24px));
  border-radius: 16px; overflow: hidden; color: #fff;
  background: #333 center / cover no-repeat;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 0 0 .5px rgba(255, 255, 255, .22);
  transform: translateX(calc(100% + 24px)); opacity: 0;
  transition: transform .55s cubic-bezier(.2, .9, .25, 1), opacity .45s ease;
  cursor: default;
}
.qcard::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 420px at 100% 0%, rgba(255, 255, 255, .2), transparent 70%), linear-gradient(180deg, transparent, rgba(0, 0, 0, .26));
}
.qcard.is-shown { transform: none; opacity: 1; }
.qcard.is-leaving { transform: none; opacity: 0; transition: opacity .6s ease; }
@media (prefers-reduced-motion: reduce) {
  .qcard { transform: none; transition: opacity .3s ease; }
}
.qcard-body { position: relative; padding: 20px 40px 18px 20px; }
.qcard-text {
  font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.32; margin: 0 0 12px;
  transition: opacity .25s ease;
}
.qcard-text.is-medium { font-size: 17px; }
.qcard-text.is-long { font-size: 15px; }
.qcard-meta { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.qcard-byline {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: auto;
}
.qcard-actions { display: flex; gap: 6px; opacity: 0; transition: opacity .15s ease; }
.qcard:hover .qcard-actions, .qcard:focus-within .qcard-actions { opacity: 1; }
@media (hover: none) { .qcard-actions { opacity: 1; } }
.icon-btn {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; padding: 0;
  border: .5px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .13); color: #fff; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, .26); transform: scale(1.06); }
.icon-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.qcard-close { position: absolute; top: 8px; right: 8px; z-index: 1; opacity: .85; }
.qcard-timer { position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px; }
.qcard-timer i { display: block; height: 100%; width: 100%; border-radius: 1px; background: rgba(255, 255, 255, .55); transform-origin: left; }

.sparkle {
  position: absolute; z-index: 4; width: 6px; height: 6px; pointer-events: none;
  background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: sparkle .8s ease-out forwards;
}
@keyframes sparkle { from { opacity: 1; transform: translate(0, 0) scale(1.4); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4) rotate(90deg); } }

.demo-empty {
  position: absolute; top: 44px; right: 12px; z-index: 3; max-width: 260px;
  padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .5); color: var(--muted); font-size: 14px;
}

.panel {
  background: linear-gradient(180deg, #181b21, #111316);
  border: 1px solid var(--card-border); border-radius: 22px;
  padding: 18px; display: flex; flex-direction: column; gap: 16px;
}
.panel h2 { font-size: 12px; letter-spacing: .08em; color: var(--faint); margin: 0 0 8px; font-weight: 800; }
.panel h2 small { font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 12px; margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text); background: rgba(255, 255, 255, .06);
  border: 1px solid transparent; border-radius: 10px;
  padding: 7px 11px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.chip:hover { background: rgba(255, 255, 255, .1); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.chip:focus-visible, .btn:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.panel .btn { align-self: flex-start; border: 0; cursor: pointer; }
.panel-tip { font-size: 13px; color: var(--faint); margin: 0; }
kbd {
  font: inherit; font-size: 12px; padding: 1px 6px; border-radius: 5px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14);
}

/* ---------- Sections ---------- */

/* Top padding only: the side padding comes from .wrap. */
section { padding-top: 96px; }
.section-title { font-size: clamp(30px, 4vw, 44px); line-height: 1.12; margin: 0 0 10px; text-align: center; padding-bottom: .06em; }
.section-lede { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 36px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; }
.feature .icon { font-size: 26px; line-height: 1; margin-bottom: 12px; }
.feature h3 { margin: 0 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.segmented {
  display: flex; width: max-content; margin: 0 auto 26px; padding: 4px; gap: 4px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 12px;
}
.segmented button {
  font: inherit; font-size: 14px; font-weight: 700; color: var(--muted);
  background: transparent; border: 0; border-radius: 9px; padding: 7px 18px; cursor: pointer;
}
.segmented button[aria-selected="true"] { background: rgba(255, 255, 255, .12); color: var(--text); }
.segmented button:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.gallery[hidden] { display: none; }
.gallery.tall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .gallery.tall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .gallery:not(.tall) { grid-template-columns: 1fr; } }
.gallery img { border-radius: 16px; border: 1px solid var(--card-border); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); width: 100%; }

.support {
  background: linear-gradient(135deg, var(--accent-soft), rgba(255, 255, 255, .03));
  border: 1px solid var(--card-border); border-radius: 28px;
  padding: 40px 28px; text-align: center;
}
.support p { color: var(--muted); max-width: 580px; margin: 0 auto 22px; }

.sibling {
  display: flex; align-items: center; gap: 18px; max-width: 640px; margin: 0 auto;
  padding: 20px 22px; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--card-border);
  transition: background .15s ease, transform .15s ease;
}
.sibling:hover { background: rgba(255, 255, 255, .08); color: var(--text); transform: translateY(-1px); }
.sibling img { width: 64px; height: 64px; flex: none; }
.sibling strong { display: block; font-family: var(--serif); font-size: 20px; }
.sibling span { color: var(--muted); font-size: 15px; }
.sibling .arrow { margin-left: auto; font-size: 22px; color: var(--faint); }

/* ---------- Footer ---------- */

footer { margin-top: 80px; padding: 28px 0 40px; border-top: 1px solid var(--card-border); color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ---------- Text pages ---------- */

.doc { max-width: 760px; margin: 0 auto; padding: 24px 20px 0; }
.doc h1 { font-size: clamp(34px, 5vw, 50px); line-height: 1.1; margin: 10px 0 6px; padding-bottom: .06em; }
.doc .updated { color: var(--faint); margin: 0 0 28px; }
.doc h2 { font-size: 22px; margin: 34px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc ul { padding-left: 22px; }
.doc strong { color: var(--text); }
.doc .summary { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 18px 22px; }
.doc .summary p { margin: 0; color: var(--text); }

/* ---------- Contact ---------- */

.contact-form { display: grid; gap: 20px; padding: 26px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); }
.contact-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.contact-form label { display: block; color: var(--text); font-weight: 700; }
.contact-form .optional, .contact-form .field-help { color: var(--muted); font-size: 13px; font-weight: 400; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; border: 1px solid var(--card-border); border-radius: 10px;
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 16px;
  padding: 11px 13px; margin-top: 7px;
}
.contact-form input, .contact-form select { height: 49px; }
.contact-form label .field-help { display: block; margin-top: 7px; }
.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form input:focus-visible, .contact-form select:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.contact-form .btn { border: 0; cursor: pointer; justify-self: start; }
.contact-form .btn:disabled { opacity: .6; cursor: wait; }
.contact-human-check { display: grid; gap: 10px; color: var(--text); font-weight: 700; }
.contact-human-check .turnstile { min-height: 65px; }
.contact-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.contact-status { margin: -12px 0 0; min-height: 1.5em; }
.contact-status[data-kind="error"] { color: #ff9caa; }
.contact-status[data-kind="ok"] { color: #92e3b2; }
.contact-email { margin-top: 24px; }

/* The panel that replaces the form once the server answers: a card like the app's. */
.contact-result {
  display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 40px 26px 34px; border: 1px solid var(--card-border); border-radius: var(--radius);
  background: radial-gradient(70% 60% at 50% 0%, var(--accent-glow), transparent 70%), var(--card);
  animation: result-in .45s cubic-bezier(.2, .9, .3, 1.2) both;
}
.contact-form[hidden], .contact-result[hidden] { display: none; }
.contact-result:focus { outline: none; }
.contact-result[data-kind="error"] { background: radial-gradient(70% 60% at 50% 0%, rgba(255, 110, 140, .24), transparent 70%), var(--card); }
.result-card {
  position: relative; width: min(320px, 100%); margin-bottom: 18px; padding: 18px 20px; border-radius: 16px;
  text-align: left; color: #fff; background: #333 center / cover no-repeat;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .4), inset 0 0 0 .5px rgba(255, 255, 255, .22);
}
.result-card p { margin: 0 0 10px; font-family: var(--serif); font-size: 18px; line-height: 1.3; font-weight: 500; }
.result-card span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.contact-result[data-kind="ok"] .result-card { animation: result-hop .7s .25s ease-out both; }
.result-title { font-size: clamp(26px, 4vw, 34px); margin: 0; }
.contact-result .result-text { margin: 0 auto; max-width: 440px; color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.result-actions .btn { border: 0; cursor: pointer; }
@keyframes result-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes result-hop { 0%, 100% { transform: none; } 35% { transform: translateY(-10px) rotate(-1deg); } 60% { transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) {
  .contact-result, .contact-result[data-kind="ok"] .result-card { animation: none; }
}
@media (max-width: 600px) {
  .contact-form { padding: 20px; }
  .contact-form-row { grid-template-columns: 1fr; }
}

.icon-btn .i-done, .icon-btn[data-copied="true"] .i-copy { display: none; }
.icon-btn[data-copied="true"] .i-done { display: block; }
