/* ==========================================================================
   VALUED.FYI — components
   ========================================================================== */

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h); display: flex; align-items: center;
  border-bottom: 1px solid var(--rule);
  background: rgba(5, 18, 34, 0.78);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: inline-flex; align-items: center; gap: 0.65rem; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; overflow: hidden; display: block;
  border: 1px solid var(--rule-gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transition: transform var(--t), border-color var(--t);
}
.brand:hover .brand-mark { transform: scale(1.05); border-color: var(--gold); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand-name {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  letter-spacing: 0.01em; color: var(--paper);
}

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link {
  position: relative; font-size: 0.875rem; font-weight: 500; color: var(--text-3);
  transition: color var(--t);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}
.nav-link:hover { color: var(--paper); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.btn-gold {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1.15rem; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 700; color: #05121f;
  background: linear-gradient(135deg, var(--gold-lt), var(--gold));
  box-shadow: 0 6px 22px -8px rgba(217, 160, 54, 0.7);
  transition: transform var(--t), box-shadow var(--t);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(217, 160, 54, 0.9); }
.btn-gold span:last-child { transition: transform var(--t); }
.btn-gold:hover span:last-child { transform: translateX(2px); }

.nav-toggle {
  display: none; width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--rule); flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--text-2); transition: transform var(--t); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt));
  box-shadow: 0 0 12px rgba(217, 160, 54, 0.6);
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem 1.5rem 1.25rem;
    background: rgba(5, 18, 34, 0.98); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--rule);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity var(--t), transform var(--t);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-link { padding: 0.9rem 0; font-size: 0.95rem; border-bottom: 1px solid var(--rule); }
  .nav-link:last-child { border-bottom: none; }
  .nav-link::after { display: none; }
}

/* ---------- hero ---------- */
.hero { padding: 3.5rem 0 1rem; }
@media (min-width: 768px) { .hero { padding: 5rem 0 2rem; } }

.hero-grid { display: grid; gap: 3.5rem; align-items: center; }
.hero-grid > * { min-width: 0; }
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: 4rem; }
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }

.eyebrow {
  display: inline-block; margin-bottom: 1.75rem; padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule-gold);
  font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em; color: var(--gold);
}

.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 3.9rem);
  letter-spacing: -0.015em; text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--gold); }

.hero-sub {
  margin-top: 1.5rem; max-width: 34rem;
  font-size: 1.0625rem; line-height: 1.68; color: var(--text-2);
}
@media (min-width: 640px) { .hero-sub { font-size: 1.125rem; } }

/* flex-start, not center: the Play badge carries a note beneath it, so centring
   the taller stack against the App Store badge lifts it out of line by half the
   note's height. Top-align the badges and let the note hang. */
.cta-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; margin-top: 2.25rem; }
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform var(--t), filter var(--t); }
.store-badge img { display: block; height: 50px; width: auto; }
.store-badge:hover { transform: translateY(-2px); filter: brightness(1.1); }

.cta-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.4rem; font-size: 0.8125rem; color: var(--text-3); }
.qr-btn { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text-3); transition: color var(--t); }
.qr-btn:hover { color: var(--gold); }
.dot-sep { color: var(--text-4); }

/* ---------- phone ---------- */
.showcase { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; min-width: 0; }

.tabs {
  display: flex; gap: 0.25rem; max-width: 100%; padding: 0.3rem;
  border-radius: 10px; border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.02);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.45rem 0.8rem; border-radius: 7px;
  font-size: 0.75rem; font-weight: 600; color: var(--text-3); white-space: nowrap;
  transition: color var(--t), background var(--t);
}
.tab:hover { color: var(--text); }
.tab.on { color: #05121f; background: linear-gradient(135deg, var(--gold-lt), var(--gold)); }

.phone {
  position: relative; width: 100%; max-width: 300px;
  aspect-ratio: 600 / 1191;
  padding: 8px; border-radius: 44px;
  background: linear-gradient(160deg, #4a5568, #1c2634 42%, #070d17);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 40px 80px -30px rgba(0, 0, 0, 0.95),
    0 0 100px -30px rgba(217, 160, 54, 0.3);
  transition: transform var(--t-slow);
}
.phone::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 3; pointer-events: none;
  background: linear-gradient(150deg, rgba(255,255,255,0.16), transparent 32%, transparent 70%, rgba(255,255,255,0.06));
}
@media (min-width: 1000px) {
  .phone { transform: perspective(1500px) rotateY(-7deg) rotateX(2deg); }
  .phone:hover { transform: perspective(1500px) rotateY(0) rotateX(0) translateY(-6px); }
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: #000; }
.slide { position: absolute; inset: 0; animation: slideIn 420ms var(--ease); }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
@keyframes slideIn { from { opacity: 0; transform: scale(1.015); } to { opacity: 1; transform: none; } }

/* ---------- sections ---------- */
.section { padding: 3.5rem 0; }
@media (min-width: 768px) { .section { padding: 4.75rem 0; } }

.label {
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--gold); margin-bottom: 1rem;
}
.title {
  font-size: clamp(1.85rem, 4.2vw, 2.6rem);
  letter-spacing: -0.012em; max-width: 24ch; text-wrap: balance;
}
.lede { margin-top: 1.1rem; max-width: 42rem; font-size: 1.0125rem; line-height: 1.7; color: var(--text-2); }

/* ---------- facts ---------- */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; list-style: none; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.6rem 1.25rem; background: var(--ground); text-align: center; transition: background var(--t); }
.fact:hover { background: var(--surface); }
.fact-n {
  font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; line-height: 1;
  color: var(--gold); font-variant-numeric: tabular-nums;
}
.fact-l { font-size: 0.78rem; line-height: 1.4; color: var(--text-3); }

