/* Omapresent — omapresent.com
   Type: iA Writer Quattro S + iA Writer Mono S (SIL OFL), the same family the app uses.
   Colour: one accent (gold #C9A227, from the app icon and the gold-rush theme). Dark, locked.
   Shape rule: panels, cards and media = 12px. Controls (buttons, keycaps, tags) = 8px. */

@font-face {
  font-family: "iA Writer Quattro S";
  src: url("/fonts/iAWriterQuattroS-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "iA Writer Quattro S";
  src: url("/fonts/iAWriterQuattroS-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "iA Writer Quattro S";
  src: url("/fonts/iAWriterQuattroS-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "iA Writer Mono S";
  src: url("/fonts/iAWriterMonoS-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "iA Writer Mono S";
  src: url("/fonts/iAWriterMonoS-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg:        #0d0d0d;
  --bg-alt:    #121212;
  --surface:   #171717;
  --surface-2: #1d1d1d;
  --line:      #262626;
  --line-2:    #343434;
  --text:      #e9e5df;
  --text-dim:  #b9b1a7;
  --muted:     #8f8880;
  --gold:      #c9a227;
  --gold-lift: #e2b83c;
  --gold-soft: rgba(201, 162, 39, 0.12);

  --sans: "iA Writer Quattro S", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "iA Writer Mono S", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-panel: 12px;
  --r-ctrl: 8px;
  --wrap: 1180px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--gold-lift); text-decoration: none; border-bottom: 1px solid rgba(226,184,60,.35); }
a:hover { border-bottom-color: var(--gold-lift); }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 .6em; }
h1 { font-size: clamp(2.05rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; line-height: 1.3; }
p  { margin: 0 0 1.1em; }

code, pre, kbd { font-family: var(--mono); }
code { font-size: .88em; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: .08em .35em; white-space: nowrap; }

kbd {
  font-family: var(--mono); font-size: .78em; font-weight: 700;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 6px; padding: .15em .45em; white-space: nowrap;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--gold); color: #14100a; padding: .6rem 1rem; border: 0; border-radius: var(--r-ctrl);
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(13,13,13,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(4px)) { .nav { background: var(--bg); } }

.nav__in { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); border: 0; letter-spacing: -0.01em; }
.brand img { border-radius: 6px; }
.nav__links { display: flex; gap: 22px; margin-left: auto; font-size: .92rem; }
.nav__links a { color: var(--muted); border: 0; }
.nav__links a:hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap;
  background: var(--gold); color: #14100a;
  font-weight: 700; font-size: .97rem;
  padding: .72rem 1.35rem; border: 1px solid var(--gold); border-radius: var(--r-ctrl);
  transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: var(--gold-lift); border-color: var(--gold-lift); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--surface); border-color: var(--muted); }
.btn--sm { padding: .48rem 1rem; font-size: .9rem; }

:focus-visible { outline: 2px solid var(--gold-lift); outline-offset: 3px; }

.eyebrow {
  font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .16em; color: var(--gold); margin: 0 0 1.1rem;
}

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero .wrap { max-width: 1320px; }
.hero__in { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .45em; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-dim); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }

.hero__shot img,
.duo img, .themes img {
  border: 1px solid var(--line); border-radius: var(--r-panel);
  background: var(--surface);
}
.hero__shot { margin: 0; }
figcaption { color: var(--muted); font-size: .85rem; margin-top: .7rem; }
figure { margin: 0; }

section[id] { scroll-margin-top: 84px; }

/* ---------- bands ---------- */
.band { padding: clamp(56px, 8vw, 100px) 0; border-top: 1px solid var(--line); }
.band--alt { background: var(--bg-alt); }
.section-h { margin-bottom: 2rem; }
.lead-block { max-width: 62ch; margin-bottom: clamp(32px, 4vw, 52px); }
.lead-block p { color: var(--text-dim); }

