/* Blaikafi: shared foundations for every page. Each app page layers its own look on top. */

/* ---------- Fonts (all SIL Open Font License, see /licenses) ---------- */
@font-face { font-family: "Fraunces"; src: url("../fonts/Fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/Fraunces-Italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/Figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../fonts/Caveat.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/Fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/SpaceGrotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Google Sans"; src: url("../fonts/GoogleSans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Google Sans"; src: url("../fonts/GoogleSans-500.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Google Sans"; src: url("../fonts/GoogleSans-700.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
main { overflow-x: clip; } /* reveal slides start off to the side; keep them from widening the page */
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(233, 162, 59, 0.35); }

/* Cross-page fade when moving between pages, in browsers that support it. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 260ms ease both vt-out; }
::view-transition-new(root) { animation: 420ms cubic-bezier(.2, .7, .2, 1) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

/* Opening an app from the landing page: its row grows into the app's hero (the row is named in home.js). */
[data-app-hero] { view-transition-name: app-hero; }
::view-transition-group(app-hero) { animation-duration: 700ms; animation-timing-function: cubic-bezier(.6, 0, .2, 1); }
::view-transition-old(app-hero), ::view-transition-new(app-hero) { height: 100%; object-fit: cover; overflow: clip; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .7rem 1rem; border-radius: 999px;
  background: #2b1d16; color: #fff8ee; font: 600 15px/1 "Figtree", system-ui, sans-serif; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Scroll reveals (set up by site.js; everything is visible without JavaScript) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal="left"] { transform: translateX(-36px); }
.js [data-reveal="right"] { transform: translateX(36px); }
.js [data-reveal="pop"] { transform: scale(.86) rotate(-3deg); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- App Store button (links are set in assets/js/site.js) ---------- */
.store-btn {
  --bg: #111; --fg: #fff;
  display: inline-flex; align-items: center; gap: .7rem; padding: .7rem 1.2rem .7rem 1rem; border-radius: 14px;
  background: var(--bg); color: var(--fg); text-decoration: none; line-height: 1.1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 10px 24px -12px rgba(0, 0, 0, .55);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), box-shadow .25s;
  font-family: "Figtree", system-ui, sans-serif;
}
.store-btn:hover { transform: translateY(-2px) scale(1.02); }
.store-btn:active { transform: scale(.97); }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn small { display: block; font-size: 11px; letter-spacing: .04em; opacity: .75; }
.store-btn strong { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.store-btn[data-soon] { cursor: default; }
.store-btn[data-soon]:hover { transform: none; }
.notify {
  flex-basis: 100%; display: block; width: fit-content; margin-top: .7rem; font: 600 14px/1.3 "Figtree", system-ui, sans-serif;
  color: inherit; opacity: .8; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.notify:hover { opacity: 1; }
.notify span { display: inline-block; transition: transform .25s; }
.notify:hover span { transform: translateX(3px); }

/* ---------- Legal and help pages (privacy, support) ---------- */
.doc {
  --doc-bg: #f6eee3; --doc-ink: #2b1d16; --doc-soft: #6d5a4d; --doc-accent: #a0643a; --doc-card: #fffaf2; --doc-rule: #e4d6c3;
  background: var(--doc-bg); color: var(--doc-ink);
  font: 400 17px/1.7 "Figtree", system-ui, sans-serif;
}
.doc-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem clamp(1.2rem, 5vw, 3rem); }
.doc-top a { text-decoration: none; font-weight: 600; }
.doc-back { display: inline-flex; gap: .5rem; align-items: center; padding: .55rem .95rem; border-radius: 999px; background: var(--doc-card); border: 1px solid var(--doc-rule); }
.doc-back:hover { border-color: var(--doc-accent); }
.doc-main { max-width: 760px; margin: 0 auto; padding: 2rem clamp(1.2rem, 5vw, 2rem) 6rem; }
.doc-kicker { font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--doc-accent); }
.doc h1 { font-family: var(--doc-display, "Fraunces"), Georgia, serif; font-weight: 600; font-size: clamp(2.3rem, 6vw, 3.6rem); line-height: 1.05; letter-spacing: -.02em; margin: .4rem 0 .6rem; }
.doc .doc-lede { color: var(--doc-soft); font-size: 19px; }
.doc h2 { font-family: var(--doc-display, "Fraunces"), Georgia, serif; font-weight: 600; font-size: 1.55rem; line-height: 1.2; margin: 2.6rem 0 .6rem; }
.doc h3 { font-size: 1.1rem; margin: 1.6rem 0 .3rem; }
.doc p, .doc ul, .doc ol { margin: 0 0 1rem; }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc li { margin: .3rem 0; }
.doc a { color: var(--doc-accent); text-underline-offset: 3px; }
.doc .note { background: var(--doc-card); border: 1px solid var(--doc-rule); border-radius: 18px; padding: 1.1rem 1.3rem; margin: 1.5rem 0; }
.doc .note strong { color: var(--doc-accent); }
.doc details { background: var(--doc-card); border: 1px solid var(--doc-rule); border-radius: 16px; padding: .9rem 1.2rem; margin: .7rem 0; }
.doc summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--doc-accent); transition: transform .3s; }
.doc details[open] summary::after { transform: rotate(45deg); }
.doc details > *:not(summary) { margin-top: .6rem; }
.doc-mail { display: inline-flex; align-items: center; gap: .6rem; margin-top: .5rem; padding: .9rem 1.3rem; border-radius: 999px; background: var(--doc-ink); color: var(--doc-bg) !important; text-decoration: none; font-weight: 700; }
.doc-foot { border-top: 1px dashed var(--doc-rule); margin-top: 4rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: var(--doc-soft); font-size: 15px; }
.doc-foot a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
