/* Hallmark · pre-emit critique: P4 H5 E4 S5 R4 V4 */
/* Hallmark · genre: modern-minimal · macrostructure: Marquee Hero
 * tone: utilitarian · audience: delivery drivers · use: App Store + legal
 * enrichment: Tier-B quest-progress field · nav: N5 · footer: Ft2
 * theme: Questly green #1F6B38
 * tokens: linked from head as /assets/css/home-tokens.css (no @import)
 */

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

html,
body {
  overflow-x: clip;
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--lh-relaxed);
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
}

a {
  color: var(--color-accent-ink);
  text-decoration-thickness: var(--rule-hair);
  text-underline-offset: 0.18em;
  touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration-thickness: var(--rule-focus);
  }
}

a:focus,
.nav-toggle:focus {
  outline: none;
}

a:focus-visible,
.nav-toggle:focus-visible {
  outline: var(--rule-focus) solid var(--color-focus);
  outline-offset: 3px;
}

a:active {
  opacity: 0.72;
}

.skip {
  position: absolute;
  left: var(--page-gutter);
  top: var(--space-sm);
  z-index: var(--z-skip);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-paper);
  color: var(--color-ink);
  transform: translateY(-150%);
}

.skip:focus {
  transform: none;
}

.nav-shell {
  position: absolute;
  z-index: var(--z-sticky-nav);
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: max(var(--space-md), env(safe-area-inset-top)) var(--page-gutter) var(--space-md);
  pointer-events: none;
}

.nav-shell > * {
  pointer-events: auto;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: var(--color-ink);
  line-height: 1;
  text-decoration: none;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.brand-lockup__mark {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.brand-lockup__text,
.brand-logo {
  font-family: var(--font-logo);
  font-weight: 700;
  letter-spacing: var(--tracking-logo);
}

.brand-lockup__text {
  font-size: var(--text-lg);
  line-height: 1;
}

.brand-logo {
  font-weight: 700;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-xs);
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: var(--rule-hair) solid color-mix(in oklch, var(--color-ink) 14%, transparent);
  border-radius: var(--radius-pill);
  background: color-mix(in oklch, var(--color-on-accent) 72%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--color-ink);
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  line-height: 1;
  cursor: pointer;
}

.nav-toggle__icon {
  position: relative;
  display: block;
  width: 1rem;
  height: 0.75rem;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
}

.nav-toggle__icon::before {
  top: 0.1rem;
  box-shadow: 0 0.28rem 0 currentColor;
}

.nav-toggle__icon::after {
  bottom: 0.1rem;
}

.nav-shell.is-open .nav-toggle__icon::before {
  top: 0.3rem;
  box-shadow: none;
  transform: rotate(45deg);
}

.nav-shell.is-open .nav-toggle__icon::after {
  bottom: auto;
  top: 0.3rem;
  transform: rotate(-45deg);
}

.nav-pill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-2xs);
  border: var(--rule-hair) solid color-mix(in oklch, var(--color-ink) 14%, transparent);
  border-radius: var(--radius-pill);
  background: color-mix(in oklch, var(--color-on-accent) 60%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.nav-pill a {
  white-space: nowrap;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--color-ink);
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  line-height: 1.5;
  text-decoration: none;
}

.nav-pill__cta {
  background: var(--color-accent);
  color: var(--color-on-accent) !important;
  font-weight: 700;
}

@media (hover: hover) and (pointer: fine) {
  .nav-pill a:not(.nav-pill__cta):hover {
    background: var(--color-accent);
    color: var(--color-on-accent);
  }

  .nav-pill__cta:hover {
    filter: brightness(1.08);
  }

  .nav-toggle:hover {
    background: color-mix(in oklch, var(--color-on-accent) 88%, transparent);
  }
}

.nav-shell.is-measuring {
  flex-wrap: nowrap;
}

.nav-shell.is-measuring .nav-toggle {
  display: none !important;
}

