/* ============================================================
   Lumen — Design tokens (modeled on Apple's design language)
   ============================================================ */
:root {
  /* Brand & Accent */
  --color-primary:           #0066cc;
  --color-primary-focus:     #0071e3;
  --color-primary-on-dark:   #2997ff;

  /* Surface */
  --color-canvas:            #ffffff;
  --color-canvas-parchment:  #f5f5f7;
  --color-surface-pearl:     #fafafc;
  --color-surface-tile-1:    #272729;
  --color-surface-tile-2:    #2a2a2c;
  --color-surface-tile-3:    #252527;
  --color-surface-black:     #000000;
  --color-chip-translucent:  rgba(210, 210, 215, 0.64);

  /* Text */
  --color-ink:               #1d1d1f;
  --color-body:              #1d1d1f;
  --color-body-on-dark:      #ffffff;
  --color-body-muted:        #cccccc;
  --color-ink-muted-80:      #333333;
  --color-ink-muted-48:      #7a7a7a;

  /* Hairlines */
  --color-divider-soft:      #f0f0f0;
  --color-hairline:          #e0e0e0;

  /* Spacing (8px base) */
  --space-xxs: 4px;
  --space-xs:  8px;
  --space-sm:  12px;
  --space-md:  17px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-xxl: 48px;
  --space-section: 80px;

  /* Radius */
  --r-none: 0;
  --r-xs:   5px;
  --r-sm:   8px;
  --r-md:   11px;
  --r-lg:   18px;
  --r-pill: 9999px;
  --r-full: 50%;

  /* Type families. SF Pro is Apple's proprietary face;
     resolves to it on macOS / iOS / Safari via system-ui,
     -apple-system. Inter (variable) is the documented
     fallback for non-Apple platforms. */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter var", "Inter", system-ui, sans-serif;
  --font-text:    -apple-system, BlinkMacSystemFont, "SF Pro Text",    "Inter var", "Inter", system-ui, sans-serif;

  /* The single drop-shadow in the system, reserved for product imagery */
  --shadow-product: 3px 5px 30px 0 rgba(0, 0, 0, 0.22);

  /* Frosted-glass baseline for sticky surfaces */
  --frost: saturate(180%) blur(20px);

  /* Layout */
  --content-max:  1440px;
  --content-text: 980px;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--color-body);
  background: var(--color-canvas-parchment);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss03", "cv11";
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: transparent; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea { font: inherit; color: inherit; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-ink); color: var(--color-body-on-dark);
  padding: 8px 12px; border-radius: var(--r-sm); z-index: 999;
}
.skip-link:focus { left: var(--space-md); top: var(--space-md); }

/* ============================================================
   Typography utilities
   ============================================================ */
.hero-display {
  font-family: var(--font-display);
  font-size: 56px; font-weight: 600; line-height: 1.07;
  letter-spacing: -0.28px;
  margin: 0 0 var(--space-md);
}
.display-lg {
  font-family: var(--font-display);
  font-size: 40px; font-weight: 600; line-height: 1.10;
  letter-spacing: 0;
  margin: 0 0 var(--space-md);
}
.display-md {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 600; line-height: 1.20;
  letter-spacing: -0.374px;
  margin: 0 0 var(--space-md);
}
.lead {
  font-size: 28px; font-weight: 400; line-height: 1.18;
  letter-spacing: 0.196px;
  margin: 0 0 var(--space-lg);
}
.lead-airy {
  font-size: 24px; font-weight: 300; line-height: 1.5;
  letter-spacing: 0; margin: 0 0 var(--space-lg);
}
.tagline {
  font-size: 21px; font-weight: 600; line-height: 1.19;
  letter-spacing: 0.231px;
  margin: 0 0 var(--space-sm);
}
.body {
  font-size: 17px; font-weight: 400; line-height: 1.47;
  letter-spacing: -0.374px;
  margin: 0;
}
.caption {
  font-size: 14px; font-weight: 400; line-height: 1.43;
  letter-spacing: -0.224px; margin: 0;
}
.caption-strong {
  font-size: 14px; font-weight: 600; line-height: 1.29;
  letter-spacing: -0.224px; margin: 0;
}
.eyebrow {
  font-family: var(--font-text);
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.224px; line-height: 1.29;
  color: var(--color-primary);
  margin: 0 0 var(--space-sm);
  text-transform: none;
}
.eyebrow--on-dark { color: var(--color-primary-on-dark); }
.hero-pricing {
  font-size: 17px; font-weight: 400; line-height: 1.47;
  letter-spacing: -0.374px;
  color: var(--color-ink-muted-80);
  margin: 0 0 var(--space-xl);
}

