/* Rewardics marketing site · teal theme: shared stylesheet
   Plain CSS, no build step. Mirrors website-white/styles.css with the teal design tokens. */

:root {
  --bg: #F7F7F6;
  --panel: #FFFFFF;
  --panel-2: #F3F7F6;
  --text: #14171A;
  --muted: #5C6660;
  --steel: #8A9099;
  --border: rgba(20, 23, 26, .16);
  --accent: #14171A;
  --accent-hover: #333A42;
  --accent-rgb: 20, 23, 26;
  --amber: #E07A1F;
  --amber-rgb: 224, 122, 31;
  --globe-rgb: 224, 122, 31;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
details[open] .om-plus { transform: rotate(45deg); }

::selection { background: var(--accent); color: #fff; }

pre { margin: 0; font-family: 'JetBrains Mono', monospace; white-space: pre; overflow: auto; }

input, textarea, select { font-family: inherit; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #8A9099; }

/* Background flourishes */
.bg-glow { position: absolute; inset: 0; pointer-events: none; }
.bg-dots {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(#14171A 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .05;
}

/* Nav */
.nav-wrap { position: sticky; top: 18px; z-index: 60; padding: 0 24px; }
.nav {
  max-width: 1140px; margin: 0 auto; background: #FFFFFF; border-radius: 999px;
  padding: 12px 14px 12px 26px; display: flex; align-items: center; gap: 32px;
  box-shadow: 0 10px 30px rgba(20, 23, 26, .10);
}
.nav-logo {
  display: flex; align-items: center; gap: 9px; color: #14171A;
  font-family: Manrope, sans-serif; font-weight: 700;
  font-size: 19px; letter-spacing: -.02em;
}
.nav-links { flex: 1; display: flex; align-items: center; gap: 28px; }
.nav-link { color: #3A414D; font-size: 14.5px; font-weight: 500; }
.nav-link:hover { color: #14171A; }
.nav-link.is-active { color: #14171A; font-weight: 600; }
.nav-cta, .btn-primary {
  background: var(--accent); color: #fff; font-weight: 600; border-radius: 999px;
  border: none; cursor: pointer; font-family: inherit; display: inline-block;
}
.nav-cta { font-size: 14.5px; padding: 12px 22px; }
.nav-cta:hover, .btn-primary:hover { background: var(--accent-hover); }

.btn-primary { font-size: 15.5px; padding: 16px 30px; }
.btn-outline {
  border: 1px solid rgba(20, 23, 26, .16); color: var(--text); font-size: 15.5px;
  font-weight: 600; padding: 16px 30px; border-radius: 999px; display: inline-block;
}
.btn-outline:hover { border-color: var(--steel); }

.btn-outline-light {
  border: 1px solid rgba(255, 255, 255, .35); color: #F4F2ED; font-size: 15.5px;
  font-weight: 600; padding: 16px 30px; border-radius: 999px; display: inline-block;
}
.btn-outline-light:hover { border-color: #4FE0BF; color: #4FE0BF; }

.footer-link { color: var(--muted); }
.footer-link:hover { color: var(--text); }

.link-arrow:hover { color: var(--accent-hover); }

footer.site-footer {
  position: relative; border-top: 1px solid var(--border); background: var(--bg);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 44px 32px; display: flex;
  justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.footer-logo {
  display: flex; align-items: center; gap: 9px; font-family: Manrope, sans-serif;
  font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: var(--text);
}
.footer-nav { display: flex; gap: 26px; font-size: 14px; }
.footer-fine { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--muted); }

/* Layout helpers (structural + responsive; colors/spacing stay inline per-element) */
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
/* Product cutout photos (white-background renders): show the whole product,
   never crop it, and match the tile background to the photo's own white
   canvas so there's no visible seam. */
.product-tile { background: #FFFFFF; position: relative; overflow: hidden; }
.product-tile img { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain; object-position: center; display: block; }
.split-designer { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: stretch; }
.split-api { display: grid; grid-template-columns: 210px 1fr; gap: 48px; align-items: start; }
.split-contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: start; }

/* Hero globe: fulfilment hub shipping labelled product packages to destination cities.
   Light "day" theme so it sits on the light page. */
.globe {
  background:
    radial-gradient(circle at 32% 24%, rgba(var(--globe-rgb), .38), transparent 46%),
    radial-gradient(circle, transparent 72%, rgba(20, 23, 26, .16) 91%, rgba(20, 23, 26, .4) 100%),
    radial-gradient(circle at 74% 82%, rgba(20, 23, 26, .22), transparent 66%),
    radial-gradient(circle, #FFFFFF 0%, #E7F1EC 42%, #C2D8CF 78%, #9BBCB0 100%);
  border: 1px solid rgba(20, 23, 26, .1);
  /* The big soft outer glow (last two shadows) is what keeps the sphere from reading as a
     circle with a ruler-straight edge dropped onto empty page — it bleeds the sphere's
     colour out into the dead space around it so the boundary dissolves instead of cutting.
     The second background layer above (limb darkening: a dark ring just inside the true
     edge) is what actually sells "sphere" rather than "flat glowing disc" — real spheres/
     planets darken toward their visible limb because we're seeing that surface at a grazing
     angle; a flat circle has no such falloff. */
  box-shadow:
    inset 0 0 95px rgba(20, 23, 26, .12),
    inset 0 -55px 110px rgba(var(--globe-rgb), .16),
    0 34px 90px rgba(20, 23, 26, .18),
    0 0 150px 40px rgba(194, 216, 207, .5),
    0 0 320px 90px rgba(194, 216, 207, .28);
}
/* Wireframe meridian/parallel lines (the classic globe-icon cross-section: a circle plus a
   couple of vertical + horizontal ellipses through the centre) — cheap to draw, no geo
   projection needed, and instantly reads as "sphere" rather than "dotted circle". Static
   (doesn't spin with the dot texture): redrawing true rotating meridians would need per-frame
   ellipse-width recalculation, which is real complexity for a decorative background. */
.globe-grid { position: absolute; inset: 0; }
.globe-grid line, .globe-grid ellipse, .globe-grid circle {
  fill: none; stroke: rgba(20, 23, 26, .16); stroke-width: 1px; vector-effect: non-scaling-stroke;
}
.globe-grid circle.rim { stroke: rgba(20, 23, 26, .3); stroke-width: 1.4px; }
/* Grid dot texture, faded before it reaches the sphere's edge.
   The dots live on a translated child rather than an animated background-position:
   background-position isn't a compositor property, so animating it on a sphere this
   large (up to ~1900px across) forced a full repaint of the masked layer every frame,
   which is what read as slow/stuttery. Sliding a transform instead runs on the
   compositor thread, independent of layer size. */
.globe-texture {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 84%, transparent 99%);
  mask-image: radial-gradient(circle closest-side, #000 84%, transparent 99%);
}
.globe-texture::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 480px);
  background-image: radial-gradient(rgba(var(--globe-rgb), .42) 1.8px, transparent 1.8px);
  background-size: 24px 24px; opacity: .8;
  animation: globeSpin 44s linear infinite;
  will-change: transform;
}
/* Hemisphere "D" dome variant: flat left edge, curved right, fills full height */
.globe-dome {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 0% 50%, rgba(var(--accent-rgb), .28), transparent 64%),
    radial-gradient(circle at 0% 50%, #16241F 0%, #0F1715 55%, #0B0E0D 100%);
  box-shadow: inset -30px 0 70px rgba(0, 0, 0, .5);
}
.globe-dome::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(#3E8C7C 1.4px, transparent 1.4px);
  background-size: 24px 24px; opacity: .3;
  animation: globeSpinBg 40s linear infinite;
}
@keyframes globeSpinBg { from { background-position: 0 0; } to { background-position: -480px 0; } }
@keyframes globeSpin { from { transform: translateX(0); } to { transform: translateX(-480px); } }
@keyframes cityPulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .45); }
  70% { box-shadow: 0 0 0 14px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}
/* All 6 routes fan out from the same hub point in a fairly tight cluster, so with 6 cards
   flying at once (the old approach) there's nowhere for them to go without piling up on
   top of each other — staggering *when* they launch doesn't fix that if they're all still
   on screen simultaneously most of the time. Instead this is a relay: each parcel only
   moves and is visible during its own 1/6 slice of one shared, longer cycle (see the
   RELAY_CYCLE/FLIGHT_TIME split in script.js), then sits fully hidden until its turn comes
   back around — so only one is ever in flight at a time and they can never overlap. */
@keyframes fly {
  0% { offset-distance: 0%; opacity: 0; transform: scale(.6); }
  1.5% { opacity: 1; transform: scale(1); }
  15% { opacity: 1; transform: scale(1); }
  16.6% { offset-distance: 100%; opacity: 0; transform: scale(.6); }
  100% { offset-distance: 100%; opacity: 0; }
}
.route-line { fill: none; stroke: rgba(var(--accent-rgb), .42); stroke-width: 1.5; stroke-dasharray: 2 6; }
.city { position: absolute; transform: translate(-50%, -50%); text-align: center; }
.city .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin: 0 auto;
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .45); animation: cityPulse 2.4s ease-out infinite;
}
.city .label {
  margin-top: 5px; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: #14171A;
  background: rgba(255, 255, 255, .92); border: 1px solid rgba(20, 23, 26, .10);
  border-radius: 6px; padding: 2px 6px; white-space: nowrap;
}
.hub { position: absolute; transform: translate(-50%, -50%); text-align: center; }
.hub .mark {
  width: 16px; height: 16px; border-radius: 5px; background: var(--accent); margin: 0 auto;
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .5); animation: cityPulse 2.4s ease-out infinite;
}
.hub .label {
  margin-top: 6px; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: #FFFFFF;
  background: var(--accent); border-radius: 6px; padding: 2px 7px; white-space: nowrap; font-weight: 700;
}
.parcel { position: absolute; top: 0; left: 0; offset-rotate: 0deg; z-index: 2; }
.pkg {
  display: flex; align-items: center; gap: 10px; background: #FFFFFF; border-radius: 12px;
  padding: 6px 14px 6px 6px; box-shadow: 0 10px 26px rgba(20, 23, 26, .18);
  border: 1px solid rgba(20, 23, 26, .12); white-space: nowrap;
}
.pkg .thumb {
  width: 40px; height: 40px; border-radius: 9px; overflow: hidden; background: #FFFFFF;
  flex: none; display: flex; align-items: center; justify-content: center;
}
/* Cutout product photos aren't all square (the phone and watch shots are tall), and
   cropping to fill this box like a cover photo chops their tops/bottoms off — same
   "never crop a cutout" rule as .product-tile, just inset less since this box is tiny. */
.pkg .thumb img { width: 84%; height: 84%; object-fit: contain; display: block; }
.pkg .thumb .emoji { font-size: 24px; line-height: 1; }
.pkg .meta { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.pkg .name { font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; color: #14171A; }
.pkg .dest { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .03em; color: var(--accent); }

@media (max-width: 860px) {
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .split-designer { grid-template-columns: 1fr; }
  .split-api { grid-template-columns: 1fr; }
  .split-api aside { position: static !important; }
  .split-contact { grid-template-columns: 1fr; }
  .hero-title { font-size: 40px !important; }
  .section-title { font-size: 32px !important; }
  .vip-banner { height: 420px !important; }
  .hero-full { min-height: 0 !important; padding: 44px 0 56px; margin-top: 0 !important; }
  .hero-copy { padding: 24px !important; text-align: center !important; }
  .hero-ctas { justify-content: center !important; }
  /* Hero globe doesn't fit cleanly at phone widths at all (no room for it beside
     the stacked, centred copy) — script.js already skips building it below this
     breakpoint; this is just the no-JS/pre-layout safety net. */
  #globe-stage { display: none !important; }

  /* API reference tables: fixed px label columns (170px / 200px+110px) overflow
     a phone-width content area, so stack them into a simple label-over-value list. */
  .lifecycle-row { grid-template-columns: 1fr !important; gap: 4px !important; }
  .param-row { grid-template-columns: 1fr !important; gap: 3px !important; padding-bottom: 10px !important; }

  /* The 3D-tilted store mockup only reads right when it has room beside the
     designer panel; once it stacks full-width on mobile, flatten it. */
  .store-frame { transform: none !important; box-shadow: 0 20px 46px rgba(20, 23, 26, .22) !important; }
  .fixed-reward-panel { grid-template-columns: 1fr !important; text-align: center; }
  .fixed-reward-panel .store-thumb { margin: 0 auto; }
}

@media (max-width: 480px) {
  .grid-4, .grid-5 { grid-template-columns: 1fr !important; }
}

/* Nav: logo + links + CTA no longer fit a phone-width bar, so drop the link
   row and keep just the logo and the primary CTA. */
@media (max-width: 640px) {
  .nav-wrap { top: 12px; padding: 0 16px; }
  .nav { padding: 10px 10px 10px 16px; gap: 12px; }
  .nav-links { display: none; }
  .nav-logo { font-size: 17px; }
  .nav-cta { font-size: 13.5px; padding: 10px 16px; }
}

/* Store designer widget */
.swatch {
  width: 30px; height: 30px; border-radius: 999px; border: none; cursor: pointer; padding: 0;
}
.swatch.is-selected { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }

.style-option, .mode-option {
  text-align: left; font-family: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--muted);
}
.style-option { font-size: 14px; padding: 12px 14px; border-radius: 10px; width: 100%; }
.mode-option { flex: 1; font-size: 13px; padding: 11px; border-radius: 999px; }
.style-option.is-selected, .mode-option.is-selected { background: var(--text); color: var(--bg); }

.store-preview-card {
  --sc: #00A88A; --sr: 12px; --sh: #FFFFFF; --shf: #14171A; --smk: #00A88A;
}
.store-item { border: 1px solid #E7E4DD; border-radius: var(--sr); padding: 14px; background: #FFFFFF; }
.store-item.is-selected { border: 2px solid var(--sc); position: relative; }
.store-header { background: var(--sh); color: var(--shf); }
.store-mark { background: var(--smk); }
.store-thumb { border-radius: calc(var(--sr) - 4px); }
.store-cta { background: var(--sc); }
.store-check { background: var(--sc); }
.store-selected-label { color: var(--sc); }

[data-mode-panel] { display: none; }
[data-mode-panel].is-active { display: block; }
[data-mode-panel].is-active.grid-mode { display: grid; }

/* Catalog page */
.catalog-card {
  background: #FFFFFF; border: 1px solid rgba(20, 23, 26, .16); border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column;
}
.catalog-thumb { height: 190px; border-radius: 12px; border: 1px solid rgba(20, 23, 26, .12); }
#catalog-search:focus, #catalog-category:focus, #catalog-tier:focus, #catalog-sort:focus { border-color: var(--text); }

/* Placeholder tile for catalog items that don't have real photography yet: a diagonal
   stripe swatch with a "photo · <item name>" caption pulled straight from the data
   attribute, so no per-item placeholder markup is needed. */
.catalog-thumb-empty {
  background-image: repeating-linear-gradient(45deg, rgba(20, 23, 26, .07) 0 10px, rgba(20, 23, 26, .02) 10px 20px);
  background-color: var(--panel-2);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px;
}
.catalog-thumb-empty::after {
  content: "photo · " attr(data-fallback-name);
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted);
  background: rgba(255, 255, 255, .9); border-radius: 6px; padding: 3px 8px;
}

.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: inline-flex; gap: 10px; white-space: nowrap; animation: marquee-scroll 24s linear infinite; }
.marquee-track.product-track { gap: 22px; animation-duration: 46s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.product-card { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; white-space: normal; }
.product-card-label { font-size: 13px; font-weight: 600; color: #14171A; white-space: nowrap; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Word rotator: stacks each word in the same grid cell so the box auto-sizes
   to the widest option, then fades/slides one into view at a time. */
.word-rotator { display: inline-grid; overflow: hidden; vertical-align: bottom; font-weight: 800; }
.word-rotator span {
  grid-area: 1 / 1; opacity: 0; white-space: nowrap;
  animation: word-rotate 8s ease-in-out infinite;
}
.word-rotator span:nth-child(1) { animation-delay: 0s; }
.word-rotator span:nth-child(2) { animation-delay: 2s; }
.word-rotator span:nth-child(3) { animation-delay: 4s; }
.word-rotator span:nth-child(4) { animation-delay: 6s; }
@keyframes word-rotate {
  0%, 2% { opacity: 0; transform: translateY(10px); }
  6%, 19% { opacity: 1; transform: translateY(0); }
  23%, 100% { opacity: 0; transform: translateY(-10px); }
}