.nav-shell.is-measuring .nav-pill {
  display: flex !important;
  flex-wrap: nowrap;
  position: static;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.nav-shell.is-compact .nav-toggle {
  display: inline-flex;
}

.nav-shell.is-compact .nav-pill {
  position: absolute;
  top: calc(100% - var(--space-2xs));
  right: var(--page-gutter);
  left: auto;
  z-index: 1;
  display: none;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  min-width: min(16rem, calc(100vw - 2 * var(--page-gutter)));
  padding: var(--space-xs);
  border-radius: 1rem;
  background: color-mix(in oklch, var(--color-on-accent) 88%, transparent);
  box-shadow: 0 12px 28px oklch(28% 0.02 150 / 0.14);
}

.nav-shell.is-compact.is-open .nav-pill {
  display: flex;
}

.nav-shell.is-compact .nav-pill a {
  width: 100%;
}

.nav-shell--motion.is-compact .nav-pill {
  transform-origin: top right;
}

.nav-shell--motion.is-compact.is-open .nav-pill {
  animation: nav-panel-in var(--dur-short) var(--ease-out) both;
}

.nav-shell--motion .nav-toggle__icon::before,
.nav-shell--motion .nav-toggle__icon::after {
  transition: transform var(--dur-micro) var(--ease-out), top var(--dur-micro) var(--ease-out), bottom var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out);
}

@keyframes nav-panel-in {
  from {
    opacity: 0;
    transform: translateY(-0.35rem) scale(0.98);
  }
}

.hero {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 100svh;
  min-width: 0;
  overflow: clip;
}

.quest-field {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 480px at 12% -8%, oklch(45% 0.11 152 / 0.28), transparent 55%),
    radial-gradient(700px 420px at 92% 8%, oklch(55% 0.06 200 / 0.14), transparent 50%),
    linear-gradient(165deg, var(--color-paper-2) 0%, var(--color-paper) 48%, var(--color-paper-3) 100%);
}

.quest-field__glow {
  position: absolute;
  inset: 18% 8% auto;
  height: 40%;
  background: radial-gradient(ellipse at center, oklch(45% 0.11 152 / 0.18), transparent 70%);
  pointer-events: none;
}

.quest-field__panel {
  position: absolute;
  right: var(--page-gutter);
  top: max(5.5rem, env(safe-area-inset-top));
  display: grid;
  gap: var(--space-md);
  width: min(22rem, calc(100% - 2 * var(--page-gutter)));
  opacity: 0.92;
}

.quest-card {
  min-width: 0;
  padding: var(--space-md);
  border-radius: var(--radius-card);
  background: var(--color-panel);
  color: var(--color-on-accent);
  border: var(--rule-hair) solid oklch(100% 0 0 / 0.06);
  box-shadow: 0 16px 36px oklch(22% 0.02 150 / 0.22);
}

.quest-card--lead {
  background: linear-gradient(160deg, var(--color-panel-2), var(--color-panel));
}

.quest-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs);
  margin-bottom: var(--space-2xs);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  color: var(--color-earn);
}

.quest-card__pf {
  font-weight: 700;
}

.quest-card__title {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 500;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-snug);
}

.quest-card__bars {
  display: grid;
  gap: 0.4rem;
}

.quest-bar {
  display: block;
  height: 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--color-slot);
  overflow: hidden;
}

.quest-bar::after {
  content: "";
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
}

.quest-bar.is-filled::after,
.quest-bar.is-partial::after {
  width: calc(var(--fill, 1) * 100%);
  background: var(--color-accent-mark);
  animation: bar-fill var(--dur-long) var(--ease-out) both;
}

.quest-card__earn {
  margin: var(--space-sm) 0 0;
  color: var(--color-earn);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
}

.quest-card__slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
}

.quest-slot {
  aspect-ratio: 1;
  border-radius: 0.35rem;
  background: var(--color-slot);
}

.quest-slot.is-done {
  background: color-mix(in srgb, var(--color-accent-mark) 55%, var(--color-slot));
  animation: slot-in var(--dur-long) var(--ease-out) both;
}

.quest-slot.is-today {
  background: var(--color-accent-mark);
  animation: slot-in var(--dur-long) var(--ease-out) 80ms both;
}

@keyframes bar-fill {
  from {
    width: 0;
    opacity: 0.4;
  }
}

@keyframes slot-in {
  from {
    opacity: 0.35;
    transform: scaleY(0.6);
  }
}

.wash {
  position: absolute;
  inset: auto 0 0 0;
  height: 58%;
  background: linear-gradient(
    to top,
    var(--color-paper) 0%,
    var(--color-paper) 34%,
    var(--color-paper-clear) 100%
  );
  pointer-events: none;
}

.hero-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: end;
  justify-items: start;
  width: 100%;
  min-width: 0;
  padding:
    max(5.5rem, env(safe-area-inset-top))
    var(--page-gutter)
    max(var(--space-xl), env(safe-area-inset-bottom));
}

.hero-copy {
  position: relative;
  min-width: 0;
  max-width: 24rem;
}

.hero-shot {
  justify-self: center;
  width: min(13.5rem, 58vw);
  max-width: 13.5rem;
  margin: 0;
}

