/* The landing page at kaimon.pattalium.com: what Kaimon is, a demo, a few more looks, pricing, and making an account.
   Light Pearl paper or a dark ink page (the system's choice until the toggle is used), Unbounded for headings and
   JetBrains Mono for the rest. */
@font-face { font-family: "Unbounded"; font-weight: 200 900; src: url(fonts/unbounded-latin.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; src: url(fonts/jetbrains-mono-regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; src: url(fonts/jetbrains-mono-bold.ttf) format("truetype"); font-display: swap; }

:root {
  --paper: #ECE9F2; --sheet: #F8F6FB; --ink: #07060B; --ink2: #47425A; --muted: #5E5970; --line: rgba(7, 6, 11, .12); --pink: #FF2E88;
  --btn: #07060B; --btn-ink: #ECE9F2; --btn-hover: #2A2535; --field: #FFFFFF; --paid: #07060B; --shadow: rgba(7, 6, 11, .45);
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A0910; --sheet: #15121D; --ink: #F6F4FA; --ink2: #BAB5CA; --muted: #9C96B0; --line: rgba(246, 244, 250, .12);
    --btn: #FF2E88; --btn-ink: #07060B; --btn-hover: #FF5AA0; --field: #0F0D16; --paid: #1E1428; --shadow: rgba(0, 0, 0, .7); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0A0910; --sheet: #15121D; --ink: #F6F4FA; --ink2: #BAB5CA; --muted: #9C96B0; --line: rgba(246, 244, 250, .12);
  --btn: #FF2E88; --btn-ink: #07060B; --btn-hover: #FF5AA0; --field: #0F0D16; --paid: #1E1428; --shadow: rgba(0, 0, 0, .7); color-scheme: dark;
}
/* Each logo for its own ground. */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--mono); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.logo { height: 32px; width: auto; }
.actions { display: flex; align-items: center; gap: 20px; }
.signin { font-size: 14px; text-decoration: none; color: var(--ink2); padding: 12px 0; }
.signin:hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 10px; background: var(--btn);
  color: var(--btn-ink); font: 700 15px/1 var(--mono); text-decoration: none; border: 0; cursor: pointer; transition: background-color .15s, color .15s; }
.btn:hover { background: var(--btn-hover); color: var(--btn-ink); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 14px; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.mode { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--ink2); cursor: pointer; }
.mode:hover { color: var(--ink); background: var(--sheet); }
.mode .sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mode .sun { display: block; } :root:not([data-theme="light"]) .mode .moon { display: none; } }
:root[data-theme="dark"] .mode .sun { display: block; }
:root[data-theme="dark"] .mode .moon { display: none; }

.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center;
  padding-top: clamp(16px, 4vw, 48px); padding-bottom: clamp(56px, 8vw, 104px); }