.lead--on-dark { color: var(--color-body-muted); }
.display-lg--on-dark, .display-md--on-dark { color: var(--color-body-on-dark); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-text);
  font-size: 17px; font-weight: 400; line-height: 1;
  letter-spacing: -0.374px;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform 80ms ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.95); }
.btn:focus-visible {
  outline: 2px solid var(--color-primary-focus);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover { background: #0077e6; color: #fff; }

.btn--ghost-pill {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 10px 21px; /* compensate for 1px border */
}
.btn--ghost-pill:hover { background: rgba(0, 102, 204, 0.06); }

.btn--small {
  font-size: 14px; padding: 6px 14px; line-height: 1.29;
  letter-spacing: -0.224px;
}

.btn--dark-utility {
  background: var(--color-ink); color: #fff;
  font-size: 14px; font-weight: 400;
  letter-spacing: -0.224px;
  padding: 8px 15px;
  border-radius: var(--r-sm);
}

.link {
  color: var(--color-primary);
  font-size: 17px; font-weight: 400; line-height: 1.47;
  letter-spacing: -0.374px;
}
.link--on-dark { color: var(--color-primary-on-dark); }
.link:hover { text-decoration: underline; }

/* ============================================================
   Global Nav
   ============================================================ */
.global-nav {
  position: sticky; top: 0; z-index: 100;
  height: 44px;
  background: var(--color-surface-black);
  color: var(--color-body-on-dark);
  font-family: var(--font-text);
}
.global-nav__inner {
  height: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: var(--space-md);
}
.global-nav__brand { color: inherit; display: inline-flex; align-items: center; }
.global-nav__brand:hover { text-decoration: none; }
.global-nav__menu { color: inherit; display: none; }
.global-nav__list {
  display: flex; align-items: center;
  gap: 26px;
}
.global-nav__list a {
  color: inherit;
  font-size: 12px; font-weight: 400; line-height: 1;
  letter-spacing: -0.12px;
  opacity: 0.84;
}
.global-nav__list a:hover { opacity: 1; text-decoration: none; }
.global-nav__actions { display: flex; align-items: center; gap: 22px; justify-self: end; }
.global-nav__icon {
  color: inherit; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; opacity: 0.84;
}
.global-nav__icon:hover { opacity: 1; }
.global-nav__icon:active { transform: scale(0.95); }

@media (max-width: 833px) {
  .global-nav__inner {
    grid-template-columns: auto 1fr auto;
    justify-items: center;
  }
  .global-nav__menu { display: inline-flex; align-items: center; justify-self: start; }
  .global-nav__list { display: none; }
  .global-nav__brand { justify-self: center; }
  .global-nav__actions { justify-self: end; gap: 16px; }
}

/* ============================================================
   Sub Nav (frosted)
   ============================================================ */
.sub-nav {
  position: sticky; top: 44px; z-index: 90;
  height: 52px;
  background: rgba(245, 245, 247, 0.8);
  -webkit-backdrop-filter: var(--frost);
          backdrop-filter: var(--frost);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.sub-nav__inner {
  height: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex; align-items: center; gap: var(--space-xl);
}
.sub-nav__title {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 600; line-height: 1.19;
  letter-spacing: 0.231px;
  color: var(--color-ink);
}
.sub-nav__title:hover { text-decoration: none; }
.sub-nav__list {
  display: flex; align-items: center; gap: var(--space-lg);
  margin-left: auto;
}
.sub-nav__list a {
  color: var(--color-ink-muted-80);
  font-size: 14px; font-weight: 400;
  letter-spacing: -0.224px;
  line-height: 1.29;
}
.sub-nav__list a:hover { color: var(--color-ink); text-decoration: none; }
.sub-nav__cta { display: flex; align-items: center; gap: var(--space-md); }
.sub-nav__price { font-size: 14px; color: var(--color-ink-muted-80); letter-spacing: -0.224px; }

@media (max-width: 833px) {
  .sub-nav__list { display: none; }
  .sub-nav__cta { margin-left: auto; }
  .sub-nav__price { display: none; }
}

/* ============================================================
   Tiles (full-bleed sections)
   ============================================================ */
.tile {
  width: 100%;
  padding: var(--space-section) var(--space-lg);
  text-align: center;
  position: relative;
}
.tile--light      { background: var(--color-canvas);          color: var(--color-ink); }
.tile--parchment  { background: var(--color-canvas-parchment); color: var(--color-ink); }
.tile--dark       { background: var(--color-surface-tile-1);  color: var(--color-body-on-dark); }
.tile--dark-2     { background: var(--color-surface-tile-2);  color: var(--color-body-on-dark); }
.tile--dark-3     { background: var(--color-surface-tile-3);  color: var(--color-body-on-dark); }

.tile__copy {
  max-width: var(--content-text);
  margin: 0 auto;
}
.tile__copy--narrow { max-width: 760px; text-align: left; }
.tile__copy--centered { text-align: center; }

.cta-row {
  display: flex; flex-wrap: wrap; gap: var(--space-md);
  justify-content: center; align-items: center;
  margin-top: var(--space-md);
}
.cta-row--centered { justify-content: center; }
.tile__copy--narrow .cta-row { justify-content: flex-start; }

/* Hero specifics */
.tile--hero { padding-bottom: 0; }
.tile__product {
  margin: var(--space-xxl) auto 0;
  max-width: 720px;
  filter: drop-shadow(var(--shadow-product));
}
.tile__product--halo    { max-width: 580px; }
.tile__product--strip   { max-width: 1100px; padding: 40px 0; }
.tile__product--lantern { max-width: 360px; margin-top: var(--space-xl); }

/* Editorial dark-2 */
.tile--dark-2 { padding-top: 96px; padding-bottom: 96px; }
.tile--dark-2 .tile__copy--narrow { margin-left: auto; margin-right: auto; }

/* Split tile */
.tile--split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xxl);
  text-align: left;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--space-xxl);
  padding-right: var(--space-xxl);
}
.split-card {
  display: flex; flex-direction: column;
  gap: var(--space-md);
}
.split-card .display-md { margin-bottom: 0; }
@media (max-width: 833px) {
  .tile--split {
    grid-template-columns: 1fr;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
    gap: var(--space-xl);
  }
}

