/* Catanook website — one stylesheet, no build step.
   Colours come from the app icon: deep indigo, and the four "books"
   (amber, coral, mint, pink). Type is the system font (SF Pro on Apple
   devices), with SF Pro Rounded for headlines like the app's stats. */

:root {
  color-scheme: light dark;

  --indigo-50: #f1f0ff;
  --indigo-100: #e4e1ff;
  --indigo-400: #7b6dff;
  --indigo-500: #5a4bff;
  --indigo-600: #4535e6;
  --indigo-700: #3426b8;
  --indigo-900: #160f4d;
  --amber: #f2b544;
  --coral: #ee6352;
  --mint: #3fbf8e;
  --pink: #ea5fa7;

  --bg: #f6f6fb;
  --surface: #ffffff;
  --surface-2: #efeff6;
  --text: #15131f;
  --text-2: #55536a;     /* 7.4:1 on --bg */
  --text-3: #6e6c82;     /* 4.9:1 on --bg */
  --border: rgb(21 19 31 / 0.09);
  --accent: var(--indigo-600);   /* 6.4:1 on white */
  --accent-soft: var(--indigo-50);
  --shadow-lg: 0 30px 80px -24px rgb(22 15 77 / 0.35), 0 10px 30px -12px rgb(22 15 77 / 0.25);
  --shadow-md: 0 12px 34px -16px rgb(22 15 77 / 0.28);

  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1140px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0a14;
    --surface: #16141f;
    --surface-2: #1e1b2b;
    --text: #f4f3fb;
    --text-2: #b9b6cc;
    --text-3: #9a97b0;
    --border: rgb(255 255 255 / 0.1);
    --accent: #a59bff;
    --accent-soft: rgb(123 109 255 / 0.16);
    --shadow-lg: 0 30px 80px -24px rgb(0 0 0 / 0.7);
    --shadow-md: 0 12px 34px -16px rgb(0 0 0 / 0.6);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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(--indigo-400);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}