h1 { font-size: clamp(36px, 4.8vw, 66px); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; }
.lede { font-size: clamp(16px, 1.35vw, 18px); color: var(--ink2); max-width: 34em; margin-top: 24px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 34px; }
.cta span { font-size: 14px; color: var(--muted); }
.cta span a { color: var(--ink); }
.demo { margin: 0; justify-self: center; width: min(100%, 400px); }
.frame { position: relative; border-radius: 16px; overflow: hidden; background: #07060B; aspect-ratio: 9 / 16; box-shadow: 0 30px 60px -30px var(--shadow); }
.frame video { width: 100%; height: 100%; object-fit: cover; }
.sound { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0;
  border-radius: 10px; background: rgba(7, 6, 11, .74); color: #F6F4FA; font: 700 13px/1 var(--mono); cursor: pointer; }
.sound:hover { background: rgba(7, 6, 11, .9); }
.sound:focus-visible { outline-color: #F6F4FA; }
.sound .waves { display: none; }
.sound[data-on="true"] .waves { display: inline; }
.sound[data-on="true"] .cross { display: none; }
.demo figcaption { font-size: 12px; color: var(--muted); margin-top: 12px; text-align: center; }

h2 { font-size: clamp(26px, 3vw, 40px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.looks { padding-bottom: clamp(56px, 8vw, 104px); }
.clips { display: flex; gap: 18px; margin-top: 28px; }
/* Each clip's share of the row follows its shape, so all three come out the same height. */
.clips figure { margin: 0; min-width: 0; flex: var(--grow) 1 0; }
.clips video { width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; border-radius: 12px; background: #07060B; }
.clips figcaption { font-size: 13px; color: var(--ink2); margin-top: 10px; }

.pricing { padding-bottom: clamp(48px, 7vw, 88px); }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; margin-top: 28px; }
.tier { background: var(--sheet); border-radius: 14px; padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.tier h3 { font-size: 18px; font-weight: 700; }
.price { font: 800 clamp(24px, 2.2vw, 30px)/1.2 var(--display); letter-spacing: -.02em; }
.who { font-size: 13px; color: var(--muted); }
.tier ul { list-style: none; margin: 10px 0 20px; padding: 0; display: grid; gap: 8px; font-size: 15px; color: var(--ink2); }
.tier .btn { margin-top: auto; align-self: flex-start; }
.tier.paid { background: var(--paid); color: #F6F4FA; }
.tier.paid .who, .tier.paid ul { color: #CFCADB; }
.tier.paid .btn { background: var(--pink); color: var(--ink); }
.tier.paid .btn:hover { background: #FF5AA0; }
.note { font-size: 14px; color: var(--muted); margin-top: 16px; }
.note:empty { display: none; }

.creators { padding-bottom: clamp(48px, 7vw, 88px); }
.creators p { font-size: 15px; color: var(--ink2); max-width: 46em; }
.mail { color: var(--ink); user-select: all; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); }
.foot nav { display: flex; gap: 20px; font-size: 13px; }
.foot a { color: var(--ink2); text-decoration: none; padding: 10px 0; }
.foot a:hover { color: var(--ink); }

/* The account dialog. */
.acct { width: min(100% - 32px, 440px); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 16px; background: var(--sheet); color: var(--ink);
  box-shadow: 0 40px 80px -30px var(--shadow); }
.acct::backdrop { background: rgba(7, 6, 11, .55); }
.acct-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 8px 24px; }
.acct-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.acct-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--ink2); cursor: pointer; }
.acct-close:hover { background: var(--paper); color: var(--ink); }
.acct-tabs { display: flex; gap: 6px; padding: 4px 24px 0; }
.acct-tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--ink2); font: 700 14px/1 var(--mono); cursor: pointer; }
.acct-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.acct-note { margin: 12px 24px 0; font-size: 14px; color: var(--ink2); }
.acct-note:empty { display: none; }
.acct-note.warn { color: #C2105E; }
:root[data-theme="dark"] .acct-note.warn { color: #FF7AB3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .acct-note.warn { color: #FF7AB3; } }
#acctBody { display: grid; gap: 14px; padding: 16px 24px 24px; }
.acct-form { display: grid; gap: 14px; }
.acct-field { display: grid; gap: 6px; }
.acct-field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.acct-field input { min-height: 48px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--field); color: var(--ink); font: 400 16px/1 var(--mono); padding: 0 14px; }
.acct-field input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }
.acct-hint, .acct-small, .acct-check { font-size: 12px; color: var(--muted); }
.acct-text { font-size: 14px; color: var(--ink2); }
.acct-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.acct-link { justify-self: start; border: 0; background: none; padding: 10px 0; color: var(--ink2); font: 400 13px/1 var(--mono); text-decoration: underline; cursor: pointer; }
.acct-or { text-align: center; font-size: 12px; color: var(--muted); }
.acct-pattalium { width: 100%; }
.acct-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 0; padding: 14px 18px; list-style: none; border-radius: 12px;
  background: var(--paper); font: 700 15px/1.6 var(--mono); letter-spacing: .04em; }
.acct-row { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .demo { width: min(100%, 360px); }
}
@media (max-width: 720px) {
  /* On a phone the clips sit in a row you swipe through, all 300px tall. */
  .clips { overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding-bottom: 6px; margin-right: calc(-1 * max(20px, env(safe-area-inset-right, 0px))); }
  .clips figure { flex: none; scroll-snap-align: start; }
  .clips video { height: 300px; width: auto; }
}
@media (max-width: 420px) { .signin { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
