/* ══════════════════════════════════════════════════════════════════════
   commit — shared page shell and design-system components.
   Every page on commitpk.com links this after commit-tokens.css. It holds
   the reset, the sticky nav, the dark footer, and the components taken from
   the commit design system: Logo, Button, StatusBadge, LiveDot, Input,
   Select. Page-specific layout lives in commit-site.css (home) and
   commit-pages.css (about, privacy, terms, contact).
   ══════════════════════════════════════════════════════════════════════ */

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

body {
  margin: 0;
  background: var(--commit-cream);
  color: var(--commit-ink);
  font-family: var(--font-sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--commit-purple); text-decoration: none; }
a:hover { color: var(--commit-purple-bright); }

h1, h2, h3 { margin: 0; }
p { margin: 0; }

@keyframes cmDots { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }
@keyframes commitPing { 75%, 100% { transform: scale(2.2); opacity: 0 } }

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

[hidden] { display: none !important; }

.wrap { max-width: var(--content-max); margin: 0 auto; }
.mono { font-family: var(--font-mono); }

/* Hero pieces animate in. Without JS they are simply there from the start. */
.js .reveal { opacity: 0; }

/* Shown to screen readers only. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Logo ───────────────────────────────────────────────────────────── */
.logo { display: block; width: auto; height: 24px; }
.logo--sm { height: 20px; }
.logo--xs { height: 18px; }

/* ── Button ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), opacity 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--sm { gap: 6px; padding: 6px 14px;  font-size: 13px; }
.btn--md { gap: 8px; padding: 10px 20px; font-size: 14px; }
.btn--lg { gap: 8px; padding: 14px 28px; font-size: 16px; }
.btn--primary   { background: var(--commit-ink); color: #fff; }
.btn--brand     { background: var(--brand);      color: #fff; }
.btn--secondary { background: transparent; color: var(--text-strong); border-color: var(--border-strong); }
.btn--full { display: flex; width: 100%; }
.btn__icon { font-size: 1.05em; line-height: 1; }

/* ── StatusBadge ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid;
  border-radius: var(--radius-pill);
}
.badge--pending          { color: var(--status-pending-fg);   background: var(--status-pending-bg);   border-color: #FDE68A; }
.badge--confirmed        { color: var(--status-confirmed-fg); background: var(--status-confirmed-bg); border-color: #BFDBFE; }
.badge--out_for_delivery { color: var(--status-otw-fg);       background: var(--status-otw-bg);       border-color: #E9D5FF; }
.badge--delivered        { color: var(--status-delivered-fg); background: var(--status-delivered-bg); border-color: #BBF7D0; }
.badge--cancelled        { color: var(--status-cancelled-fg); background: var(--status-cancelled-bg); border-color: #FECACA; }

/* ── LiveDot ────────────────────────────────────────────────────────── */
.livedot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-muted);
}
.livedot__dot { position: relative; display: inline-flex; width: 8px; height: 8px; }
.livedot__dot::before,
.livedot__dot::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%; background: var(--success);
}
.livedot__dot::before {
  opacity: 0.4;
  animation: commitPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ── Input / Select ─────────────────────────────────────────────────── */
.field { display: block; font-family: var(--font-sans); }
.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--text-body);
}
.field__wrap { position: relative; display: block; }
.field__control {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-strong);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field__control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(64, 43, 202, 0.15);
}
.field__control:invalid:not(:placeholder-shown) { border-color: var(--danger); }
select.field__control { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; }
.field__caret {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 11px;
  color: var(--text-faint);
}

/* Screens that show the product use the app's own UI font. */
.ui { font-family: var(--font-ui); font-variant-numeric: tabular-nums; }

/* ── Display type ───────────────────────────────────────────────────── */
.eyebrow {
  font-size: 12px;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--commit-purple);
}
.h2 {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.95;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.05em;
}
.h2--dim { color: #A08C80; }
.h2--brand { color: var(--commit-purple); }

/* ══ NAV ════════════════════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(254, 233, 225, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(41, 31, 30, 0.08);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 16px 32px;
}
.nav__links {
  display: flex; gap: 32px; flex-wrap: wrap;
  font-size: 14px; font-weight: var(--fw-medium);
}
.nav__links a { color: var(--commit-ink); }
.nav__links a:hover { color: var(--commit-purple); }
.nav__links a[aria-current="page"] { color: var(--commit-purple); font-weight: var(--fw-semibold); }
.nav__actions { display: flex; align-items: center; gap: 20px; }
.nav__login { font-size: 14px; font-weight: var(--fw-semibold); color: var(--commit-ink); }
.nav__login:hover { color: var(--commit-purple); }

/* ══ FOOTER ═════════════════════════════════════════════════════════ */
.foot { background: var(--commit-ink); color: #F6F4F0; }
.foot__inner { padding: 72px 32px 40px; display: flex; flex-direction: column; gap: 56px; }
.foot__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.foot__title {
  max-width: 760px;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: 0.92;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.055em;
  color: #F6F4F0;
}
.foot__title span { color: var(--purple-300); }
.foot__bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px; color: var(--text-faint);
}
.foot__brand { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot__links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot__links a { color: #C8C0B5; }
.foot__links a:hover { color: #F6F4F0; }

/* ══ PHONE ══════════════════════════════════════════════════════════
   The nav keeps the logo and the CTA on one row and gives the section
   links a row of their own, so it can stay sticky without swallowing the
   screen. Touch targets are grown with padding and pulled back with
   negative margin, so they measure 44px without moving anything.         */
@media (max-width: 620px) {
  .nav__inner { padding: 10px 20px; gap: 0 16px; }
  .nav__logo { order: 1; }
  .nav__actions { order: 2; gap: 4px; }
  .nav__login { padding: 12px 10px; }
  .nav__links {
    order: 3;
    width: 100%;
    gap: 0;
    justify-content: space-between;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -20px;
    padding: 0 20px;
    scrollbar-width: none;
  }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__links a { padding: 13px 8px; white-space: nowrap; }
  .nav__logo { padding: 10px 0; margin: -10px 0; }

  .btn--sm { min-height: 44px; padding: 10px 16px; }
  .field__control { min-height: 44px; padding: 11px 12px; }
  select.field__control { padding-right: 34px; }

  .foot__inner { padding: 48px 20px 28px; gap: 32px; }
  .foot__links { gap: 0 20px; }
  .foot__links a { display: inline-block; padding: 14px 0; margin: -14px 0; }
}

/* Smallest phones: keep the logo, Log in and the pilot button on one row */
@media (max-width: 340px) {
  .nav__inner { padding-left: 16px; padding-right: 16px; column-gap: 8px; }
  .nav__login { padding: 12px 6px; }
  .nav__cta .btn__icon { display: none; }
}