.shot-plain img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--rule-hair) solid var(--color-rule);
}

@media (min-width: 48rem) {
  .hero-stage {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: var(--space-2xl);
    padding-bottom: max(var(--space-2xl), env(safe-area-inset-bottom));
  }

  .quest-field__panel {
    width: min(24rem, 38vw);
  }

  .hero-shot {
    justify-self: end;
    width: min(15.5rem, 28vw);
    max-width: 15.5rem;
  }
}

@media (max-width: 36rem) {
  .quest-field__panel {
    opacity: 0.55;
    transform: scale(0.92);
    transform-origin: top right;
  }
}

.caption {
  margin: 0 0 var(--space-xs);
  color: var(--color-muted);
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  line-height: var(--lh-snug);
}

h1 {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 500;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-tight);
}

h1.brand-logo {
  font-family: var(--font-logo);
  font-weight: 700;
  letter-spacing: var(--tracking-logo);
}

.hero-lede {
  margin: var(--space-sm) 0 0;
  max-width: 28ch;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  line-height: var(--lh-snug);
}

.store-badge {
  margin: var(--space-md) 0 0;
  padding: 0.25rem 0;
}

.store-badge a {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.store-badge img {
  display: block;
  width: auto;
  height: 3.75rem;
  max-width: 100%;
}

.store-badge--on-band {
  margin-top: var(--space-sm);
}

.break {
  height: 0.375rem;
  margin: 0;
  border: 0;
  background: var(--color-accent);
}

.sheet {
  max-width: 46rem;
  min-width: 0;
  padding: var(--space-3xl) var(--page-gutter) var(--space-2xl);
}

.head-hang {
  margin: 0 0 var(--space-lg);
  padding: 0;
}

h2 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: var(--text-display-s);
  font-weight: 500;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-snug);
  color: var(--color-accent);
}

.lede {
  max-width: var(--measure);
  margin: 0 0 var(--space-xl);
}

.spec {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: proportional-nums;
}

.spec th,
.spec td {
  padding: var(--space-sm) var(--space-md) var(--space-sm) 0;
  border-bottom: var(--rule-hair) solid var(--color-rule);
  vertical-align: top;
  text-align: left;
}

.spec th {
  width: 6.5rem;
  color: var(--color-ink);
  font-weight: 500;
  white-space: nowrap;
}

.spec td {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--color-ink-2);
}

.note {
  max-width: var(--measure);
  margin: var(--space-lg) 0 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.more {
  margin: var(--space-xl) 0 0;
}

.more a {
  font-family: var(--font-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-decoration: none;
}

.foot-band {
  padding: var(--space-xl) var(--page-gutter) max(var(--space-2xl), env(safe-area-inset-bottom));
  background: var(--color-band);
  color: var(--color-on-accent);
}

.foot-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  max-width: 46rem;
}

.foot-band__brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.foot-band__brand {
  color: var(--color-on-accent);
  text-decoration: none;
}

.foot-band__brand .brand-lockup__text {
  color: var(--color-on-accent);
}

.foot-band__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: min(100%, 14rem);
  padding: var(--space-lg);
  border-radius: var(--radius-card);
  background: var(--color-on-accent);
}

.foot-band__card a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-accent-ink);
  font-family: var(--font-label);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-decoration: none;
  white-space: nowrap;
}

.foot-band__card a::before {
  content: "→";
  font-size: 0.75em;
}

@media (hover: hover) and (pointer: fine) {
  .foot-band__card a:hover {
    color: var(--color-ink);
  }
}

.foot-band__credit {
  margin: var(--space-lg) 0 0;
  color: color-mix(in oklch, var(--color-on-accent) 85%, transparent);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
}

@media (max-width: 36rem) {
  .spec,
  .spec tbody,
  .spec tr,
  .spec th,
  .spec td {
    display: block;
    width: auto;
  }

  .spec tr {
    padding: var(--space-sm) 0;
    border-bottom: var(--rule-hair) solid var(--color-rule);
  }

  .spec th,
  .spec td {
    padding: 0;
    border-bottom: 0;
  }

  .spec th {
    margin-bottom: var(--space-3xs);
  }

  .foot-band__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .foot-band__brand-block {
    align-items: center;
  }

  .foot-band__card {
    width: 100%;
    align-items: flex-start;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  a:active {
    opacity: 1;
  }

  .quest-bar.is-filled::after,
  .quest-bar.is-partial::after,
  .quest-slot.is-done,
  .quest-slot.is-today {
    animation: fade-in 200ms ease both;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}
