/* Packbound marketing site - shared design system.
   Fixed brand look (ink hero, light body) rather than adapting to the
   visitor's OS theme - this is the same deliberate palette as the app
   and brand guide, not something that should shift per viewer.

   CACHING: this file is served with a 1-year immutable Cache-Control
   (see firebase.json) so repeat visitors don't refetch it - Lighthouse
   was flagging the previous 1-hour default. That means a plain
   redeploy of an edited styles.css will NOT reach anyone with a warm
   cache. Every <link> tag that references this file uses
   "styles.css?v=N" for exactly that reason - bump N in every HTML file
   that has one whenever this file's content changes, so the new
   content gets a URL nobody's cached yet. */

:root {
  --ink: #241e45;
  --ink-soft: #4a4470;
  --coral: #e65156; /* matches the app's darkened coral, not the brand
                        guide's original brighter #ff5a5f */
  --coral-dark: #c73f44;
  --teal: #17bebb;
  --amber: #ffc145;
  --surface: #f6f4ff;
  --paper: #ffffff;
  --line: rgba(36, 30, 69, 0.12);
  --line-on-dark: rgba(246, 244, 255, 0.16);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* Safety net, not a fix in itself - a single unwrapped row (see the
     flex-wrap added to .foot-links below, added after exactly this
     class of bug) shouldn't be able to force page-wide horizontal
     scroll just because it's one element in a long page. */
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

h1,
h2,
h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

/* ---------- nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-lockup svg {
  height: 30px;
  width: 30px;
  flex-shrink: 0;
}

.brand-lockup span {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links .btn {
  margin: 0;
}

@media (max-width: 720px) {
  .nav-links a:not(.btn) {
    display: none;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--coral);
  color: #fff;
}

.btn-primary:hover {
  background: var(--coral-dark);
}

.btn-ghost-on-dark {
  color: var(--surface);
  border-color: var(--line-on-dark);
}

.btn-ghost-on-dark:hover {
  border-color: rgba(246, 244, 255, 0.4);
}

.btn-ghost-on-light {
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost-on-light:hover {
  border-color: rgba(36, 30, 69, 0.35);
}

/* ---------- hero ---------- */

.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 72px 0 90px;
  position: relative;
  overflow: hidden;
}

/* A wandering dashed line rather than a generic glow blob - the same
   motif as a planned route on the map, not just hero decoration for
   its own sake. Two passes (coral over teal) so it reads as more than
   a single flat squiggle without needing real gradient/blur work. */
.hero-route {
  position: absolute;
  top: 0;
  right: 0;
  width: 620px;
  max-width: 60vw;
  height: 100%;
  pointer-events: none;
}

.hero-route path {
  fill: none;
  stroke-linecap: round;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

/* Grid items default to min-width:auto, so a nowrap descendant (the
   phone-mock's ETA text) can force its whole column - and the entire
   grid - wider than the viewport instead of shrinking/truncating.
   min-width:0 lets the track actually shrink to the available space. */
.hero .wrap > * {
  min-width: 0;
}

.hero .eyebrow {
  color: #b7adeb;
}

.hero h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.08;
  max-width: 16ch;
}

.hero .lede {
  margin-top: 20px;
  max-width: 46ch;
  color: #d7d2f2;
  font-size: 17px;
}

.hero .cta-row {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero .cta-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #9d94cf;
}

.trust-strip {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px 32px;
}

.trust-strip .item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #d7d2f2;
}

.trust-strip .item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
}

/* ---------- phone mock ---------- */

.phone-mock-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

/* A real screenshot in a plain frame - not a hand-built fake UI. The
   frame is deliberately minimal (a hairline + shadow, no fake notch
   or button chrome) since the screenshot's own status bar already
   does that work. Kept perfectly upright: a slight tilt was tried and
   read as a rendering fault rather than a deliberate angle, since it's
   too small to be obviously intentional next to the straight edges
   around it. */
.phone-mock {
  border: 1px solid var(--line-on-dark);
  border-radius: 26px;
  max-width: 280px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55);
}

