/*
 * Shared design tokens and chrome for www.cryphone.com.
 *
 * ## Why this file exists rather than the styles being inline everywhere
 *
 * The landing page shipped with its styles inline, and its look is the brand. The
 * store-required pages (privacy, terms, support, deletion) have to look like they belong
 * to the same product, because a legal page in stock Times New Roman reads as an
 * afterthought and, to a store reviewer, as a page that might not be maintained.
 *
 * So the tokens and the shared chrome — header, footer, buttons, prose — live here, and
 * page-specific layout stays with its page. The landing page's own inline styles are
 * untouched; this file only adds what the other pages need.
 *
 * ## A token change here reaches five pages
 *
 * privacy, terms, support, delete-data and premium all load this file and nothing else.
 * That is the point — one edit restyles the whole site — and it is also the risk: there is
 * no build step and no test, so the only way to know a change landed correctly on all five
 * is to open all five. Do that.
 *
 * ## The radius is 28px in three places
 *
 * Here, in `AppTheme.radius`, and in the app's own cards. They are the same number on
 * purpose: someone who downloads the app after reading this page should not feel they
 * have moved to a different product. If one changes, all three change.
 */

:root {
  /* ## The five brand colours
   *
   * These are the whole palette. Anything not derived from one of them does not belong on
   * this site — restraint is the point, and a sixth colour is how a premium page starts
   * looking like a dashboard.
   */
  --primary: #2D173F;   /* deep plum: the dark ground, the icon field, headings on light */
  --accent: #FF4F8B;    /* the one accent. Used sparingly and never decoratively */
  --bg: #FAF7FC;        /* the page */
  --ink: #22162E;       /* body text */
  --success: #62E6D4;   /* confirmation, and the mascot's eyes */

  /* ## Derived tones
   *
   * Mixed from the five above rather than picked independently, so the palette cannot drift
   * as pages are added. Each is a specific job, not a shade someone liked.
   */
  --bg-soft: #F3EDF8;         /* section bands that need to separate without a border */
  --ink-soft: #6B5C7A;        /* secondary text: metadata, captions, fine print */
  --hairline: #E7DEEF;        /* 1px rules and input borders */
  --primary-soft: #4A2C63;    /* hover state on primary surfaces */
  --accent-deep: #E63B76;     /* hover state on the accent; also accent text on white,
                                 where #FF4F8B is 3.1:1 and fails WCAG AA for body copy */
  --card: #FFFFFF;

  /* ## Backwards-compatible aliases
   *
   * privacy, terms, support, delete-data and premium were written against the previous
   * token names. They are aliased rather than renamed across five files because a missed
   * occurrence is an invisible failure — `var(--pink)` with no definition falls back to the
   * property's initial value, so a button silently loses its background and nothing errors.
   *
   * New rules should use the names above. These exist so the redesign cannot break a legal
   * page, which is the one kind of page on this site that must never look broken.
   */
  --pink: var(--accent);
  --pink-deep: var(--accent-deep);
  --mint: var(--success);
  --yellow: #FFC94A;

  /* ## Elevation
   *
   * Two shadows, both tinted with the plum rather than neutral grey. A grey shadow on a warm
   * background is the single most common tell of a template: real light picks up the colour
   * of the surface it falls on.
   *
   * Long and very soft, offset downward only. A tight dark shadow reads as a 2012 card; a
   * 60px blur at 8% reads as an object resting slightly above the page.
   */
  --shadow: 0 18px 48px -24px rgba(45, 23, 63, 0.18);
  --shadow-lg: 0 40px 80px -32px rgba(45, 23, 63, 0.28);

  /* 28px in three places: here, `AppTheme.radius`, and the app's cards. See the note at the
     top of this file — if one changes, all three change. */
  --radius: 28px;
  --radius-sm: 16px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* ## Two families: Outfit for display, Inter for reading
 *
 * Outfit is a geometric sans with softened terminals — rounded enough to feel warm, structured
 * enough not to be childish. That distinction is the typographic brief in one line, and it is
 * why Baloo 2 is gone: Baloo is a genuinely friendly display face, and at 3rem it reads as a
 * children's app. Nothing about this brand is set in a face with a bouncy baseline.
 *
 * Inter for body copy, because at 16px on a light background it is the most legible screen face
 * in wide release and it disappears — which is what body copy should do.
 *
 * `--display` and `--body` rather than repeating the stacks: the family is named in nine places
 * in this file, and a font swap that misses one is the kind of defect nobody sees until a
 * heading on the terms page is in the wrong face.
 */
:root {
  --display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Display type is tracked tighter than default. At heading sizes the default spacing looks
   loose; -0.02em closes it up. At body size the same adjustment hurts legibility, which is why
   it lives on these selectors and not on `body`. */
.display,
h1, h2, h3 {
  font-family: var(--display);
  letter-spacing: -0.02em;
  color: var(--primary);
}

.mono { font-family: var(--mono); }

a { text-decoration: none; color: inherit; }
img, svg { display: block; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
section { position: relative; }

/* Keyboard users get a visible focus ring. Removing outlines without replacing them is
   the single most common accessibility defect on a marketing site, and it also fails
   the WCAG check that Play's data-safety review has started sampling. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Skip link: off-screen until focused. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(251, 246, 255, 0.75);
  border-bottom: 1px solid rgba(36, 22, 51, 0.06);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: 1180px;
  margin: 0 auto;
  gap: 20px;
}

/* The master mark, inline in each page's header rather than an <img>.
 *
 * These five pages exist partly so a store reviewer can find them, and a logo that pops in
 * after a separate request is the most visible possible flash of unstyled content on a page
 * that is otherwise all text. 300 bytes of markup is cheaper than a round trip.
 *
 * It replaces a pink `.dot` placeholder that stood in before the identity existed. The rule
 * for that dot is gone: leaving a dead rule behind is how a stylesheet accumulates the kind
 * of cruft nobody dares delete later.
 *
 * 24px, not 26 as on the landing page. The secondary pages' nav is 16px of padding against
 * the landing page's 18, and the mark tracks the bar it sits in. */
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.logo .mark {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--pink-deep); }

.nav-cta {
  background: var(--ink);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform .2s ease, background .2s ease;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--pink-deep); transform: translateY(-1px); }

/* ---------- page header for the non-landing pages ---------- */
.page-head { padding: 64px 0 24px; }
.page-head .kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--pink-deep);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 14px;
}
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 12px;
}
.page-head .updated { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- prose ---------- */
.prose {
  max-width: 760px;
  padding-bottom: 80px;
}
.prose h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  margin: 44px 0 14px;
  line-height: 1.25;
}
.prose h3 {
  font-family: var(--display);
  font-size: 1.12rem;
  margin: 28px 0 10px;
}
.prose p, .prose li {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.72;
}
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--pink-deep); font-weight: 500; border-bottom: 1px solid rgba(226, 62, 113, 0.3); }
.prose a:hover { border-bottom-color: var(--pink-deep); }
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--ink);
}