.story { text-align: left; }
.story h2 { margin-bottom: .8em; }
.story p { color: var(--text-dim); font-size: 1.06rem; }
.story strong { color: var(--text); }

/* ---------- two windows ---------- */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.duo > figure { min-width: 0; }
.duo strong { color: var(--text); }
.duo__note { color: var(--muted); max-width: 68ch; margin: 2rem 0 0; font-size: .95rem; }

.keys {
  list-style: none; margin: 2.4rem 0 0; padding: 1.4rem 0 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 24px;
}
.keys li { display: flex; align-items: baseline; gap: 8px; font-size: .88rem; color: var(--muted); }
.keys span { min-width: 0; }

/* ---------- shrink-to-fit demo ---------- */
.demo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.demo__pane { min-width: 0; }
.demo__label {
  font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin: 0 0 .7rem;
}
.demo__label--on { color: var(--gold); }
.demo__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0a0a0a;
  border: 1px solid var(--line-2);
  border-radius: var(--r-panel);
  overflow: hidden;
}
.demo__frame--squish { display: grid; place-items: center; padding: 18px; }
.demo__caption { color: var(--muted); font-size: .85rem; margin: .8rem 0 0; }

.squish { width: 100%; font-size: 5.2px; line-height: 1.25; color: #cfcac2; }
.squish h3 { font-size: 9px; margin: 0 0 4px; text-align: center; letter-spacing: 0; }
.squish table { width: 100%; border-collapse: collapse; }
.squish th, .squish td { border: 1px solid #2e2e2e; padding: 2px 3px; text-align: left; }
.squish th { color: #8c7a3a; }

.slide {
  height: 100%; overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 30px 52px;
  scrollbar-color: var(--gold) #1a1a1a; scrollbar-width: thin;
}
.slide::-webkit-scrollbar { width: 8px; }
.slide::-webkit-scrollbar-track { background: #141414; }
.slide::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
.slide h3 { font-size: clamp(1.2rem, 2.1vw, 1.75rem); margin: 0 0 1rem; }
.slide table { width: 100%; border-collapse: collapse; font-size: clamp(.82rem, 1.15vw, 1rem); }
.slide th, .slide td { border: 1px solid #2f2a1c; padding: .6em .7em; text-align: left; vertical-align: top; }
.slide th { color: var(--gold); font-weight: 700; }
.slide td { color: var(--text-dim); }

.demo__frame::after {
  content: ""; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 58px;
  background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,.96) 72%);
  pointer-events: none; border-radius: 0 0 var(--r-panel) var(--r-panel);
}
.demo__frame--squish::after { display: none; }
.demo__hint { color: var(--muted); text-transform: none; letter-spacing: .06em; }

/* ---------- recall ---------- */
.recall { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(28px, 4vw, 52px); align-items: start; }

.recall__screen {
  position: relative; border: 1px solid var(--line-2); border-radius: var(--r-panel);
  overflow: hidden; background: #0a0a0a;
}
.recall__base { transition: opacity .22s ease, filter .22s ease; }
.recall__overlay {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transform: scale(.985);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.recall__overlay img { width: 100%; height: 100%; object-fit: cover; }
.recall__screen[data-open="true"] .recall__base { opacity: .28; filter: blur(1.5px); }
.recall__screen[data-open="true"] .recall__overlay { opacity: 1; visibility: visible; transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .recall__base, .recall__overlay { transition: none; }
}

.recall__bar { display: flex; align-items: center; gap: 14px; margin-top: 1rem; }
.recall__bar p { margin: 0; color: var(--muted); font-size: .88rem; }
.keycap {
  font-family: var(--mono); font-weight: 700; font-size: 1rem;
  width: 46px; height: 46px; flex: none;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line-2); border-bottom-width: 3px;
  border-radius: var(--r-ctrl); cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .08s ease;
}
.keycap:hover { background: #242424; }
.keycap:active { transform: translateY(1px); border-bottom-width: 2px; }
.keycap[aria-pressed="true"] { background: var(--gold); color: #14100a; border-color: var(--gold); }

.recall__copy { min-width: 0; }
.recall__copy p { color: var(--text-dim); }
.credit { color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1.6rem; }

/* ---------- code blocks ---------- */
.code {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: 18px 20px; margin: 0 0 1.2rem;
  overflow-x: auto; font-size: .86rem; line-height: 1.7; color: var(--text-dim);
}
.code code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; white-space: pre; }
.code--tight { margin-bottom: 1.6rem; }
.code--wrap code { white-space: pre-wrap; overflow-wrap: anywhere; }
.c-dim { color: var(--muted); }
.c-key { color: var(--gold); font-weight: 700; }

/* ---------- themes ---------- */
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.themes figcaption { font-family: var(--mono); font-size: .78rem; color: var(--gold); letter-spacing: .04em; }

.split-note {
  margin-top: clamp(32px, 4vw, 48px); padding-top: clamp(28px, 3vw, 36px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px;
  color: var(--text-dim);
}
.split-note p:last-child { margin-bottom: 0; }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cell {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: 26px 26px 24px;
}
.cell h3 { color: var(--text); }
.cell p { color: var(--muted); font-size: .95rem; margin: 0; }
.cell--wide { grid-column: span 2; }
/* The QR cell sits in the middle of the grid and is the one cell that carries
   the accent, because the feature is the one people want to look at. */
.cell--qr {
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(201,162,39,.17) 0%, rgba(201,162,39,0) 62%),
    var(--surface);
  border-color: #3a3117;
  text-align: center;
}
.cell--qr img {
  width: 148px; height: auto; margin: 2px auto 20px;
  border-radius: var(--r-ctrl);
  box-shadow: 0 10px 26px rgba(0,0,0,.5);
}
.cell--qr p { text-align: left; }
.cell--qr h3 { text-align: left; }

.cell--full { grid-column: 1 / -1; }

/* ---------- install ---------- */
.install { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.install__col { min-width: 0; }
.install h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.install p { color: var(--text-dim); }
.tag {
  font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--gold); background: var(--gold-soft);
  border: 1px solid #3a3117; border-radius: var(--r-ctrl); padding: .18rem .5rem;
}
.fine { color: var(--muted); font-size: .86rem; }
.install__after {
  margin-top: clamp(32px, 4vw, 44px); padding-top: clamp(28px, 3vw, 36px);
  border-top: 1px solid var(--line); max-width: 74ch;
}
.install__after p { color: var(--text-dim); }

/* ---------- about + footer ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.about__copy { max-width: 62ch; }
#about p { color: var(--text-dim); }
.facts {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: 8px 24px 12px;
}
.facts dl { margin: 0; }
.facts div { display: flex; gap: 16px; justify-content: space-between; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); flex: none; }
.facts dd { margin: 0; font-size: .88rem; text-align: right; color: var(--text-dim); min-width: 0; overflow-wrap: anywhere; }
#about strong { color: var(--text); }
.closing { margin-top: 2rem; }

.foot { border-top: 1px solid var(--line); padding: 34px 0 46px; background: var(--bg-alt); }
.foot__in { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot p { margin: 0; color: var(--muted); font-size: .88rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.foot img { border-radius: 5px; }
.foot a { color: var(--text-dim); border-bottom-color: var(--line-2); }
.foot a:hover { color: var(--gold-lift); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero__in { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .lede { max-width: 60ch; }
  .recall { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell--wide { grid-column: span 2; }
  .keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__in { gap: 12px; }
  .btn--sm { margin-left: auto; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .duo, .demo, .themes, .install, .split-note { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .cell--wide { grid-column: span 1; }
  .demo__frame { aspect-ratio: 4 / 3; }
  .foot__in { flex-direction: column; }
}
