/* TripTally site — shared styles
   Fonts: Fraunces (display), Manrope (body), JetBrains Mono (numerals)
*/

:root {
  --bg: #F7F5F0;
  --bg-elev: #FFFFFF;
  --bg-tint: #EFEBE2;
  --ink: #1A1B2E;
  --ink-soft: rgba(26, 27, 46, 0.62);
  --ink-faint: rgba(26, 27, 46, 0.42);
  --ink-hair: rgba(26, 27, 46, 0.10);
  --rule: rgba(26, 27, 46, 0.08);
  --accent: #0E9488;
  --accent-deep: #0A6F66;
  --accent-soft: rgba(14, 148, 136, 0.10);
  --warm: #E8826B;

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 0 rgba(26, 27, 46, 0.04), 0 12px 40px -16px rgba(26, 27, 46, 0.18);
  --shadow-pop: 0 1px 0 rgba(26, 27, 46, 0.04), 0 30px 60px -24px rgba(26, 27, 46, 0.28);

  --container: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131421;
    --bg-elev: #1B1D2E;
    --bg-tint: #1F2134;
    --ink: #F2EFE7;
    --ink-soft: rgba(242, 239, 231, 0.66);
    --ink-faint: rgba(242, 239, 231, 0.40);
    --ink-hair: rgba(242, 239, 231, 0.10);
    --rule: rgba(242, 239, 231, 0.08);
    --accent: #2DD4BF;
    --accent-deep: #5EEAD4;
    --accent-soft: rgba(45, 212, 191, 0.14);
    --warm: #F2A38B;
    --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 40px -16px rgba(0, 0, 0, 0.6);
    --shadow-pop: 0 1px 0 rgba(0, 0, 0, 0.3), 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* subtle grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@media (prefers-color-scheme: dark) {
  body::before { mix-blend-mode: screen; opacity: 0.18; }
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color 160ms ease, color 160ms ease;
}
a:hover { border-bottom-color: var(--accent); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 460;
  letter-spacing: -0.015em;
  margin: 0;
  font-feature-settings: 'ss01';
}

h1 {
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  font-variation-settings: 'SOFT' 60, 'opsz' 120;
}

h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-variation-settings: 'SOFT' 50, 'opsz' 36;
}

h3 {
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-variation-settings: 'SOFT' 40, 'opsz' 20;
}

.italic { font-style: italic; font-variation-settings: 'SOFT' 100, 'opsz' 144; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Nav ---------- */

.nav {
  padding: 26px 0;
  position: relative;
  z-index: 2;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand:hover { border: none; }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 15px;
}
.nav-links a {
  color: var(--ink-soft);
  border: none;
}
.nav-links a:hover { color: var(--ink); border: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -10px rgba(26, 27, 46, 0.4);
  border-bottom: 1px solid transparent;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink-hair);
}
.btn-ghost:hover {
  border-color: var(--ink);
  border-bottom-color: var(--ink);
}
a.btn { border-bottom: 1px solid transparent; }

.btn-appstore svg { flex-shrink: 0; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 64px 0 96px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
}

.hero h1 .accent {
  color: var(--accent);
  font-style: italic;
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
}

.hero-sub {
  margin-top: 28px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 460px;
}

.hero-ctas {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-meta {
  margin-top: 28px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}
.hero-meta span::before {
  content: '·';
  margin-right: 22px;
  color: var(--ink-hair);
}
.hero-meta span:first-child::before { display: none; }

/* ---------- Phone mock ---------- */

.phone-stage {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-stage::before {
  content: '';
  position: absolute;
  inset: -40px -60px;
  background: radial-gradient(60% 50% at 50% 40%, var(--accent-soft), transparent 70%);
  z-index: 0;
}

.phone {
  position: relative;
  width: 300px;
  background: var(--bg-elev);
  border-radius: 44px;
  padding: 14px;
  box-shadow: var(--shadow-pop);
  border: 1px solid var(--ink-hair);
  z-index: 1;
}

.phone-screen {
  background: var(--bg-tint);
  border-radius: 32px;
  padding: 22px 18px 24px;
  overflow: hidden;
  position: relative;
}

.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--ink);
}
.statusbar-icons { display: inline-flex; gap: 5px; align-items: center; }
.statusbar-icons span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}
.statusbar-icons .bat {
  width: 18px;
  height: 9px;
  border-radius: 2px;
  background: var(--ink);
  opacity: 0.85;
}

.app-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  font-variation-settings: 'SOFT' 50, 'opsz' 24;
}

