/* =========================================================================
   Cuploop — shared design system
   Extracted from the original single-page build and extended for a
   full multi-page site (forms, accordions, prose, filters, mobile nav).
   ========================================================================= */

:root {
  --cream: #F4EFE3;
  --cream-deep: #EDE7D7;
  --forest-900: #172620;
  --forest-800: #1F3326;
  --forest-700: #28402F;
  --forest-500: #3F5E47;
  --sage-300: #BBC8A4;
  --sage-200: #D5DEC2;
  --sage-100: #E8EBDA;
  --ink-900: #15201A;
  --ink-700: #2D3A33;
  --ink-500: #5B6760;
  --ink-400: #7C857F;
  --radius-lg: 22px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Anchored sections clear the sticky header */
[id] { scroll-margin-top: 92px; }

::selection { background: var(--sage-200); color: var(--forest-900); }

/* ---- Typography ---- */
.h-display {
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.035em;
  line-height: 0.98;
  font-weight: 600;
}
.h-section {
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.05;
  font-weight: 600;
}
.body-relaxed { line-height: 1.7; color: var(--ink-700); }

.bg-cream { background: var(--cream); }
.bg-cream-deep { background: var(--cream-deep); }

/* ---- Buttons ---- */
.btn-pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  will-change: transform;
}
.btn-pill:focus-visible { outline: 2px solid var(--forest-500); outline-offset: 3px; }
.btn-pill:active { transform: translateY(1px) scale(0.99); }

.btn-primary { background: var(--forest-800); color: #F0EBDD; border: 1px solid var(--forest-800); }
.btn-primary:hover { background: var(--forest-900); transform: translateY(-1px); }

.btn-secondary { background: transparent; color: var(--forest-800); border: 1px solid var(--forest-800); }
.btn-secondary:hover { background: var(--forest-800); color: var(--cream); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--ink-900); border: 1px solid rgba(21,32,26,0.15); }
.btn-ghost:hover { background: rgba(21,32,26,0.04); }

.btn-block { width: 100%; justify-content: center; }

