/* Journaliso marketing site. Calm, phone-first, one job: the App Store button.
   Tokens mirror Journaliso/Theme/Theme.swift (brandRed E11D22, system label
   colors, 12/16/24 radii). No web fonts, no scripts. */

:root {
  color-scheme: light dark;

  --red: #e11d22;
  --red-text: #c4161b;

  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --label: #1d1d1f;
  --secondary: #6e6e73;
  --separator: rgba(60, 60, 67, 0.16);
  --fill: rgba(120, 120, 128, 0.12);
  --on-label: #ffffff;
  --focus: #0a66d6;
  --phone-edge: rgba(0, 0, 0, 0.16);
  --phone-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.06);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --measure: 1120px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --red-text: #ff6b63;
    --bg: #000000;
    --bg-alt: #121214;
    --label: #f5f5f7;
    --secondary: #a1a1a6;
    --separator: rgba(255, 255, 255, 0.14);
    --fill: rgba(120, 120, 128, 0.24);
    --on-label: #111113;
    --focus: #4ea1ff;
    --phone-edge: rgba(255, 255, 255, 0.22);
    --phone-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 0.5px rgba(255, 255, 255, 0.06);
  }
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--label);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

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

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--label);
  color: var(--on-label);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

main { display: block; }

/* ---------- Shared copy pieces ---------- */

.lede {
  font-size: 19px;
  line-height: 1.45;
  color: var(--secondary);
  max-width: 34ch;
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.cta-note {
  font-size: 14px;
  color: var(--secondary);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--label);
  color: var(--on-label);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.button:hover { opacity: 0.86; }
.button:active { transform: scale(0.98); }
.button:focus-visible { border-radius: 999px; }

/* ---------- Phone frame (CSS only) ---------- */

.phone {
  width: 100%;
  border-radius: 44px;
  padding: 10px;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--phone-edge), var(--phone-shadow);
}
.phone picture, .phone img {
  display: block;
  width: 100%;
  border-radius: 34px;
}

/* ---------- 1. Hero ---------- */

.hero {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 24px var(--gutter) 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
}
.hero > * { min-width: 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  font-size: 17px;
  font-weight: 600;
}
.brand img {
  width: 40px; height: 40px;
  border-radius: 10px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.14);
}

.hero h1 {
  font-size: 44px;
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 12ch;
}
.hero .lede { margin-top: 14px; }
.hero .cta { margin-top: 26px; }

.hero .phone {
  width: min(100%, 300px);
  margin: 0 auto;
}

/* ---------- 2. Three feelings ---------- */

.feelings {
  background: var(--bg-alt);
  padding: 48px var(--gutter);
}
.feelings ul {
  max-width: var(--measure);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.feelings li {
  padding: 24px;
  border-radius: 24px;
  background: var(--bg);
  box-shadow: 0 0 0 0.5px var(--separator);
  display: grid;
  gap: 8px;
}
.feelings li p { font-size: 17px; line-height: 1.5; max-width: 36ch; }

.visual {
  height: 112px;
  margin-bottom: 12px;
  padding: 8px;
  border-radius: 14px;
  background: var(--bg-alt);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.visual .shot { display: block; max-width: 100%; }
.visual .shot img {
  height: 96px;
  width: auto;
  max-width: 100%;
  object-fit: cover;
  object-position: left center;
  border-radius: 10px;
  box-shadow: 0 0 0 0.5px var(--phone-edge), 0 6px 18px -10px rgba(0, 0, 0, 0.45);
}
.visual .icon {
  width: 48px; height: 48px;
  color: var(--label);
}
.visual .icon .accent { stroke: var(--red); }

.label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--red-text);
}

/* ---------- 3. How it works ---------- */