/* ---------- steps ---------- */
.steps { display: grid; gap: 1px; margin-top: 2.5rem; list-style: none; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 2rem 1.75rem; background: var(--ground); transition: background var(--t); }
.step:hover { background: var(--surface); }
.step-n {
  display: block; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em;
  color: var(--gold); margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.step p { font-size: 0.9375rem; line-height: 1.65; }

/* ---------- tools ---------- */
.tools { display: grid; gap: 1px; margin-top: 2.5rem; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 760px) { .tools { grid-template-columns: repeat(2, 1fr); } }
.tool { position: relative; overflow: hidden; padding: 2rem 1.75rem; background: var(--ground); transition: background var(--t); }
.tool::after {
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(217, 160, 54, 0.08), transparent 62%);
  transition: opacity var(--t);
}
.tool:hover { background: var(--surface); }
.tool:hover::after { opacity: 1; }
.tool-k {
  position: relative; font-family: var(--font-mono); font-size: 0.6875rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.75rem;
}
.tool h3 { position: relative; font-size: 1.3rem; margin-bottom: 0.7rem; }
.tool p { position: relative; font-size: 0.9375rem; line-height: 1.7; }

/* ---------- gallery ---------- */
.gallery-sec { padding-bottom: 3rem; }
.rail {
  display: flex; gap: 1.25rem; margin-top: 2.5rem;
  padding: 0.5rem 1.5rem 1.75rem;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: 1.5rem;
  scrollbar-width: thin; scrollbar-color: rgba(217,160,54,0.3) transparent;
}
@media (min-width: 640px) {
  .rail {
    padding-left: max(2rem, calc((100vw - var(--max)) / 2 + 2rem));
    padding-right: 2rem;
    scroll-padding-left: max(2rem, calc((100vw - var(--max)) / 2 + 2rem));
  }
}
/* six cards at 236 + five 20px gaps = 1516 */
@media (min-width: 1620px) {
  .rail { justify-content: safe center; padding-left: 2rem; padding-right: 2rem; scroll-padding-left: 2rem; }
}
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-track { background: transparent; }
.rail::-webkit-scrollbar-thumb { background: rgba(217, 160, 54, 0.28); border-radius: 999px; }
.rail::-webkit-scrollbar-thumb:hover { background: rgba(217, 160, 54, 0.5); }
.rail.drag { cursor: grabbing; scroll-snap-type: none; }
.rail.drag img { pointer-events: none; }

.shot { flex: 0 0 auto; width: 216px; scroll-snap-align: start; margin: 0; }
@media (min-width: 640px) { .shot { width: 236px; } }
.shot-frame {
  position: relative; padding: 6px; border-radius: 28px;
  background: linear-gradient(160deg, #46536a, #1a2432 42%, #070d17);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 26px 50px -26px rgba(0,0,0,0.95);
  transition: transform var(--t), box-shadow var(--t);
}
.shot-frame::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(150deg, rgba(255,255,255,0.14), transparent 34%, transparent 72%, rgba(255,255,255,0.05));
}
.shot:hover .shot-frame {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(217,160,54,0.25), 0 32px 60px -26px rgba(0,0,0,1), 0 0 60px -28px rgba(217,160,54,0.5);
}
.shot-frame img { display: block; width: 100%; height: auto; border-radius: 23px; }
.shot figcaption { margin-top: 1rem; font-size: 0.8125rem; line-height: 1.5; color: var(--text-3); }
.shot figcaption strong {
  display: block; font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  color: var(--paper); margin-bottom: 0.2rem;
}

/* ---------- note / origin ---------- */
.note { padding: 2.5rem 2rem; border: 1px solid var(--rule); background: var(--surface); }
@media (min-width: 640px) { .note { padding: 3rem 2.75rem; } }
.note h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-bottom: 1rem; }
.note p { font-size: 1rem; line-height: 1.75; max-width: 52rem; }
.note p + p { margin-top: 1rem; }
.note strong { color: var(--paper); }

