/* Pack Time website. Colors and type follow App/DesignSystem/Theme.swift.
   No web fonts: ui-rounded is the system's SF Pro Rounded on Apple devices. */

:root {
  --sunset: #FF7A45;
  --bubblegum: #FF5FA2;
  --grape: #7B61FF;
  --mint: #2ED3A0;
  --sky: #3BA9FF;
  --butter: #FFC93C;

  --background: #FFF8F0;
  --surface: #FFFFFF;
  --surface-raised: #FFF1E4;
  --ink: #231B2E;
  --ink-soft: #6E6479;
  --hairline: #F0E3D6;
  /* Text on the brand gradient and accent links, checked for contrast. */
  --on-brand: #FFFFFF;
  --link: #C2410C;
  --focus: #7B61FF;

  --brand-gradient: linear-gradient(135deg, var(--sunset), var(--bubblegum));
  /* Deeper stops for anything with text on it: white text stays at 5.2:1 or
     better (the app's bright gradient is only ~2.6:1 with white). */
  --brand-gradient-text: linear-gradient(135deg, #C2410C, #BE185D);
  --corner: 24px;
  --corner-small: 14px;
  --gutter: 16px;
  --max: 960px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 10px 30px rgba(35, 27, 46, 0.08);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #14121A;
    --surface: #201C29;
    --surface-raised: #2A2535;
    --ink: #F7F2FF;
    --ink-soft: #B7AEC6;
    --hairline: #332D40;
    --link: #FFA27D;
    --focus: #B4A6FF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;           /* 16px minimum for body text */
  line-height: 1.6;
  overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

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

/* Skip link: hidden until focused. */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--corner-small);
  font-weight: 700;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header { padding: 16px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.25rem;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-weight: 700;
  padding: 8px 10px; border-radius: 999px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-raised); }

/* Headings */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 7vw, 3.4rem); font-weight: 900; margin: 0 0 12px; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); font-weight: 800; margin: 0 0 12px; }
h3 { font-size: 1.15rem; font-weight: 800; margin: 0 0 4px; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 36em; margin: 0 0 24px; }

main { padding-bottom: 48px; }
section { margin: 48px 0; }

/* Hero */
.hero { text-align: center; padding: 24px 0 8px; margin-top: 8px; }
.hero-icon {
  width: 128px; height: 128px; border-radius: 30px;
  box-shadow: 0 16px 40px rgba(255, 95, 162, 0.35);
  margin-bottom: 20px;
}
.hero .lede { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px;
  border: 0; border-radius: 999px;
  font: inherit; font-weight: 800; font-size: 1.05rem;
  text-decoration: none; cursor: pointer;
  background: var(--brand-gradient-text); color: var(--on-brand);
  box-shadow: 0 10px 24px rgba(255, 122, 69, 0.35);
}
.btn:hover { filter: brightness(1.05); }
.btn[disabled] {
  cursor: default; filter: none;
  background: var(--surface-raised); color: var(--ink-soft);
  box-shadow: none;
}
.btn svg { flex: none; }

/* Cards and grids */
.card {
  background: var(--surface);
  border-radius: var(--corner);
  padding: 20px;
  box-shadow: var(--shadow);
}
.features {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.features li { display: flex; gap: 14px; align-items: flex-start; }
.features p, .steps p { margin: 0; color: var(--ink-soft); }
.emoji-tile {
  flex: none; width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.6rem;
  background: var(--surface-raised);
}

.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-gradient-text); color: var(--on-brand);
  font-weight: 900; margin-bottom: 10px;
}

.cta { text-align: center; }
.note { color: var(--ink-soft); font-size: 1rem; }

/* Long-form pages (terms, support) */
.doc { max-width: 720px; }
.doc-header { margin: 24px 0 8px; }
.doc-header .updated { color: var(--ink-soft); font-weight: 700; margin: 0; }
.doc h2 { margin-top: 40px; scroll-margin-top: 16px; }
.doc ol { padding-left: 1.4em; }
.doc li { margin: 8px 0; }
.doc address { font-style: normal; }
.toc { margin: 24px 0 8px; }
.toc h2 { font-size: 1.15rem; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2 220px; column-gap: 24px; }
.toc li { margin: 4px 0; break-inside: avoid; }

.faq { display: grid; gap: 14px; }
.faq h3 { font-size: 1.2rem; margin: 0 0 6px; }
.faq p, .faq ol { margin: 0; }

.hero .emoji-tile { margin: 0 auto 16px; width: 72px; height: 72px; font-size: 2.4rem; border-radius: 20px; }

/* Invite page */
.invite { text-align: center; max-width: 560px; margin: 0 auto; }
.code-box {
  display: inline-block; margin: 8px 0 0;
  padding: 12px 20px; border-radius: var(--corner-small);
  background: var(--surface-raised);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.3rem; font-weight: 700; letter-spacing: 0.06em;
}
[hidden] { display: none !important; }

/* Privacy page: Termly's markup forces black text with !important, so the
   policy sits on a light sheet in both light and dark mode. */
.policy-sheet {
  background: #FFFFFF;
  color: #000000;
  color-scheme: light;
  border-radius: var(--corner);
  padding: 24px var(--gutter);
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.policy-sheet a { color: #3030F1; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 24px 0 40px; color: var(--ink-soft); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.site-footer nav a { color: var(--ink); font-weight: 700; text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 4px 0; font-size: 1rem; }

@media (min-width: 720px) {
  :root { --gutter: 24px; }
  .hero { padding-top: 40px; }
  .card { padding: 24px; }
}

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