/* Nails Keyboard — nailskeyboard.com
   One stylesheet for every page. No fonts, scripts or trackers are loaded
   from anywhere else: the site makes the same promise the app does. */

:root {
  --bg: #fff8f4;
  --surface: #ffffff;
  --ink: #2b1220;
  --muted: #6b5460;
  --line: rgba(43, 18, 32, 0.13);
  --accent: #c2255c;          /* text and links */
  --accent-fill: #d6336b;     /* the app's raspberry */
  --accent-soft: #fce4ec;
  --sky: #99c9f2;             /* the keyboard in the hero */
  --sky-soft: #e6f2fc;
  --deep: #2b1220;            /* the dark band */
  --on-deep: #fdf1f5;
  --on-deep-muted: #d8bfca;
  --radius: 22px;
  --display: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #170b11;
    --surface: #23131b;
    --ink: #fbeff3;
    --muted: #c7adb8;
    --line: rgba(251, 239, 243, 0.16);
    --accent: #ff7ba6;
    --accent-fill: #e04377;
    --accent-soft: #3a1826;
    --sky-soft: #15283a;
    --deep: #0f060a;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 7.2vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.005em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: min(100% - 40px, 1120px); margin-inline: auto; }
.narrow { width: min(100% - 40px, 720px); margin-inline: auto; }

.eyebrow {
  font: 600 0.8rem/1.45 var(--text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 34rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  padding: 12px 0;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
/* (Anchors stop below it.) */
section[id], h2[id] { scroll-margin-top: 76px; }
.site-header .wrap { display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.05rem/1 var(--text); letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 0.97rem; }
.site-nav a:hover { color: var(--accent); }
.site-nav .nav-link { display: none; }
@media (min-width: 860px) { .site-nav .nav-link { display: inline; } }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--accent-fill); color: #fff !important;
  font: 600 1rem/1 var(--text); text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 22px -10px rgba(194, 37, 92, 0.75);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(194, 37, 92, 0.85); }
.button.small { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }
@media (max-width: 380px) { .site-header .wrap { gap: 10px; } .button.small { padding: 0 13px; } }
.button.ghost { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 1.5px var(--line); }
.button.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

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

.hero { padding: clamp(24px, 5vw, 56px) 0 clamp(48px, 8vw, 96px); }
.hero .wrap { display: grid; gap: clamp(32px, 6vw, 64px); align-items: center; }
@media (min-width: 940px) { .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); } }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { margin-top: 22px; }
.hero .actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 480px) { .hero .actions .button { flex: 1 1 100%; } }
.hero .note { margin-top: 16px; font-size: 0.95rem; color: var(--muted); max-width: 30rem; }

.stage {
  position: relative;
  border-radius: 34px;
  padding: clamp(18px, 3.4vw, 30px) clamp(12px, 2.6vw, 24px) clamp(12px, 2.6vw, 24px);
  background: var(--sky-soft);
  background: linear-gradient(180deg, var(--sky-soft) 0%, color-mix(in srgb, var(--sky) 62%, var(--bg)) 100%);
}
.field {
  background: var(--surface);
  border-radius: 20px;
  padding: 16px 20px;
  min-height: 92px;
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  box-shadow: 0 1px 0 var(--line);
}
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 2px; vertical-align: -0.2em; background: var(--accent-fill); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.kb { position: relative; margin-top: clamp(14px, 2.6vw, 22px); filter: drop-shadow(0 22px 28px rgba(31, 66, 105, 0.28)); }
.kb img { width: 100%; }
.kb svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* The three taps: land low, then counted on the key that was meant. */
.tap { --off: 17; }
.tap .land, .tap .ripple, .tap .trail, .tap .aim, .tap .glow { opacity: 0; animation-duration: 7.5s; animation-iteration-count: infinite; animation-timing-function: ease-out; animation-fill-mode: both; }
.tap .land   { animation-name: land; }
.tap .ripple { animation-name: ripple; transform-box: fill-box; transform-origin: center; }
.tap .trail  { animation-name: trail; }
.tap .aim    { animation-name: aim; }
.tap .glow   { animation-name: glow; }
.tap.b * { animation-delay: 2.5s; }
.tap.c * { animation-delay: 5s; }

