/* ==========================================================================
   Trove marketing site — styles
   Premium Apple-style minimal. System fonts, generous whitespace,
   subtle warm-gold accents sourced from the app's Trove palette.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-warm: #faf6f0;
  --bg-sunk: #f5efe5;
  --ink: #1a1510;
  --ink-dim: #6b6258;
  --ink-faint: #a49b90;
  --rule: #e8e2d8;
  --rule-strong: #d9d1c2;

  --accent: #c8910a;
  --accent-strong: #a77704;
  --gold-1: #f8a828;
  --gold-2: #f8da6c;

  --shadow-phone: 0 30px 60px -20px rgba(26, 21, 16, 0.25), 0 10px 20px -8px rgba(26, 21, 16, 0.1);
  --shadow-card: 0 1px 2px rgba(26, 21, 16, 0.04), 0 4px 12px -4px rgba(26, 21, 16, 0.06);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 44px;

  --ease: cubic-bezier(.2, .7, .2, 1);

  --content: 1120px;
  --content-narrow: 880px;
  --gap: 24px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -40px; left: 16px;
  background: var(--ink); color: var(--bg);
  padding: 10px 14px; border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 120ms var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Typography ---------- */
.eyebrow,
.section-head__eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

h1, h2 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; }
h3 { font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  line-height: 1;
  border-radius: 999px;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 16px 28px; font-size: 17px; }

.btn--primary {
  background: linear-gradient(100deg, var(--gold-1), var(--gold-2));
  color: #3a2807;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 8px 22px -10px rgba(248, 168, 40, 0.55);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 12px 28px -10px rgba(248, 168, 40, 0.65); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { background: var(--bg-warm); }

.btn__icon { flex: 0 0 auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 14px var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.nav__icon { border-radius: 7px; }
.nav__links {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  color: var(--ink-dim);
}
.nav__links a:not(.btn):hover { color: var(--ink); }
@media (max-width: 540px) {
  .nav__links { gap: 18px; }
  .nav__links a:not(.btn) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 40px;
  background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg) 100%);
}
.hero__inner {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: 0 var(--gap);
  text-align: center;
}
.hero__title {
  font-size: clamp(42px, 7.5vw, 84px);
  margin: 10px 0 22px;
  letter-spacing: -0.035em;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
  background: linear-gradient(90deg, var(--gold-1), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__lede {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  color: var(--ink-dim);
  max-width: 640px;
  margin: 0 auto 32px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 64px;
}

.hero__device {
  margin: 48px auto 0;
  max-width: 360px;
}

/* ---------- Phone mockup ---------- */
.phone {
  position: relative;
  aspect-ratio: 9 / 19.5;
  width: 100%;
  background: linear-gradient(180deg, #2b2520, #16120e);
  border-radius: var(--radius-xl);
  padding: 9px;
  box-shadow: var(--shadow-phone);
}
.phone::before {
  content: "";
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 88px; height: 24px;
  background: #000;
  border-radius: 999px;
  z-index: 3;
}
.phone__screen {
  position: relative;
  width: 100%; height: 100%;
  background: linear-gradient(160deg, var(--bg-warm), var(--bg-sunk));
  border-radius: 36px;
  overflow: hidden;
  isolation: isolate;
}
.phone__placeholder {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 24px;
  color: var(--ink-faint);
  background:
    radial-gradient(ellipse at 50% 20%, rgba(200, 145, 10, 0.08), transparent 60%),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(26, 21, 16, 0.025) 8px 9px);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  z-index: 1;
}
.phone__placeholder span {
  font-weight: 600;
  color: var(--ink-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
}
.phone__placeholder small {
  font-size: 11px;
  color: var(--ink-faint);
}
.phone__image {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
}
.phone--hero { max-width: 340px; margin: 0 auto; }

/* ---------- Strip (capabilities row) ---------- */
.strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 24px 0;
  overflow: hidden;
}
.strip__list {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 32px;
  font-size: 14px;
  color: var(--ink-dim);
  font-weight: 500;
}
.strip__list li { position: relative; }
.strip__list li + li::before {
  content: "·";
  position: absolute;
  left: -18px; top: 50%;
  transform: translateY(-55%);
  color: var(--ink-faint);
}

/* ---------- Section head ---------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head__title {
  font-size: clamp(32px, 4.6vw, 52px);
  letter-spacing: -0.03em;
}
.section-head__lede {
  margin-top: 16px;
  color: var(--ink-dim);
  font-size: 18px;
}

/* ---------- Gallery ---------- */
.gallery { padding: 96px 0; background: var(--bg-warm); }
.gallery__inner { max-width: var(--content); margin: 0 auto; padding: 0 var(--gap); }
.gallery__rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.gallery__phone { display: flex; flex-direction: column; gap: 16px; }
.gallery__phone figcaption {
  text-align: center;
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 500;
}
@media (max-width: 960px) {
  .gallery__rail { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .gallery__rail { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
}

/* ---------- Feature grid ---------- */
.features { padding: 96px 0; }
.features__inner { max-width: var(--content); margin: 0 auto; padding: 0 var(--gap); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .feature-grid { grid-template-columns: 1fr; } }

.feature {
  padding: 28px 26px 30px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.feature:hover {
  transform: translateY(-2px);
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-card);
}
.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--bg-warm), var(--bg-sunk));
  color: var(--accent-strong);
  margin-bottom: 18px;
  border: 1px solid var(--rule);
}
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 {
  font-size: 19px;
  margin-bottom: 8px;
}
.feature p {
  color: var(--ink-dim);
  font-size: 15.5px;
  line-height: 1.55;
}

/* ---------- FAQ ---------- */
.faq { padding: 96px 0; background: var(--bg-warm); }
.faq__inner { max-width: var(--content-narrow); margin: 0 auto; padding: 0 var(--gap); }
.faq__list {
  border-top: 1px solid var(--rule);
}
.faq__item {
  border-bottom: 1px solid var(--rule);
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  transition: color 150ms var(--ease);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  width: 12px; height: 12px;
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg);
  margin-right: 4px;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease);
  flex: 0 0 auto;
}
.faq__item[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--accent);
}
.faq__item summary:hover { color: var(--accent-strong); }
.faq__body {
  padding: 0 4px 24px;
  max-width: 640px;
}
.faq__body p {
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- Closing CTA ---------- */
.closing { padding: 96px 0; }
.closing__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gap);
  text-align: center;
}
.closing h2 {
  font-size: clamp(32px, 4.6vw, 52px);
  margin-bottom: 14px;
}
.closing p {
  color: var(--ink-dim);
  font-size: 18px;
  margin-bottom: 28px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0 40px;
  font-size: 14px;
  color: var(--ink-dim);
}
.footer__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__brand img { border-radius: 6px; }
.footer__links {
  display: inline-flex;
  gap: 24px;
}
.footer__links a:hover { color: var(--ink); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .feature, .faq__item summary::after { transition: none !important; }
  .btn--primary:hover, .feature:hover { transform: none; }
}

/* ---------- Small responsive tuning ---------- */
@media (max-width: 540px) {
  .hero { padding-top: 56px; }
  .hero__cta { margin-bottom: 48px; }
  .gallery, .features, .faq, .closing { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
  .feature { padding: 24px 22px; }
}