/* ============================================================
   Store header + Search
   ============================================================ */
.tile--store-section { padding-top: 96px; padding-bottom: 96px; }
.store-header {
  max-width: var(--content-max);
  margin: 0 auto var(--space-xxl);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--space-lg);
  text-align: left;
  padding: 0 var(--space-md);
}
.store-header .display-lg { margin: 0; }
.store-header .tagline {
  color: var(--color-ink-muted-80);
  font-size: 21px;
  margin-bottom: var(--space-xs);
}

.search-input {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  background: var(--color-canvas);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--r-pill);
  padding: 0 20px;
  height: 44px;
  min-width: 280px;
  color: var(--color-ink-muted-48);
  transition: border-color 120ms;
}
.search-input:focus-within {
  border-color: var(--color-primary-focus);
  color: var(--color-ink);
}
.search-input input {
  flex: 1;
  border: 0; outline: 0; background: transparent;
  font-size: 17px;
  letter-spacing: -0.374px;
  color: var(--color-ink);
}
.search-input input::placeholder { color: var(--color-ink-muted-48); }

@media (max-width: 833px) {
  .store-header { grid-template-columns: 1fr; }
  .search-input { width: 100%; min-width: 0; }
}

/* ============================================================
   Store grid
   ============================================================ */
.store-grid {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  text-align: left;
}
.store-card {
  background: var(--color-canvas);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-lg);
  padding: var(--space-lg);
  display: flex; flex-direction: column;
  gap: var(--space-xs);
  transition: transform 200ms ease;
}
.store-card:hover { transform: translateY(-2px); }
.store-card .body { color: var(--color-ink-muted-80); }
.store-card .link { margin-top: var(--space-xs); }