@keyframes land   { 0% { opacity: 0; } 2%, 26% { opacity: 1; } 31%, 100% { opacity: 0; } }
@keyframes ripple { 0% { opacity: 0; transform: scale(0.4); } 2% { opacity: 0.7; } 11% { opacity: 0; transform: scale(2.6); } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes trail  { 0%, 8% { opacity: 0; } 14%, 26% { opacity: 0.9; } 31%, 100% { opacity: 0; } }
@keyframes aim    { 0%, 7% { opacity: 0; transform: translateY(0); } 9% { opacity: 1; transform: translateY(0); } 17%, 26% { opacity: 1; transform: translateY(calc(var(--off) * -1px)); } 31%, 100% { opacity: 0; transform: translateY(calc(var(--off) * -1px)); } }
@keyframes glow   { 0%, 16% { opacity: 0; } 19% { opacity: 0.55; } 27%, 100% { opacity: 0; } }

.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; padding: 0 6px; font-size: 0.92rem; color: var(--ink); }
.legend span { display: inline-flex; align-items: center; gap: 9px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
.legend .dot { background: var(--accent-fill); }
.legend .ring { background: #fff; box-shadow: 0 0 0 3px var(--accent-fill) inset, 0 0 0 1px rgba(0, 0, 0, 0.12); }

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

section { padding: clamp(56px, 9vw, 112px) 0; }
.section-head { max-width: 44rem; }
.section-head h2 { margin-top: 14px; }
.section-head p:not(.eyebrow) { margin-top: 18px; color: var(--muted); font-size: 1.12rem; }

.problem { padding: 0 0 clamp(40px, 7vw, 80px); }
.problem ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.problem li { padding: 22px 0; border-bottom: 1px solid var(--line); font-family: var(--display); font-size: clamp(1.25rem, 3vw, 1.7rem); line-height: 1.2; }
@media (min-width: 800px) {
  .problem ul { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .problem li { border-bottom: 0; padding: 30px 28px 30px 0; }
  .problem li + li { padding-left: 28px; border-left: 1px solid var(--line); }
}

.how .wrap { display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; }
@media (min-width: 900px) { .how .wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.steps { list-style: none; margin: 34px 0 0; padding: 0; counter-reset: step; display: grid; gap: 28px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; gap: 6px 18px; }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 1.35rem/1 var(--display);
  color: var(--accent); background: var(--accent-soft);
}
.steps p { color: var(--muted); }
.fineprint { margin-top: 30px; padding: 18px 22px; border-left: 3px solid var(--accent-fill); background: var(--accent-soft); border-radius: 0 14px 14px 0; font-size: 1rem; }

.phone { justify-self: center; width: min(100%, 320px); }
.phone .frame { border-radius: 46px; padding: 9px; background: #17131a; box-shadow: 0 30px 50px -24px rgba(43, 18, 32, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) inset; }
.phone img { border-radius: 38px; width: 100%; }
.phone figcaption, .themes figcaption { margin-top: 14px; font-size: 0.93rem; color: var(--muted); text-align: center; }
figure { margin: 0; }

.features { background: var(--surface); }
.feature-list { margin-top: 44px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.feature { padding: 30px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px 40px; }
@media (min-width: 820px) { .feature { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; } }
.feature p { color: var(--muted); }
.feature p + p { margin-top: 10px; }
.fix { display: inline-flex; align-items: center; gap: 8px; margin: 12px 10px 0 0; padding: 7px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font: 500 0.93rem/1 var(--mono); color: var(--ink); white-space: nowrap; }
.fix b { color: var(--accent); font-weight: 600; }
.beta { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 600 0.72rem/1.5 var(--text); letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 0.12em; }

.themes .grid { margin-top: 44px; display: grid; gap: 30px 26px; }
@media (min-width: 700px) { .themes .grid { grid-template-columns: repeat(2, 1fr); } }
.themes figure img { width: 100%; filter: drop-shadow(0 16px 22px rgba(43, 18, 32, 0.2)); }
.themes figcaption b { color: var(--ink); font-weight: 600; }
.swatches { display: flex; gap: 10px; margin-top: 26px; align-items: flex-end; }
.swatches i { display: block; width: 26px; height: 40px; border-radius: 13px 13px 9px 9px / 22px 22px 9px 9px; box-shadow: 0 0 0 1px var(--line), inset 0 6px 8px -4px rgba(255, 255, 255, 0.55); }

.plan-grid { margin-top: 44px; display: grid; gap: 22px; }
@media (min-width: 780px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
.plan { border-radius: var(--radius); padding: clamp(24px, 4vw, 36px); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.plan.pro { background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--accent-fill); }
.plan h3 { font-size: 1.7rem; }
.plan-sub { margin-top: 6px; color: var(--accent); font-weight: 600; font-size: 0.97rem; }
.plan ul { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.plan li { position: relative; padding-left: 30px; }
.plan li::before {
  content: ""; position: absolute; left: 4px; top: 0.36em;
  width: 13px; height: 7px;
  border-left: 2.5px solid var(--accent-fill); border-bottom: 2.5px solid var(--accent-fill);
  transform: rotate(-45deg);
}
.plan-note { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.97rem; }

.privacy { background: var(--deep); color: var(--on-deep); }
.privacy .eyebrow { color: #ff8fb4; }
.privacy .section-head p:not(.eyebrow) { color: var(--on-deep-muted); }
.privacy dl { margin: 44px 0 0; display: grid; gap: 0; border-top: 1px solid rgba(253, 241, 245, 0.18); }
.privacy dl > div { padding: 24px 0; border-bottom: 1px solid rgba(253, 241, 245, 0.18); }
@media (min-width: 780px) {
  .privacy dl { grid-template-columns: repeat(2, 1fr); column-gap: 56px; }
}
.privacy dt { font: 700 1.2rem/1.25 var(--display); }
.privacy dd { margin: 8px 0 0; color: var(--on-deep-muted); }
.privacy a { color: #ff9dbd; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); margin-top: 36px; }
.faq summary { cursor: pointer; list-style: none; padding: 22px 44px 22px 0; position: relative; font: 700 1.15rem/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 400 1.7rem/1 var(--text); color: var(--accent); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 44px 24px 0; color: var(--muted); }

.cta { text-align: center; padding-top: 0; }
.cta .card { border-radius: 34px; padding: clamp(40px, 7vw, 76px) 24px; background: var(--accent-soft); }
.cta p { margin: 18px auto 30px; color: var(--muted); max-width: 32rem; font-size: 1.12rem; }
.cta .note { margin: 18px auto 0; font-size: 0.95rem; }
.start { list-style: none; counter-reset: start; margin: 26px auto 30px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; color: var(--ink); }
.start li { counter-increment: start; display: inline-flex; align-items: center; gap: 10px; }
.start li::before {
  content: counter(start);
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font: 700 0.95rem/1 var(--display);
  color: var(--accent); background: var(--surface);
}

.site-footer { padding: 34px 0 44px; border-top: 1px solid var(--line); font-size: 0.93rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); }
.site-footer .legal { flex-basis: 100%; font-size: 0.85rem; }

/* ---------- Text pages (privacy, support) ---------- */

.doc { padding: clamp(28px, 6vw, 64px) 0 clamp(56px, 9vw, 96px); }
.doc h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); }
.doc .updated { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }
.doc h2 { font-size: 1.55rem; margin-top: 44px; }
.doc p, .doc ul, .doc ol { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: 8px; }
.doc .lead { font-size: 1.2rem; margin-top: 22px; }

/* Help & FAQ (support.html): groups of questions, with links to each group. */
.help-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.help-nav a { padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 0.95rem; text-decoration: none; }
.help-nav a:hover { border-color: var(--accent); color: var(--accent); }
.help h2 { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--line); color: var(--accent); }
.help h3 { margin-top: 30px; font: 700 1.15rem/1.3 var(--display); }
.help h3 + p, .help h3 + ol { margin-top: 8px; }
.help p, .help li { color: var(--muted); }
.help .lead { color: var(--ink); }
.faq .more { margin-top: 26px; }

code { font: 500 0.92em/1.3 var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); overflow-wrap: anywhere; }

/* ---------- Word lists ---------- */

.lists { width: 100%; margin-top: 40px; border-collapse: collapse; font-size: 0.97rem; }
.lists th, .lists td { text-align: left; vertical-align: top; padding: 16px 18px 16px 0; border-bottom: 1px solid var(--line); }
.lists thead th { font: 600 0.78rem/1.4 var(--text); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; }
.lists tbody th { font: 700 1.08rem/1.3 var(--display); white-space: nowrap; }
.lists td:nth-child(2), .lists td:nth-child(4) { white-space: nowrap; }
.lists td:nth-child(2) a { font: 600 0.95rem/1.3 var(--mono); }
.lists td:nth-child(3) { color: var(--muted); overflow-wrap: anywhere; }
.lists .meta { display: block; margin-top: 4px; color: var(--muted); font-size: 0.88rem; }
/* On a phone each list is a block of its own. */
@media (max-width: 760px) {
  .lists thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .lists, .lists tbody, .lists tr, .lists th, .lists td { display: block; }
  .lists tr { padding: 20px 0; border-bottom: 1px solid var(--line); }
  .lists tbody tr:first-child { border-top: 1px solid var(--line); }
  .lists th, .lists td { padding: 0; border: 0; }
  .lists td { margin-top: 8px; }
  .lists tbody th { font-size: 1.25rem; }
}

/* ---------- Typing guides (uses/, written by Tools/make-site-uses.py) ---------- */

.crumbs { margin-bottom: 22px; font-size: 0.9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.use { padding-bottom: 0; }
.use h1 { margin-top: 14px; }
.use .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 480px) { .use .actions .button { flex: 1 1 100%; } }
.use h3 { margin-top: 28px; font: 700 1.15rem/1.3 var(--display); }
.use h3 + p { margin-top: 8px; }
.use .fix { background: var(--surface); }
.use .narrow > figure { margin-top: 36px; }
.use .narrow > figure img { width: min(100%, 460px); margin-inline: auto; filter: drop-shadow(0 16px 22px rgba(43, 18, 32, 0.2)); }
.use .narrow > figure figcaption { margin-top: 12px; font-size: 0.93rem; color: var(--muted); text-align: center; }
.use .themes .grid { margin-top: 28px; }
.use-faq { padding: 52px 0 0; }
.use-faq h2, .more-uses h2 { font-size: 1.55rem; }
.use-faq details:first-of-type { margin-top: 22px; }
.use-faq details a { color: var(--accent); }
.more-uses { padding: 52px 0 clamp(56px, 9vw, 96px); }
.more-uses .more, .guides .more { margin-top: 22px; }
.uses-index { padding-bottom: clamp(56px, 9vw, 96px); }
.guides { padding-top: 0; }

/* A guide as a card: its title, and a line about it. */
ul.use-links { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { ul.use-links { grid-template-columns: repeat(2, 1fr); } }
ul.use-links li + li { margin-top: 0; }
.use-links a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; font: 700 1.05rem/1.3 var(--display); }
.use-links a span { display: block; margin-top: 6px; font: 400 0.93rem/1.45 var(--text); color: var(--muted); }
.use-links a:hover { border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  .button { transition: none; }
  .tap * { animation: none !important; }
  .tap.b .land, .tap.b .trail { opacity: 1; }
  .tap.b .aim { opacity: 1; transform: translateY(calc(var(--off) * -1px)); }
}
