/* CustomFont website. Same look as the app: iOS system colors (grouped background, white cards,
   system blue), SF fonts, Settings-style grouped lists, and a translucent "glass" nav bar.
   Light and dark follow the visitor's system. No custom brand color on purpose. */

:root {
  color-scheme: light dark;
  /* iOS light palette */
  --bg: #f2f2f7;            /* systemGroupedBackground */
  --card: #ffffff;          /* secondarySystemGroupedBackground */
  --label: #000000;
  --label2: rgba(60, 60, 67, 0.6);   /* secondaryLabel */
  --sep: rgba(60, 60, 67, 0.18);     /* separator */
  --fill: rgba(120, 120, 128, 0.12); /* fill */
  --blue: #007aff;          /* systemBlue */
  --glass: rgba(242, 242, 247, 0.72);
  --bezel: #1c1c1e;
  --kbd-bg: #d1d3d9;        /* keyboard background, key, received bubble */
  --key: #ffffff;
  --recv: #e9e9eb;
  --r: 20px;
  --r-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto,
    "Helvetica Neue", system-ui, sans-serif;
  /* Styled text is Unicode "math" letters; these fonts carry them, then the system falls back. */
  --glyph: "Apple Symbols", "Cambria Math", "Noto Sans Math", "Segoe UI Symbol", var(--font);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --label: #ffffff;
    --label2: rgba(235, 235, 245, 0.6);
    --sep: rgba(84, 84, 88, 0.6);
    --fill: rgba(120, 120, 128, 0.24);
    --blue: #0a84ff;
    --glass: rgba(0, 0, 0, 0.6);
    --bezel: #2c2c2e;
    --kbd-bg: #1f1f21;
    --key: #5c5c60;
    --recv: #26252a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 17px/1.47 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
a { color: var(--blue); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-copy { position: fixed; top: 0; left: 0; opacity: 0; font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---- Nav: translucent glass bar ---- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
  padding-top: env(safe-area-inset-top);
}
.nav .wrap { display: flex; align-items: center; gap: 16px; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { margin-left: auto; display: flex; gap: 20px; }
.nav-links a { color: var(--label2); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--label); }
@media (max-width: 560px) { .nav-links .hide-sm { display: none; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border: 0; border-radius: 999px;
  font: 600 17px var(--font); text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 20px rgba(0, 122, 255, 0.28);
}
.btn-glass {
  background: var(--fill); color: var(--blue);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---- Type ---- */
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(40px, 7.4vw, 68px); line-height: 1.04; font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.1; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: 0; }
.lead { font-size: clamp(18px, 2.4vw, 21px); line-height: 1.45; color: var(--label2); margin: 20px 0 0; max-width: 36em; }
.eyebrow { color: var(--blue); font-weight: 600; font-size: 15px; margin: 0 0 12px; }
.muted { color: var(--label2); }
.glyph { font-family: var(--glyph); }

/* ---- Hero ---- */
.hero { display: grid; gap: 40px; align-items: center; padding: 44px 0 28px; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr 0.9fr; gap: 56px; padding-top: 72px; } }
.section { padding: 48px 0; }
.section-head { margin-bottom: 24px; max-width: 40em; }
.section-head p { color: var(--label2); margin: 12px 0 0; }

/* ---- Phone mock-up (pure CSS). Tap it to try the next font (site.js). ---- */
.phone {
  cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
  width: min(300px, 78vw); aspect-ratio: 9 / 18.6; margin-inline: auto; padding: 10px;
  border-radius: 46px; background: var(--bezel); position: relative;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.12) inset, 0 30px 60px rgba(0, 0, 0, 0.25);
}
.screen { height: 100%; border-radius: 36px; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.island { position: absolute; top: 10px; left: 50%; width: 86px; height: 25px; margin-left: -43px; border-radius: 14px; background: #000; z-index: 2; }
.chat { flex: 1; padding: 52px 14px 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.bubble { max-width: 84%; padding: 9px 14px; border-radius: 20px; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.bubble.in { align-self: flex-start; background: var(--recv); }
.bubble.out { align-self: flex-end; background: var(--blue); color: #fff; font-family: var(--glyph); }
.bubble.out.plain { font-family: var(--font); }
.demo-caption { text-align: center; color: var(--label2); font-size: 15px; margin: 16px 0 0; }
.kbd { background: var(--kbd-bg); padding: 6px 4px 12px; }
.strip { display: flex; gap: 6px; overflow: hidden; padding: 2px 4px 8px; }
.chip { flex: none; min-width: 34px; padding: 3px 10px; border-radius: 999px; background: var(--key); text-align: center; font: 16px var(--glyph); }
.chip.on { background: var(--blue); color: #fff; }
.krow { display: flex; justify-content: center; gap: 5px; margin-bottom: 8px; }
.key { flex: 1 1 0; max-width: 25px; height: 34px; border-radius: 5px; background: var(--key); display: grid; place-items: center; font-size: 14px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
.key.space { max-width: none; flex: 1; font-size: 12px; color: var(--label2); }

/* ---- Cards, gallery, input ---- */
.field {
  width: 100%; padding: 14px 16px; border: 0; border-radius: var(--r-sm);
  background: var(--card); color: var(--label); font: 17px var(--font);
  box-shadow: 0 0 0 0.5px var(--sep) inset;
}
.field::placeholder { color: var(--label2); }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-top: 16px; }
.card { background: var(--card); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; }
.card-head { display: flex; align-items: baseline; gap: 8px; }
.card-head .detail { font-size: 13px; color: var(--label2); }
.styled { font: 24px/1.3 var(--glyph); margin: 8px 0 14px; min-height: 1.3em; overflow-wrap: anywhere; flex: 1; }
.card .btn { align-self: flex-start; }
.demo { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08); }
.demo .field { background: var(--fill); box-shadow: none; }
.demo .cards { margin-top: 12px; grid-template-columns: 1fr; }
.demo .card { background: var(--fill); padding: 12px 14px; flex-direction: row; align-items: center; gap: 12px; }
.demo .card-head { flex-direction: column; gap: 0; min-width: 64px; }
.demo .styled { font-size: 20px; margin: 0; }
.demo .card .btn { align-self: center; }

/* ---- Settings-style grouped list ---- */
.group { background: var(--card); border-radius: var(--r); overflow: hidden; }
.row { display: flex; gap: 14px; padding: 14px 16px; align-items: flex-start; }
.row + .row { border-top: 0.5px solid var(--sep); }
.row p { margin: 2px 0 0; color: var(--label2); font-size: 15px; line-height: 1.4; }
.tile { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.tile svg { width: 20px; height: 20px; }
.t-green { background: #34c759; } .t-blue { background: #007aff; } .t-orange { background: #ff9500; } .t-indigo { background: #5856d6; }
.num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; font: 600 15px/28px var(--font); text-align: center; }
.two { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .two { grid-template-columns: 0.9fr 1.1fr; gap: 56px; } }

/* ---- FAQ ---- */
details { padding: 14px 16px; }
details + details { border-top: 0.5px solid var(--sep); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--label2); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { margin: 10px 0 0; color: var(--label2); }

/* ---- Text pages (privacy) ---- */
.prose { max-width: 680px; padding: 48px 0 24px; }
.prose .updated { color: var(--label2); font-size: 15px; margin-top: 8px; }
.prose h1 { font-size: clamp(34px, 6vw, 48px); }
.prose h2 { font-size: 24px; margin-top: 36px; }
.prose p, .prose li { color: var(--label2); }
.prose p strong, .prose li strong { color: var(--label); }
.prose ul { padding-left: 22px; }

/* ---- Footer ---- */
.foot { padding: 32px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--label2); font-size: 14px; border-top: 0.5px solid var(--sep); margin-top: 32px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: inherit; }

/* ---- Utilities ---- */
.center { text-align: center; }
.actions.center { justify-content: center; }
.made-by img { display: inline-block; vertical-align: -4px; margin-right: 6px; border-radius: 4px; }
.section-head.center { margin-inline: auto; text-align: center; }