.skip-link:focus { top: 12px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
section.tight-top { padding-top: 0; }
.lead-text { color: var(--text-2); font-size: 1.15rem; margin: 0; text-wrap: pretty; }
.after-faq { margin-top: 40px; }
.button-accent { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .button-accent { color: #120d38; } }
.not-found { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.not-found img { margin: 0 auto 24px; border-radius: 22px; }
.not-found p { margin: 0 auto 28px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.4vw, 28px);
  font-size: 0.95rem;
}
.nav a { color: var(--text-2); text-decoration: none; font-weight: 500; padding: 10px 2px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 640px) {
  .nav .nav-secondary { display: none; }
}
@media (max-width: 360px) {
  /* The icon alone carries the brand on the smallest screens. */
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- Buttons & pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.button-primary {
  background: #fff;
  color: var(--indigo-900);
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.45);
}
.button-primary:hover { transform: translateY(-1px); }
.button-ghost {
  color: #fff;
  background: rgb(255 255 255 / 0.12);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28);
}
.button-ghost:hover { background: rgb(255 255 255 / 0.2); }
.button svg { width: 20px; height: 20px; }

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(60% 60% at 88% 12%, rgb(242 181 68 / 0.32), transparent 70%),
    radial-gradient(50% 55% at 72% 100%, rgb(234 95 167 / 0.38), transparent 70%),
    radial-gradient(45% 50% at 0% 85%, rgb(63 191 142 / 0.28), transparent 70%),
    linear-gradient(160deg, #5a4bff 0%, #3426b8 45%, #160f4d 100%);
  padding: clamp(56px, 9vw, 112px) 0 0;
}
.hero::after {
  /* A faint shelf line, like the icon's. */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(1100px, 92vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.45), transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: end;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
}
.hero-copy { padding-bottom: clamp(24px, 6vw, 96px); }
.hero .pill { background: rgb(255 255 255 / 0.14); color: #fff; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 20px 0 18px;
  text-wrap: balance;
}
.hero h1 .glow {
  background: linear-gradient(90deg, #ffd88a, #ff9fbf 55%, #9ff0cf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: rgb(255 255 255 / 0.86);
  max-width: 34em;
  margin: 0 0 30px;
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: 0.9rem; color: rgb(255 255 255 / 0.75); }

/* Three phones, fanned like the cards on the app's welcome screen. */
.hero-phones {
  position: relative;
  height: clamp(420px, 62vw, 640px);
  margin-inline: auto;
  width: 100%;
  max-width: 620px;
}
.hero-phones .phone {
  position: absolute;
  bottom: -60px;
  width: clamp(190px, 31vw, 290px);
}
.hero-phones .phone:nth-child(1) { left: 0; transform: rotate(-8deg) translateY(40px); z-index: 1; }
.hero-phones .phone:nth-child(2) { left: 50%; transform: translateX(-50%); z-index: 3; }
.hero-phones .phone:nth-child(3) { right: 0; transform: rotate(8deg) translateY(40px); z-index: 2; }

/* ---------- Phone frame ---------- */

/* The screenshot sets the height (never cropped); the bezel is padding around it. */
.phone {
  position: relative;
  border-radius: 17% / 7.8%;
  padding: 3.2%;
  background: linear-gradient(145deg, #2a2838, #0c0b12);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgb(255 255 255 / 0.14);
}
.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 1564;
  border-radius: 14% / 6.4%;
  background: #f2f2f7;
}

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

section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  text-wrap: balance;
}
h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.section-head p { font-size: 1.15rem; color: var(--text-2); margin: 0; text-wrap: pretty; }

/* Profiles */
.profiles-grid {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (min-width: 900px) {
  .profiles-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.profiles-visual { display: flex; justify-content: center; }
.profiles-visual .phone { width: min(320px, 78vw); }
.profile-list { display: grid; gap: 14px; margin: 28px 0 0; padding: 0; list-style: none; }
.profile-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border), var(--shadow-md);
}
.profile-card .avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
}
.profile-card .avatar svg { width: 24px; height: 24px; }
.avatar.home { background: linear-gradient(160deg, #3d8bff, #0a5fd6); }
.avatar.collection { background: linear-gradient(160deg, #d96bf0, #a32bc7); }
.avatar.shop { background: linear-gradient(160deg, #4fd27a, #1f9a4a); color: #07230f; }
.avatar.workshop { background: linear-gradient(160deg, #e0904c, #b35f1c); color: #2a1404; }
.profile-card h3 { font-size: 1.1rem; margin: 2px 0 4px; }
.profile-card p { margin: 0; color: var(--text-2); font-size: 0.98rem; }
.kind {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  vertical-align: 2px;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--text-2);
}

/* Feature cards */
.features {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.feature {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
}
.feature .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 16px;
  color: #fff;
}
.feature .icon svg { width: 22px; height: 22px; }
.feature p { margin: 0; color: var(--text-2); font-size: 0.98rem; }
@media (max-width: 600px) {
  /* Compact on phones: the icon beside the title, not above it. */
  .feature { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; padding: 20px; }
  .feature .icon { grid-row: span 2; margin: 0; }
  .feature h3 { align-self: center; margin: 0; }
}
.i-indigo { background: linear-gradient(160deg, var(--indigo-400), var(--indigo-600)); }
.i-amber { background: linear-gradient(160deg, #f6c665, #e09a1a); color: #2b1c00 !important; }
.i-coral { background: linear-gradient(160deg, #f47b6b, #d8483a); }
.i-mint { background: linear-gradient(160deg, #5fd6a6, #229c6c); color: #04261a !important; }
.i-pink { background: linear-gradient(160deg, #f27dbb, #cf3f8a); }

/* Spotlight rows (screenshot + words) */
.spotlight {
  display: grid;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
@media (min-width: 900px) {
  .spotlight { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .spotlight.flip > :first-child { order: 2; }
}
.spotlight .phone { width: min(300px, 76vw); margin-inline: auto; }
.spotlight .duo { display: flex; justify-content: center; gap: clamp(12px, 3vw, 28px); }
.spotlight .duo .phone { width: min(250px, 42vw); margin: 0; }
.spotlight .duo .phone:last-child { transform: translateY(36px); }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.checks li strong { color: var(--text); font-weight: 650; }
.checks svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--mint); }

/* Trust band */
.trust {
  background:
    radial-gradient(50% 80% at 100% 0%, rgb(90 75 255 / 0.18), transparent 70%),
    var(--surface-2);
}
.trust-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.trust-item {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
}
.trust-item .big {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.trust-item p { margin: 0; color: var(--text-2); font-size: 0.98rem; }

/* Closing call to action */
.cta {
  text-align: center;
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(48px, 8vw, 88px) var(--gutter);
  background:
    radial-gradient(60% 90% at 90% 0%, rgb(242 181 68 / 0.3), transparent 70%),
    radial-gradient(50% 90% at 0% 100%, rgb(234 95 167 / 0.32), transparent 70%),
    linear-gradient(160deg, #5a4bff, #2a1e9e 60%, #160f4d);
  box-shadow: var(--shadow-lg);
}
.cta img { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 22px; box-shadow: 0 18px 40px -14px rgb(0 0 0 / 0.5); }
.cta h2 { color: #fff; }
.cta p { color: rgb(255 255 255 / 0.85); font-size: 1.15rem; max-width: 34rem; margin: 0 auto 28px; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0 56px;
  color: var(--text-3);
  font-size: 0.92rem;
  border-top: 1px solid var(--border);
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--text-2); text-decoration: none; padding: 8px 0; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Long-form pages (privacy, support) ---------- */

.page-hero {
  padding: clamp(48px, 8vw, 88px) 0 clamp(24px, 4vw, 40px);
  background:
    radial-gradient(60% 100% at 100% 0%, rgb(90 75 255 / 0.16), transparent 70%),
    var(--bg);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 12px 0 14px;
}
.page-hero p { color: var(--text-2); font-size: 1.15rem; margin: 0; max-width: 40rem; }
.prose { max-width: 46rem; padding-bottom: 96px; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 48px 0 12px; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.summary-card {
  margin: 8px 0 8px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border), var(--shadow-md);
}
.summary-card ul { margin: 8px 0 0; }
.summary-card li { color: var(--text); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.96rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--text); font-weight: 650; }
td { color: var(--text-2); }

/* Support */
.contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border), var(--shadow-md);
  margin-bottom: 40px;
}
.contact-card p { margin: 4px 0 0; color: var(--text-2); }
.contact-card .button { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .contact-card .button { color: #120d38; } }
details {
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
  margin: 10px 0;
}
summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 20px;
  font-weight: 620;
  color: var(--text);
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
details > div { padding: 0 20px 18px; }
details > div p { margin: 0 0 10px; }

/* ---------- Motion (only when welcome) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-phones .phone { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .hero-phones .phone:nth-child(1) { animation-delay: 0.08s; }
  .hero-phones .phone:nth-child(3) { animation-delay: 0.16s; }
  @keyframes rise { from { opacity: 0; translate: 0 60px; } to { opacity: 1; translate: 0 0; } }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 28%;
    }
    @keyframes reveal { from { opacity: 0; translate: 0 32px; } to { opacity: 1; translate: 0 0; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}

/* More contrast when asked for. */
@media (prefers-contrast: more) {
  :root { --text-2: var(--text); --text-3: var(--text); --border: currentColor; }
  .hero .lede, .hero-note { color: #fff; }
}
