/* HuskDet — site styles.
   Tokens are the app's own: see app/(tabs)/index.tsx and app/privacy.tsx.
   Layout: a single 1040px column, sections separated by generous vertical
   rhythm rather than rules; one accent colour, everything else slate. */

:root {
  --accent: #2563EB;
  --accent-dark: #1D4ED8;
  --accent-tint: #EFF6FF;

  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-sunken: #F1F5F9;

  --text: #1E293B;
  --text-2: #64748B;
  --text-3: #94A3B8;
  --border: #E2E8F0;

  --amber: #F59E0B;
  --green: #16A34A;
  --purple: #8B5CF6;
  --indigo: #6366F1;
  --red: #EF4444;

  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-lifted: 0 8px 24px rgba(15, 23, 42, 0.08);

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  --measure: 62ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #60A5FA;
    --accent-dark: #93C5FD;
    --accent-tint: #172554;

    --bg: #0B1220;
    --surface: #111A2B;
    --surface-sunken: #16213A;

    --text: #E8EDF5;
    --text-2: #A3B0C4;
    --text-3: #76859C;
    --border: #233149;

    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lifted: 0 8px 24px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --accent: #60A5FA;
  --accent-dark: #93C5FD;
  --accent-tint: #172554;

  --bg: #0B1220;
  --surface: #111A2B;
  --surface-sunken: #16213A;

  --text: #E8EDF5;
  --text-2: #A3B0C4;
  --text-3: #76859C;
  --border: #233149;

  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lifted: 0 8px 24px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 20px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--text);
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.2;
}

h3 {
  font-size: 1.0625rem;
  font-family: var(--ui);
  font-weight: 600;
  line-height: 1.35;
}

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

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

a:focus-visible,
.pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.site-header nav {
  display: flex;
  gap: 20px;
  font-size: 0.9375rem;
}

.site-header nav a {
  color: var(--text-2);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--text);
}

/* ---------- sections ---------- */

section {
  padding-block: clamp(48px, 8vw, 88px);
}

section + section {
  border-top: 1px solid var(--border);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.lede {
  font-size: 1.0625rem;
  color: var(--text-2);
}

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

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.hero-copy p {
  font-size: 1.125rem;
  color: var(--text-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
}

:root[data-theme="dark"] .pill,
.pill {
  border-color: var(--border);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* ---------- lock screen: the notification as it actually arrives ---------- */

.lockscreen {
  position: relative;
  /* A phone, not a billboard: keep it portrait however wide the column is. */
  max-width: 330px;
  margin-inline: auto;
  aspect-ratio: 9 / 17;
  border-radius: 34px;
  padding: 26px 16px 22px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-lifted);
  border: 1px solid var(--border);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Abstract wallpaper. Deliberately not a photograph: this is a site about
     looking after children's data. */
  background:
    radial-gradient(120% 80% at 15% 8%, #4B7BF5 0%, rgba(75, 123, 245, 0) 55%),
    radial-gradient(110% 70% at 85% 22%, #7C9CFF 0%, rgba(124, 156, 255, 0) 60%),
    linear-gradient(170deg, #1E3A8A 0%, #16255C 48%, #0B142E 100%);
}

.lock-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  padding-inline: 8px;
  letter-spacing: 0.01em;
}

.lock-status svg {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  margin-left: 5px;
}

.lock-clock {
  text-align: center;
  color: #fff;
  margin-top: 26px;
}

.lock-date {
  font-size: 0.9375rem;
  font-weight: 600;
  opacity: 0.85;
}

.lock-time {
  font-size: clamp(3.6rem, 9vw, 5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.notification {
  margin-top: auto;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  min-width: 0;
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex: none;
}

.notification-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notification-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.notification-app {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.notification-when {
  font-size: 0.75rem;
  opacity: 0.75;
  flex: none;
}

.notification-text {
  font-size: 0.9375rem;
  line-height: 1.35;
}

.caption {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-top: 14px;
  text-align: center;
}

/* ---------- the reminder card (the app's own component, in HTML) ---------- */

.phone {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow-lifted);
  min-width: 0;
}

.phone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 14px;
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 600;
}

.day-label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  padding: 0 6px 10px;
}

.reminder {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.reminder + .reminder {
  margin-top: 10px;
}

.icon-tile {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
}

.icon-tile svg {
  width: 20px;
  height: 20px;
}

.reminder-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reminder-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.reminder-child {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

.reminder-action {
  font-size: 0.875rem;
  color: var(--text-2);
}

.reminder-time {
  font-size: 0.8125rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  counter-reset: step;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.step-number {
  counter-increment: step;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.step-number::before {
  content: counter(step);
}

.step p {
  font-size: 0.9375rem;
  color: var(--text-2);
}

/* ---------- categories ---------- */

.cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.cat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
}

.cat h3 {
  margin-bottom: 2px;
}

.cat p {
  font-size: 0.875rem;
  color: var(--text-2);
}

/* ---------- data / trust ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.fact h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fact p {
  font-size: 0.9375rem;
  color: var(--text-2);
}

.check {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--green);
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.callout p {
  font-size: 0.9375rem;
  color: var(--text-2);
  max-width: var(--measure);
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-block: 40px;
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer p {
  color: var(--text-2);
  max-width: 46ch;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--text-2);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.disclaimer {
  font-size: 0.8125rem;
  color: var(--text-3);
}

/* ---------- policy page ---------- */

.policy {
  padding-block: clamp(40px, 6vw, 64px);
}

.policy h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  margin-bottom: 8px;
}

.policy .updated {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: 32px;
}

.policy h2 {
  font-family: var(--ui);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 8px;
}

.policy p,
.policy ul {
  color: var(--text-2);
  max-width: var(--measure);
  font-size: 1rem;
}

.policy ul {
  margin: 0;
  padding-left: 1.1em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.policy strong {
  color: var(--text);
  font-weight: 600;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  color: var(--text-2);
  text-decoration: none;
  margin-bottom: 24px;
}

.back:hover {
  color: var(--accent);
}

/* ---------- narrow ---------- */

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .wrap {
    padding-inline: 16px;
  }

  .site-header .wrap {
    flex-wrap: wrap;
    gap: 10px;
  }

  .phone {
    border-radius: 18px;
    padding: 14px;
  }
}

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