.how {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 56px var(--gutter);
}
.how h2, .closing h2 {
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.how ol {
  margin-top: 28px;
  display: grid;
  gap: 24px;
  counter-reset: step;
}
.how li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0 16px;
  align-items: start;
  align-content: start;
}
.how li::before {
  content: counter(step);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.how h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.how li p {
  grid-column: 2;
  margin-top: 6px;
  color: var(--secondary);
  max-width: 44ch;
}

/* ---------- 4. Closing ---------- */

.closing {
  background: var(--bg-alt);
  padding: 64px var(--gutter);
  text-align: center;
}
.closing h2 { max-width: 14ch; margin: 0 auto; }
.closing .lede { margin: 14px auto 0; }
.closing .cta { margin-top: 28px; align-items: center; }

/* ---------- 5. Footer ---------- */

.footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 24px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--secondary);
}
.footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin-left: -10px;
}
.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--secondary);
  text-decoration: none;
  border-radius: 6px;
}
.footer a:hover { color: var(--label); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Wider screens ---------- */

@media (min-width: 720px) {
  :root { --gutter: 40px; }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: center;
    gap: 48px;
    padding-top: 40px;
    padding-bottom: 72px;
  }
  .hero h1 { font-size: 60px; }
  .hero .lede { font-size: 21px; }
  .hero .phone { width: 100%; margin: 0; }

  .feelings { padding: 64px var(--gutter); }
  .feelings ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

  .how { padding: 72px var(--gutter); }
  .how h2, .closing h2 { font-size: 40px; }
  .how ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 36px; }

  .closing { padding: 88px var(--gutter); }
  .closing .lede { font-size: 21px; }
}

@media (min-width: 1100px) {
  .hero { gap: 72px; }
  .hero h1 { font-size: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Support page ---------- */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px var(--gutter) 56px;
}
.page-header { margin-bottom: 20px; }
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.home-link img { width: 28px; height: 28px; border-radius: 7px; }

.section { padding: 32px 0; border-top: 0.5px solid var(--separator); }
.section:first-of-type { border-top: 0; padding-top: 8px; }
.section h1 {
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.section h2 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.section-head { margin-bottom: 20px; }
.section-head p { margin-top: 8px; color: var(--secondary); max-width: 60ch; }

.prose { max-width: 60ch; }
.prose p { line-height: 1.6; }
.prose p + p { margin-top: 12px; }
.prose .hero-lede { margin-top: 12px; font-size: 19px; line-height: 1.45; color: var(--secondary); }

.group {
  border-radius: 16px;
  background: var(--bg-alt);
  box-shadow: 0 0 0 0.5px var(--separator);
  overflow: hidden;
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}
.contact-card strong { display: block; font-size: 17px; }
.contact-card span { font-size: 15px; color: var(--secondary); }

.sub-h { font-size: 13px; font-weight: 600; color: var(--secondary); margin: 0 0 8px 4px; font-family: var(--font); }

.steps { counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 18px;
  position: relative;
  font-size: 16px;
}
.steps li + li::before {
  content: "";
  position: absolute;
  top: 0; right: 0; left: 58px;
  border-top: 0.5px solid var(--separator);
}
.steps li::after {
  content: counter(step);
  grid-row: 1;
  grid-column: 1;
  width: 24px; height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--label);
  color: var(--on-label);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.steps li > span { grid-column: 2; }
.path { font-weight: 600; }

.two-col { display: grid; gap: 24px; }
@media (min-width: 720px) {
  .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.faq details { position: relative; }
.faq details + details::before {
  content: "";
  position: absolute;
  top: 0; right: 0; left: 18px;
  border-top: 0.5px solid var(--separator);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg {
  width: 12px; height: 12px;
  flex: none;
  color: var(--secondary);
  transition: transform 0.2s ease;
}
.faq details[open] summary svg { transform: rotate(90deg); }
.faq summary:focus-visible { outline-offset: -3px; border-radius: 10px; }
.faq .answer {
  padding: 0 18px 16px;
  font-size: 16px;
  color: var(--secondary);
  max-width: 68ch;
}
.faq .answer a { color: var(--label); text-underline-offset: 3px; }

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 24px;
  border-radius: 16px;
  background: var(--bg-alt);
}
.callout h2 { font-size: 22px; }
.callout p { margin-top: 4px; color: var(--secondary); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button-secondary { background: var(--fill); color: var(--label); }
.button-secondary:hover { opacity: 1; background: var(--separator); }

@media (max-width: 719px) {
  .contact-card .button, .actions .button { flex: 1 1 100%; }
}
