/* Puilo — colours and type mirror the iOS app's design tokens (Theme+Colors.swift, Typography.swift). */

:root {
  --background: #fbf7f5;
  --surface: #ffffff;
  --surface-muted: #f4ede9;
  --border: #e8ddd8;
  --text-primary: #2a1f23;
  --text-secondary: #6e5e64;
  --text-on-accent: #ffffff;
  --accent: #9c4a5e;
  --accent-soft: #f6e3e6;
  --champagne: #d9b99b;

  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --page: min(1120px, 100% - 48px);
  --shadow: 0 1px 2px rgb(42 31 35 / 0.04), 0 12px 32px rgb(42 31 35 / 0.08);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #161214;
    --surface: #221c1f;
    --surface-muted: #2c2428;
    --border: #3a3034;
    --text-primary: #f6eef0;
    --text-secondary: #bfaeb4;
    --text-on-accent: #2a1f23;
    --accent: #e396a6;
    --accent-soft: #3d2a30;
    --champagne: #c9a887;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.35);
  }
}

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

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

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

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

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.wrap { width: var(--page); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--text-on-accent);
  z-index: 10;
}
.skip-link:focus { top: 12px; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--background) 82%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

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

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-primary); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font-family: var(--serif); font-size: 24px; }

.site-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.site-nav a { color: var(--text-secondary); text-decoration: none; }
.site-nav a:hover { color: var(--text-primary); }

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

/* Buttons */

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--text-on-accent);
  text-decoration: none;
  line-height: 1.2;
}
.store-badge svg { width: 24px; height: 24px; flex: none; }
.store-badge small { display: block; font-size: 12px; opacity: 0.85; }
.store-badge strong { display: block; font-size: 17px; font-weight: 600; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.pill:hover { border-color: var(--accent); }

/* Hero */

.hero { padding: 72px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 76px); }
.hero .lede { font-size: 20px; color: var(--text-secondary); margin: 22px 0 32px; max-width: 34ch; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hero .note { font-size: 14px; color: var(--text-secondary); margin-top: 18px; }

.phones { position: relative; height: 620px; }
.phone {
  position: absolute;
  width: 270px;
  padding: 9px;
  border-radius: 48px;
  background: #1d1719;
  box-shadow: 0 30px 60px rgb(42 31 35 / 0.22), inset 0 0 0 2px #3a3034;
}
.phone img { border-radius: 39px; width: 100%; height: auto; aspect-ratio: 1206 / 2622; object-fit: cover; }
.phone.center { left: 50%; top: 0; transform: translateX(-50%); z-index: 2; }
.phone.left { left: 0; top: 70px; transform: rotate(-7deg) scale(0.86); opacity: 0.96; }
.phone.right { right: 0; top: 70px; transform: rotate(7deg) scale(0.86); opacity: 0.96; }

@media (max-width: 940px) {
  .hero { padding-top: 48px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-inline: auto; }
  .hero .actions { justify-content: center; }
  .phones { height: 560px; max-width: 560px; margin-inline: auto; width: 100%; }
}

@media (max-width: 560px) {
  .phones { height: 500px; }
  .phone { width: 230px; border-radius: 40px; }
  .phone img { border-radius: 32px; }
  .phone.left, .phone.right { display: none; }
}

/* Sections */

section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(34px, 4.2vw, 48px); }
.section-head p { color: var(--text-secondary); font-size: 19px; margin: 16px 0 0; }
.centered { text-align: center; margin-inline: auto; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 20px;
  margin-bottom: 20px;
}
.step h3 { font-size: 26px; margin-bottom: 10px; }
.step p { margin: 0; color: var(--text-secondary); }

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

.showcase { background: var(--surface-muted); }
.showcase .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.showcase .phone { position: relative; margin-inline: auto; transform: none; }
.showcase h2 { font-size: clamp(34px, 4.2vw, 48px); }
.showcase ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.showcase li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--text-secondary); }
.showcase li strong { color: var(--text-primary); font-weight: 600; display: block; }
.showcase li svg { width: 22px; height: 22px; color: var(--accent); margin-top: 3px; }

@media (max-width: 860px) {
  .showcase .wrap { grid-template-columns: 1fr; }
  .showcase .wrap > :first-child { order: 2; }
}

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
}
.feature .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { font-family: var(--sans); font-size: 18px; font-weight: 600; margin-bottom: 6px; letter-spacing: 0; }
.feature p { margin: 0; color: var(--text-secondary); font-size: 16px; }

@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.privacy-band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  box-shadow: var(--shadow);
}
.privacy-band h2 { font-size: clamp(32px, 3.8vw, 44px); }
.privacy-band > div > p { color: var(--text-secondary); margin: 16px 0 24px; }
.privacy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.privacy-list li { padding-left: 30px; position: relative; color: var(--text-secondary); }
.privacy-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 5px var(--accent-soft), inset 0 0 0 16px var(--accent);
}
.privacy-list strong { color: var(--text-primary); font-weight: 600; }

@media (max-width: 860px) { .privacy-band { grid-template-columns: 1fr; padding: 36px 26px; gap: 28px; } }

.pro { text-align: center; }
.pro .card {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--border);
}
.pro h2 { font-size: clamp(32px, 3.8vw, 44px); margin-bottom: 14px; }
.pro p { color: var(--text-secondary); margin: 0 auto 10px; max-width: 52ch; }

.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 20px 4px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-secondary); margin: 12px 0 0; }

.final-cta { text-align: center; padding-top: 40px; }
.final-cta img { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 24px; box-shadow: var(--shadow); }
.final-cta h2 { font-size: clamp(36px, 4.6vw, 54px); margin-bottom: 16px; }
.final-cta p { color: var(--text-secondary); font-size: 19px; margin: 0 0 28px; }

/* Footer */

.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; font-size: 14px; color: var(--text-secondary); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { color: var(--text-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--text-primary); }
.site-footer .disclaimer { flex-basis: 100%; margin: 0; font-size: 13px; }

/* Legal and support pages */

.doc { padding: 64px 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(38px, 5vw, 52px); margin-bottom: 10px; }
.doc .updated { color: var(--text-secondary); margin: 0 0 40px; }
.doc h2 { font-size: 28px; margin: 48px 0 14px; }
.doc h3 { font-family: var(--sans); font-size: 18px; font-weight: 600; margin: 28px 0 8px; letter-spacing: 0; }
.doc p, .doc li { color: var(--text-primary); }
.doc ul { padding-left: 22px; }
.doc li + li { margin-top: 8px; }
.doc .summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 8px;
}
.doc .summary h2 { margin-top: 0; font-size: 22px; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--border); }
.doc th { font-weight: 600; }