/* ---- Cards ---- */
.card {
  background: #FBF8EE;
  border: 1px solid rgba(21,32,26,0.06);
  border-radius: var(--radius-lg);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(40,64,47,0.04),
    0 24px 48px -24px rgba(40,64,47,0.18),
    0 8px 16px -8px rgba(40,64,47,0.08);
}
.card-dark {
  background: linear-gradient(180deg, #28402F 0%, #1F3326 100%);
  border-radius: var(--radius-lg);
  color: #E7E1D0;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 30px 60px -30px rgba(23,38,32,0.5);
}

/* ---- Icon chip ---- */
.icon-chip {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: #E8EBDA;
  color: var(--forest-700);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-chip-dark { background: rgba(232,235,218,0.12); color: #D5DEC2; }

/* ---- Step circle ---- */
.step-circle {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: #FBF8EE;
  border: 1.5px solid var(--sage-200);
  color: var(--forest-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em;
}

/* ---- Nav link underline ---- */
.nav-link {
  position: relative;
  color: var(--ink-700);
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--forest-700);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover { color: var(--forest-800); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-link[aria-current="page"] { color: var(--forest-800); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* ---- Logo wordmark ---- */
.logo-mark {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.5rem;
  color: var(--forest-800);
  line-height: 1;
  display: inline-flex; align-items: baseline; gap: 1px;
}
.logo-loop {
  display: inline-block;
  width: 0.95em; height: 0.95em;
  border: 0.18em solid var(--forest-800);
  border-radius: 999px;
  transform: translateY(0.05em);
}
.logo-loop + .logo-loop { margin-left: -0.18em; }

/* ---- Hero image ---- */
.hero-image-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #2D4837;
}
.hero-image-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.18) 100%);
  pointer-events: none;
}
.hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Grain texture ---- */
.grain { position: relative; }
.grain::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.15 0 0 0 0 0.12 0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.07;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ---- CTA banner ---- */
.banner-cta { background: linear-gradient(180deg, #28402F 0%, #1F3326 100%); color: #E7E1D0; }

/* ---- App / store badge ---- */
.app-badge {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
  background: #15201A;
  color: #F0EBDD;
  border: 1px solid rgba(232,225,208,0.14);
  transition: transform 0.25s ease, background 0.2s ease;
}
.app-badge:hover { background: #0B1611; transform: translateY(-1px); }
.app-badge .label { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.app-badge .label .small { font-size: 0.6rem; opacity: 0.7; letter-spacing: 0.04em; }
.app-badge .label .big { font-size: 0.95rem; font-weight: 600; margin-top: 2px; letter-spacing: -0.01em; }

/* ---- Partner logo treatment ---- */
.partner {
  color: var(--ink-500);
  font-weight: 600;
  letter-spacing: -0.01em;
  filter: grayscale(1);
  opacity: 0.75;
  transition: opacity 0.25s ease, filter 0.25s ease;
  line-height: 1.05;
}
.partner:hover { opacity: 1; filter: grayscale(0); }

/* ---- Reveal on scroll ---- */
.reveal { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---- Layout helpers ---- */
.section-pad { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }
.section-pad-sm { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }
.container-x { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (min-width: 768px) {
  .container-x { padding-left: 40px; padding-right: 40px; }
  .container-narrow { padding-left: 40px; padding-right: 40px; }
}

/* ---- Eyebrow ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 600;
  color: var(--forest-700);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--forest-700); }
.eyebrow.center { justify-content: center; }

/* ---- Illustration cards (reused on multiple pages) ---- */
.phone-card { border-radius: var(--radius-lg); overflow: hidden; background: #C7C2B5; aspect-ratio: 5 / 4; position: relative; }
.phone-card img, .phone-card svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.lifestyle-card { border-radius: var(--radius-lg); overflow: hidden; background: #5E7548; aspect-ratio: 16 / 9; position: relative; flex: 1; }
.lifestyle-card svg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Loop timeline ---- */
.loop-grid { display: grid; grid-template-columns: 1fr; gap: 28px 8px; align-items: start; }
@media (min-width: 768px) {
  .loop-grid { grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; gap: 0 6px; }
}
.loop-step { padding: 0 6px; }
.loop-arrow { align-self: start; margin-top: 18px; color: #BBC8A4; display: none; }
@media (min-width: 768px) { .loop-arrow { display: inline-flex; } }

/* =========================================================================
   Header / navigation
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,247,227,0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.primary-nav { display: none; align-items: center; gap: 2.25rem; }
@media (min-width: 900px) { .primary-nav { display: flex; } }

.header-cta { display: none; }
@media (min-width: 900px) { .header-cta { display: inline-flex; } }

/* Mobile menu */
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid rgba(21,32,26,0.15); background: transparent; color: var(--forest-800);
  cursor: pointer;
}
@media (min-width: 900px) { .menu-toggle { display: none; } }

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: var(--cream);
}
.mobile-menu.open { display: block; }
.mobile-menu nav { display: flex; flex-direction: column; padding: 12px 0; }
.mobile-menu a.m-link {
  padding: 14px 24px; font-weight: 500; color: var(--ink-700);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.mobile-menu a.m-link[aria-current="page"] { color: var(--forest-800); background: rgba(40,64,47,0.04); }
.mobile-menu .m-cta { padding: 16px 24px; }

/* =========================================================================
   Inner-page hero / breadcrumb
   ========================================================================= */
.page-hero { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 72px); }
.breadcrumb { font-size: 0.78rem; color: var(--ink-500); display: flex; gap: 8px; align-items: center; }
.breadcrumb a:hover { color: var(--forest-800); }
.breadcrumb .sep { opacity: 0.5; }

.pill-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--sage-100); color: var(--forest-700);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.pill-soon {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(232,225,208,0.16); color: #D5DEC2;
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}

/* =========================================================================
   Stats
   ========================================================================= */
.stat-num {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  font-weight: 600; letter-spacing: -0.02em; color: var(--forest-800); line-height: 1;
}
.stat-label { font-size: 0.85rem; color: var(--ink-500); margin-top: 0.5rem; }

/* =========================================================================
   Forms
   ========================================================================= */
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.field-label { font-size: 0.82rem; font-weight: 600; color: var(--ink-700); }
.field-label .req { color: #9A5B45; }
.field-hint { font-size: 0.74rem; color: var(--ink-400); }

.input, .textarea, .select {
  width: 100%;
  font-family: inherit; font-size: 0.92rem; color: var(--ink-900);
  background: #FBF8EE;
  border: 1px solid rgba(21,32,26,0.14);
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.select { appearance: none; -webkit-appearance: none; background-image:
  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235B6760' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 0.85rem center; padding-right: 2.4rem; }
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--forest-500);
  box-shadow: 0 0 0 3px rgba(63,94,71,0.14);
  background: #fff;
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] {
  border-color: #B4583E; box-shadow: 0 0 0 3px rgba(180,88,62,0.12);
}
.field-error { font-size: 0.74rem; color: #9A5B45; min-height: 0; }

.checkbox-row { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.82rem; color: var(--ink-700); line-height: 1.5; }
.checkbox-row input { margin-top: 0.15rem; width: 16px; height: 16px; accent-color: var(--forest-700); flex-shrink: 0; }

/* Honeypot — visually hidden but available to bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { display: none; border-radius: 14px; padding: 1rem 1.1rem; font-size: 0.9rem; margin-bottom: 1.1rem; }
.form-status.show { display: block; }
.form-status.ok { background: var(--sage-100); color: var(--forest-800); border: 1px solid rgba(40,64,47,0.16); }
.form-status.err { background: #F6E7E0; color: #8A4B36; border: 1px solid rgba(138,75,54,0.2); }

.form-card { background: #FBF8EE; border: 1px solid rgba(21,32,26,0.07); border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.25rem); }

/* =========================================================================
   FAQ accordion (native details/summary)
   ========================================================================= */
.faq-item {
  background: #FBF8EE; border: 1px solid rgba(21,32,26,0.07);
  border-radius: 16px; margin-bottom: 0.7rem; overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.25rem; font-weight: 600; font-size: 0.98rem; color: var(--ink-900);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { transition: transform 0.25s ease; color: var(--forest-700); flex-shrink: 0; }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 1.25rem 1.2rem; color: var(--ink-700); line-height: 1.7; font-size: 0.9rem; }
.faq-item summary:focus-visible { outline: 2px solid var(--forest-500); outline-offset: -2px; }

/* =========================================================================
   Prose (legal pages)
   ========================================================================= */
.prose { color: var(--ink-700); line-height: 1.75; font-size: 0.95rem; }
.prose h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; letter-spacing: -0.02em;
  color: var(--forest-800); font-size: 1.35rem; margin: 2.4rem 0 0.85rem; }
.prose h3 { font-weight: 600; color: var(--ink-900); font-size: 1.05rem; margin: 1.6rem 0 0.6rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.45rem; }
.prose a { color: var(--forest-700); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--forest-900); }
.prose strong { color: var(--ink-900); }
.prose hr { border: none; border-top: 1px solid rgba(21,32,26,0.1); margin: 2rem 0; }
.legal-toc a { color: var(--ink-700); }
.legal-toc a:hover { color: var(--forest-800); }

/* =========================================================================
   Return-location filter list
   ========================================================================= */
.chip-filter {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.5rem 0.95rem; border-radius: 999px;
  background: #FBF8EE; border: 1px solid rgba(21,32,26,0.12);
  font-size: 0.82rem; font-weight: 500; color: var(--ink-700); cursor: pointer;
  transition: all 0.2s ease;
}
.chip-filter:hover { border-color: var(--forest-500); color: var(--forest-800); }
.chip-filter.active { background: var(--forest-800); color: #F0EBDD; border-color: var(--forest-800); }

.loc-card { background: #FBF8EE; border: 1px solid rgba(21,32,26,0.07); border-radius: 16px; padding: 1.15rem 1.25rem; transition: box-shadow 0.3s ease, transform 0.3s ease; }
.loc-card:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -22px rgba(40,64,47,0.22); }
.loc-status { font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.loc-status.open { background: var(--sage-100); color: var(--forest-700); }
.loc-status.soon { background: #F1E9D8; color: #8A7A4B; }
.no-results { display: none; text-align: center; color: var(--ink-500); padding: 2.5rem 0; }

/* =========================================================================
   Timeline (about)
   ========================================================================= */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--sage-200); }
.timeline-item { position: relative; padding-bottom: 1.9rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -28px; top: 4px;
  width: 16px; height: 16px; border-radius: 999px;
  background: #FBF8EE; border: 2px solid var(--forest-500);
}
.timeline-year { font-family: 'Fraunces', serif; font-weight: 600; color: var(--forest-700); font-size: 0.95rem; }

/* ---- Misc ---- */
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--forest-700); font-weight: 600; font-size: 0.9rem; }
.link-arrow svg { transition: transform 0.25s ease; }
.link-arrow:hover svg { transform: translateX(3px); }
.divider { border: none; border-top: 1px solid rgba(21,32,26,0.08); }
.value-row { border-top: 1px solid rgba(21,32,26,0.08); }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