/* ---------- faq ---------- */
.faq { margin-top: 2.5rem; border: 1px solid var(--rule); }
.q { border-bottom: 1px solid var(--rule); }
.q:last-child { border-bottom: none; }
.q h3 { margin: 0; font: inherit; }
.q-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  width: 100%; padding: 1.35rem 1.5rem; text-align: left;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 600; color: var(--text);
  transition: color var(--t), background var(--t);
}
.q-btn:hover { color: var(--paper); background: rgba(255, 255, 255, 0.02); }
.q.open .q-btn { color: var(--paper); }
.q-ic {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--rule);
  font-size: 0.9rem; color: var(--text-3);
  transition: transform var(--t), color var(--t), border-color var(--t);
}
.q.open .q-ic { transform: rotate(45deg); color: var(--gold); border-color: var(--rule-gold); }
.q-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t); }
.q-a > p { overflow: hidden; padding: 0 1.5rem; font-size: 0.9375rem; line-height: 1.75; }
.q.open .q-a { grid-template-rows: 1fr; }
.q.open .q-a > p { padding-bottom: 1.5rem; }
.q-a a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(217,160,54,0.4); }

/* ---------- closing ---------- */
.close-cta {
  position: relative; overflow: hidden; margin: 2rem 0 5rem;
  padding: 3.5rem 2rem; text-align: center;
  border: 1px solid var(--rule-gold);
  background: radial-gradient(120% 130% at 50% 0%, rgba(217, 160, 54, 0.13), transparent 62%), var(--surface);
}
/* direct child only — this is the app icon. Without the `>` it also hits the
   store badge inside .cta-row and rounds off Apple's artwork. */
.close-cta > img { border-radius: 18px; border: 1px solid var(--rule-gold); box-shadow: 0 18px 40px -18px rgba(0,0,0,0.95); margin-bottom: 1.5rem; }
.close-cta h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.close-cta p { margin-top: 0.85rem; font-size: 1rem; }
.close-cta .cta-row { justify-content: center; margin-top: 1.75rem; }

/* ---------- footer ---------- */
.ftr { position: relative; z-index: 2; padding: 3.5rem 0 3rem; border-top: 1px solid var(--rule); }
.ftr-top { display: grid; gap: 2.5rem; margin-bottom: 3rem; }
@media (min-width: 820px) { .ftr-top { grid-template-columns: minmax(0,1fr) minmax(0,1.5fr); gap: 4rem; } }
.ftr-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.85rem; }
.ftr-brand img { border-radius: 8px; }
.ftr-brand span { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--paper); }
.ftr-desc { font-size: 0.875rem; line-height: 1.65; color: var(--text-3); max-width: 32ch; }
.ftr-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
@media (min-width: 560px) { .ftr-cols { grid-template-columns: repeat(3, 1fr); } }
.ftr-h { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-2); margin-bottom: 1rem; }
.ftr-list { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.ftr-link { font-size: 0.875rem; color: var(--text-3); text-align: left; transition: color var(--t); }
.ftr-link:hover { color: var(--gold); }
.ftr-btm {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding-top: 1.75rem; border-top: 1px solid var(--rule);
  font-size: 0.8125rem; color: var(--text-4);
}

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; background: rgba(2, 8, 16, 0.86); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity var(--t);
}
.overlay.on { opacity: 1; }
.modal {
  position: relative; width: 100%; max-width: 400px; padding: 2.25rem 2rem; text-align: center;
  border: 1px solid var(--rule-gold); background: var(--surface);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95);
  transform: translateY(14px) scale(0.97); transition: transform var(--t);
}
.overlay.on .modal { transform: none; }
.modal-x {
  position: absolute; top: 0.9rem; right: 0.9rem; width: 30px; height: 30px; border-radius: 50%;
  font-size: 0.8rem; color: var(--text-3); transition: color var(--t-fast), background var(--t-fast);
}
.modal-x:hover { color: var(--paper); background: rgba(255, 255, 255, 0.07); }
.modal h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.modal p { font-size: 0.875rem; line-height: 1.65; }
.modal-qr { width: 200px; margin: 1.5rem auto 0; padding: 12px; border-radius: 14px; background: #fff; }
.modal-qr img { display: block; width: 100%; border-radius: 6px; }
.modal-foot { margin-top: 1.15rem; font-size: 0.75rem; color: var(--text-4); }

/* Google Play badge is a marker, not a link — the note under it says so.
   The artwork itself is never dimmed or overlaid, per Google's brand terms. */
.badge-stack { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.store-badge.is-pending { cursor: default; }
.store-badge.is-pending:hover { transform: none; filter: none; }
.badge-note {
  padding-left: 2px;
  font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--gold);
}
@media (max-width: 430px) {
  .cta-row { flex-direction: column; align-items: flex-start; }
  .store-badge img { height: 46px; }
}
