/*
 * Anamoris marketing site.
 *
 * The palette, radii and type scale are lifted from the app's design tokens
 * (`src/shared/design-system/tokens.ts`) rather than re-picked by eye, so the
 * site and the product are recognisably the same thing — §12 asks for the same
 * visual language, and "close enough" teal reads as a different brand.
 *
 * No web fonts and no external requests: the page is the whole page. That keeps
 * it fast on a phone and means a privacy page does not itself phone home, which
 * would be an awkward thing to explain.
 */

:root {
  --background: #fbfaf8;
  --surface: #ffffff;
  --ink: #1c2a33;
  --ink-70: rgba(28, 42, 51, 0.72);
  --ink-50: rgba(28, 42, 51, 0.5);
  --ink-34: rgba(28, 42, 51, 0.34);
  --primary: #2e9d93;
  --primary-pressed: #268075;
  --emerald: #3fb27f;
  --sky: #5aa9e6;
  --hairline: rgba(28, 42, 51, 0.07);
  --fill-subtle: rgba(28, 42, 51, 0.055);
  --teal-fill: rgba(46, 157, 147, 0.1);

  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(28, 42, 51, 0.04), 0 8px 24px rgba(28, 42, 51, 0.06);
  --shadow-lift: 0 2px 6px rgba(28, 42, 51, 0.05), 0 20px 48px rgba(28, 42, 51, 0.09);

  --measure: 68ch;
  --page: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------------------------------------------------------------- layout */

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

.narrow { max-width: 780px; }

section { padding: 88px 0; }

@media (max-width: 720px) {
  section { padding: 56px 0; }
  body { font-size: 16px; }
}

/* ------------------------------------------------------------ typography */

h1, h2, h3 {
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 640;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -0.026em; }
h3 { font-size: 1.14rem; letter-spacing: -0.015em; font-weight: 600; }

p { margin: 0; max-width: var(--measure); }

.lede {
  font-size: clamp(1.08rem, 1.9vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink-70);
}

.muted { color: var(--ink-50); }
.fine { font-size: 0.86rem; color: var(--ink-50); line-height: 1.55; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 640;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--teal-fill);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-pressed); text-decoration: underline; }

.stack > * + * { margin-top: 20px; }
.stack-tight > * + * { margin-top: 12px; }

/* --------------------------------------------------------------- header */

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 248, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 640;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; color: var(--ink); }

.mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--primary), var(--emerald));
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(46, 157, 147, 0.32);
}
.mark svg { width: 16px; height: 16px; }

nav.site { display: flex; align-items: center; gap: 26px; }
nav.site a { color: var(--ink-70); font-size: 0.94rem; font-weight: 500; }
nav.site a:hover { color: var(--ink); text-decoration: none; }

@media (max-width: 760px) {
  nav.site { display: none; }
}

/* ----------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 104px 0 96px;
  text-align: center;
}

/*
 * The app's GlowHalo, flattened. Two soft radial washes rather than one, so the
 * colour shifts across the hero instead of sitting as a single obvious blob.
 */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto;
  height: 720px;
  background:
    radial-gradient(46% 46% at 28% 22%, rgba(46, 157, 147, 0.16), transparent 70%),
    radial-gradient(40% 40% at 76% 14%, rgba(90, 169, 230, 0.13), transparent 72%);
  pointer-events: none;
}

.hero > * { position: relative; }

.hero h1 { margin: 26px auto 0; max-width: 15ch; }
.hero .lede { margin: 22px auto 0; max-width: 54ch; }

.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  font-weight: 620;
  font-size: 1rem;
  letter-spacing: -0.012em;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(46, 157, 147, 0.26), 0 12px 28px rgba(46, 157, 147, 0.2);
}
.btn-primary:hover { background: var(--primary-pressed); color: #fff; }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
}
.btn-ghost:hover { color: var(--ink); }

/* ---------------------------------------------------------------- cards */

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  margin-top: 44px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  padding: 30px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-70); font-size: 0.98rem; }

.icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: var(--teal-fill);
  color: var(--primary);
}
.icon svg { width: 21px; height: 21px; }
.icon.emerald { background: rgba(63, 178, 127, 0.12); color: #2c8c63; }
.icon.sky { background: rgba(90, 169, 230, 0.14); color: #3d82bc; }
/* Matches the amber profile tint in the app, so the pet card on this page and
   a pet's avatar in the switcher are recognisably the same feature. */
.icon.amber { background: rgba(224, 162, 60, 0.15); color: #b57c20; }

/* -------------------------------------------------------------- privacy */

.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  padding: clamp(32px, 5vw, 56px);
  box-shadow: var(--shadow-card);
}

.checklist { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 15px; }
.checklist li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  color: var(--ink-70);
  font-size: 1rem;
  max-width: var(--measure);
}
.checklist svg { flex: none; width: 19px; height: 19px; color: var(--primary); margin-top: 3px; }

/* ---------------------------------------------------------- legal pages */

.doc { padding: 60px 0 96px; }
.doc h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); }
.doc h2 { font-size: 1.34rem; margin-top: 46px; letter-spacing: -0.02em; }
.doc h3 { margin-top: 28px; }
.doc p, .doc li { color: var(--ink-70); }
.doc ul, .doc ol { padding-left: 22px; max-width: var(--measure); }
.doc li + li { margin-top: 8px; }
.doc .updated {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--ink-50);
  background: var(--fill-subtle);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
}

.callout {
  margin-top: 26px;
  border-left: 3px solid var(--primary);
  background: var(--teal-fill);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
}
.callout p { color: var(--ink-70); font-size: 0.97rem; }

table.data {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.95rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  color: var(--ink-70);
}
table.data th { color: var(--ink); font-weight: 620; font-size: 0.87rem; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ------------------------------------------------------------------ 404 */

.notfound {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 0;
}
.notfound .code {
  font-size: 5rem;
  font-weight: 680;
  letter-spacing: -0.05em;
  color: var(--primary);
  opacity: 0.28;
  line-height: 1;
}

/* --------------------------------------------------------------- footer */

footer.site {
  border-top: 1px solid var(--hairline);
  padding: 52px 0 64px;
  margin-top: 40px;
}
footer.site .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 72px;
  justify-content: space-between;
}
footer.site nav { display: grid; gap: 11px; }
footer.site nav a { color: var(--ink-70); font-size: 0.94rem; }
footer.site .legal { margin-top: 40px; color: var(--ink-34); font-size: 0.84rem; }

/* ------------------------------------------------------- review markers */

/*
 * Anything that cannot be answered from the codebase — a legal entity, a
 * jurisdiction, a price. Deliberately loud: a placeholder that ships is worse
 * than a page that is obviously unfinished, and App Review reads these pages.
 */
.todo {
  background: rgba(224, 162, 60, 0.18);
  color: #8a5c11;
  border-bottom: 1.5px solid rgba(181, 124, 32, 0.5);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95em;
}

.doc h2 + h3 { margin-top: 20px; }
.doc .toc {
  margin-top: 32px;
  padding: 22px 26px;
  background: var(--fill-subtle);
  border-radius: var(--radius-lg);
}
.doc .toc ol { margin: 12px 0 0; padding-left: 20px; columns: 2; column-gap: 34px; }
.doc .toc li { margin-top: 6px; break-inside: avoid; }
.doc .toc a { font-size: 0.94rem; }
@media (max-width: 620px) { .doc .toc ol { columns: 1; } }