.phone-mock img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- screenshot showcase ---------- */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}

@media (max-width: 860px) {
  .shot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .shot-grid {
    grid-template-columns: 1fr;
  }
}

.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* Same hairline-and-shadow treatment as the hero's phone frame, just
   smaller - the screenshots carry their own chrome, so the frame only
   needs to say "this is a phone". */
.shot-frame {
  width: 100%;
  max-width: 260px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  line-height: 0;
  background: var(--paper);
  box-shadow: 0 24px 48px -24px rgba(36, 30, 69, 0.45);
}

.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  max-width: 300px;
  text-align: center;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ---------- sections ---------- */

section {
  padding: 84px 0;
}

.section-head {
  max-width: 60ch;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin-top: 10px;
}

.section-head p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 16px;
}

.section-alt {
  background: var(--surface);
}

/* ---------- feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
}

.feature-card .icon {
  width: 26px;
  height: 26px;
  margin-bottom: 18px;
  color: var(--ink);
}

.feature-card .icon svg {
  width: 100%;
  height: 100%;
}

.feature-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- how it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- privacy ---------- */

.privacy-section {
  background: var(--ink);
  color: var(--paper);
}

.privacy-section .section-head .eyebrow {
  color: #b7adeb;
}

.privacy-section .section-head p {
  color: #d7d2f2;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 760px) {
  .privacy-grid {
    grid-template-columns: 1fr;
  }
}

.privacy-card {
  background: rgba(246, 244, 255, 0.06);
  border: 1px solid var(--line-on-dark);
  border-radius: 18px;
  padding: 26px;
}

.privacy-card h3 {
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.privacy-card h3 .glyph {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--teal);
}

.privacy-card h3 .glyph svg {
  width: 100%;
  height: 100%;
}

.privacy-card p {
  font-size: 14px;
  color: #d7d2f2;
}

.privacy-card p + p {
  margin-top: 10px;
}

.privacy-footnote {
  margin-top: 32px;
  font-size: 13px;
  color: #9d94cf;
  max-width: 70ch;
}

.privacy-footnote a {
  color: var(--teal);
  text-decoration: underline;
}

/* ---------- faq ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 70ch;
}

.faq-item h3 {
  font-size: 17px;
  margin: 0 0 8px;
}

.faq-item p {
  margin: 0;
  color: var(--ink-soft);
}

.faq-item a {
  color: var(--coral-dark);
}

/* ---------- final cta ---------- */

.final-cta {
  text-align: center;
}

.final-cta h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  max-width: 20ch;
  margin: 0 auto;
}

.final-cta p {
  margin: 16px auto 0;
  max-width: 50ch;
  color: var(--ink-soft);
  font-size: 16px;
}

.final-cta .cta-row {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

footer .brand-lockup svg {
  height: 24px;
  width: 24px;
}

footer .foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 13px;
  color: var(--ink-soft);
}

footer .foot-links a {
  text-decoration: none;
}

footer .foot-links a:hover {
  color: var(--ink);
}

footer .copyright {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  width: 100%;
  margin-top: 8px;
}

/* ---------- simple policy page ---------- */

.policy {
  padding: 64px 0 100px;
}

.policy .wrap {
  max-width: 760px;
}

.policy h1 {
  font-size: clamp(28px, 4vw, 40px);
}

.policy .updated {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 12px;
}

.policy h2 {
  font-size: 20px;
  margin-top: 44px;
  margin-bottom: 14px;
}

.policy p,
.policy li {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.policy p + p {
  margin-top: 12px;
}

.policy ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.policy li + li {
  margin-top: 8px;
}

/* :not(.btn) so this prose-link colour doesn't outrank .btn-primary/
   .btn-ghost-on-light's own text colour - it's more specific than a lone
   class selector, and without the exclusion it was overriding the white
   text on beta.html's coral buttons with dark red, illegible on the same
   coral background. */
.policy a:not(.btn) {
  color: var(--coral-dark);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.back-link:hover {
  color: var(--ink);
}