.store-card__art {
  background: var(--color-canvas-parchment);
  border-radius: var(--r-sm);
  aspect-ratio: 1 / 1;
  margin-bottom: var(--space-md);
  display: grid; place-items: center;
  padding: 24px;
}
.store-card__art svg { width: 80%; height: 80%; }

@media (max-width: 1068px) {
  .store-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .store-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--color-canvas-parchment);
  color: var(--color-ink-muted-80);
  padding: 64px var(--space-lg) 24px;
  font-size: 12px;
  letter-spacing: -0.12px;
}
.footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}
.footer__lede {
  font-size: 12px; line-height: 1.5;
  color: var(--color-ink-muted-48);
  max-width: 740px;
  margin: 0 0 32px;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  padding: 24px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.footer__col h4 {
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.224px; line-height: 1.29;
  color: var(--color-ink);
  margin: 0 0 var(--space-xs);
}
.footer__col ul li a {
  color: var(--color-ink-muted-80);
  font-size: 12px; font-weight: 400;
  letter-spacing: -0.12px;
  line-height: 2.41;
}
.footer__col ul li a:hover {
  color: var(--color-ink);
  text-decoration: underline;
}
.footer__rule {
  display: block;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 24px 0 16px;
  border: 0;
}
.footer__legal {
  display: flex; flex-wrap: wrap; gap: var(--space-md);
  justify-content: space-between; align-items: center;
  font-size: 12px; line-height: 1.5;
  color: var(--color-ink-muted-48);
}
.footer__legal p { margin: 0; max-width: 740px; }
.footer__legal a { color: var(--color-ink-muted-48); }
.footer__legal a:hover { color: var(--color-ink-muted-80); }
.footer__legal ul { display: flex; flex-wrap: wrap; gap: var(--space-md); }

@media (max-width: 1068px) {
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .footer__cols { grid-template-columns: 1fr; }
  .footer__legal { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Floating sticky bar
   ============================================================ */
.sticky-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  background: rgba(245, 245, 247, 0.8);
  -webkit-backdrop-filter: var(--frost);
          backdrop-filter: var(--frost);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  transform: translateY(110%);
  transition: transform 320ms ease;
}
.sticky-bar.is-visible { transform: translateY(0); }
.sticky-bar__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 12px var(--space-xl);
  min-height: 64px;
  display: flex; align-items: center; gap: var(--space-md);
}
.sticky-bar__copy { flex: 1; min-width: 0; }
.sticky-bar__copy .caption { color: var(--color-ink-muted-48); }

@media (max-width: 640px) {
  .sticky-bar__inner { padding: 12px var(--space-md); }
}

/* ============================================================
   Responsive headline scaling
   ============================================================ */
@media (max-width: 1068px) {
  .hero-display { font-size: 40px; }
}
@media (max-width: 833px) {
  .tile { padding-left: var(--space-md); padding-right: var(--space-md); }
  .tile__copy--narrow { padding: 0 var(--space-md); }
}
@media (max-width: 640px) {
  .hero-display { font-size: 34px; }
  .display-lg   { font-size: 32px; }
  .display-md   { font-size: 26px; line-height: 1.25; }
  .lead         { font-size: 21px; }
  .lead-airy    { font-size: 19px; }
  .tile         { padding-top: 56px; padding-bottom: 56px; }
  .tile__product { margin-top: var(--space-xl); }
}
@media (max-width: 419px) {
  .hero-display { font-size: 28px; }
  .display-lg   { font-size: 28px; }
  .tile         { padding-top: 48px; padding-bottom: 48px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