.hero-card {
  background: var(--accent);
  border-radius: 18px;
  padding: 18px;
  color: #fff;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px -12px var(--accent);
}
.hero-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 8px;
}
.hero-card-amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero-card-amount .currency { font-size: 20px; opacity: 0.75; margin-right: 4px; }
.hero-card-amount .per { font-size: 13px; opacity: 0.7; margin-left: 4px; font-weight: 400; }
.hero-card-annual {
  margin-top: 12px;
  font-size: 12px;
  opacity: 0.78;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.sub-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-top: 1px solid var(--ink-hair);
}
.sub-row:first-of-type { border-top: none; padding-top: 4px; }
.sub-emoji {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.sub-meta { flex: 1; min-width: 0; }
.sub-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.sub-renew { font-size: 11px; color: var(--ink-faint); font-family: var(--font-mono); margin-top: 1px; }
.sub-cost {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* ---------- Tally marks decoration ---------- */

.tally-marks {
  position: absolute;
  font-family: var(--font-mono);
  color: var(--ink-faint);
  opacity: 0.5;
  font-size: 13px;
  letter-spacing: 0.4em;
  user-select: none;
  pointer-events: none;
}

/* ---------- Sections ---------- */

section { padding: 96px 0; position: relative; }

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head .eyebrow { display: block; margin-bottom: 16px; }
.section-head p {
  font-size: 18px;
  color: var(--ink-soft);
  margin-top: 18px;
  max-width: 540px;
}

/* ---------- Features grid ---------- */

.features {
  background: linear-gradient(180deg, transparent, var(--bg-tint) 30%, var(--bg-tint) 70%, transparent);
  padding: 120px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (max-width: 880px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature {
  background: var(--bg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 220px;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.feature-icon svg { width: 18px; height: 18px; }

.feature h3 { font-family: var(--font-display); }
.feature p { font-size: 15px; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Accent palette strip ---------- */

.palette {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  align-items: center;
}
.palette span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

/* ---------- Privacy band ---------- */

.privacy-band {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 64px 56px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) {
  .privacy-band { grid-template-columns: 1fr; padding: 48px 32px; }
}
.privacy-band h2 { color: var(--bg); }
.privacy-band p { color: color-mix(in srgb, var(--bg) 72%, transparent); font-size: 17px; }
.privacy-band .eyebrow { color: color-mix(in srgb, var(--bg) 50%, transparent); }

.privacy-tally {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--bg) 58%, transparent);
  line-height: 2;
}
.privacy-tally strong {
  color: var(--bg);
  font-weight: 600;
}
.privacy-tally .strike {
  text-decoration: line-through;
  text-decoration-color: var(--warm);
  text-decoration-thickness: 2px;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  padding: 48px 0 64px;
  margin-top: 48px;
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.foot-meta {
  font-size: 13px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}
.foot-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
}
.foot-links a {
  color: var(--ink-soft);
  border: none;
}
.foot-links a:hover { color: var(--ink); }

/* ---------- Long-form (support / privacy pages) ---------- */

.page-header {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.page-header .eyebrow { margin-bottom: 14px; display: block; }
.page-header h1 {
  font-size: clamp(40px, 5vw, 64px);
}
.page-header p {
  margin-top: 18px;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 620px;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 0 96px;
}
.prose h2 {
  margin: 56px 0 18px;
  font-size: 28px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  margin: 36px 0 10px;
  font-size: 21px;
  font-family: var(--font-display);
  font-weight: 460;
  letter-spacing: -0.015em;
  font-variation-settings: 'SOFT' 40, 'opsz' 24;
  color: var(--ink);
}
.prose p, .prose li {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
}
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul {
  padding-left: 0;
  list-style: none;
}
.prose ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--ink-soft);
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 12px;
  height: 1px;
  background: var(--accent);
}

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 28px 0;
  font-size: 16px;
  color: var(--ink);
}
.callout strong { color: var(--accent-deep); }

/* Pills (privacy header) */
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink-hair);
  background: var(--bg-elev);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-weight: 500;
}
.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Inline code in prose */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--bg-tint);
  border: 1px solid var(--ink-hair);
  color: var(--ink);
}

/* FAQ (legacy / not currently used) */
.faq { margin-top: 12px; }
.faq details {
  border-top: 1px solid var(--rule);
  padding: 22px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -0.015em;
  font-variation-settings: 'SOFT' 40, 'opsz' 24;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-faint);
  transition: transform 220ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
}

/* ---------- Reveal animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: rise 720ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .reveal-1 { animation-delay: 60ms; }
  .reveal-2 { animation-delay: 160ms; }
  .reveal-3 { animation-delay: 260ms; }
  .reveal-4 { animation-delay: 360ms; }
  @keyframes rise {
    to { opacity: 1; transform: translateY(0); }
  }
}