/* A summary table. Used on the privacy page for the data-type disclosure, because a
   reviewer comparing the Play data-safety form against the policy reads a table in
   seconds and a wall of prose not at all. */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 0.92rem;
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.data-table th, .data-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(36, 22, 51, 0.07);
  vertical-align: top;
}
.data-table th {
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink);
}
.data-table td { color: var(--ink-soft); line-height: 1.55; }
.data-table tr:last-child td { border-bottom: none; }

/* ---------- cards & callouts ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.callout {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  margin: 24px 0;
  border-left: 4px solid var(--pink);
}
.callout p { margin-bottom: 0; color: var(--ink); }
.callout p + p { margin-top: 10px; }

.callout.mint { border-left-color: var(--mint); }
.callout.yellow { border-left-color: var(--yellow); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  box-shadow: var(--shadow);
}
.btn:hover:not(:disabled) { background: var(--pink-deep); transform: translateY(-2px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.btn.pink { background: var(--pink); }
.btn.pink:hover:not(:disabled) { background: var(--pink-deep); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: 2px solid rgba(36, 22, 51, 0.14);
}
.btn.ghost:hover:not(:disabled) { background: var(--bg-soft); color: var(--ink); }

.btn.block { width: 100%; }

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 7px;
}
.field .hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 6px;
  line-height: 1.5;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(36, 22, 51, 0.12);
  background: var(--card);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--pink);
  outline: none;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input.mono { font-family: var(--mono); letter-spacing: .06em; }

.form-status {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.55;
  display: none;
}
.form-status.show { display: block; }
.form-status.ok { background: rgba(67, 217, 192, 0.16); color: #12695C; }
.form-status.bad { background: rgba(226, 62, 113, 0.12); color: var(--pink-deep); }

/* ---------- footer ---------- */
footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.55);
  padding: 40px 0 34px;
  font-size: 0.85rem;
  margin-top: auto;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
footer a { color: rgba(255, 255, 255, 0.75); }
footer a:hover { color: #fff; }
footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
footer .company { max-width: 320px; line-height: 1.6; }

body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .page-head { padding: 44px 0 18px; }
  footer .wrap { flex-direction: column; }
  .data-table { font-size: 0.85rem; }
  .data-table th, .data-table td { padding: 11px 12px; }
}
