/* Remedy — remedyrecoveries.com
   Brand tokens mirror constants/colors.ts in the app. */

:root {
  --background: #FAF7F4;
  --primary: #3E6B4E;
  --primary-deep: #2F5440;
  --primary-muted: #E7EFE9;
  --secondary: #C4614A;
  --secondary-muted: #F7E9E4;
  --surface: #FFFFFF;
  --text-primary: #1C1C1E;
  --text-secondary: #6B6B6B;
  --text-tertiary: #B3ABA5;
  --border: #E8E0DC;
  --border-light: #F0EBE7;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-deep);
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 247, 244, 0.86);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--border-light);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1040px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.nav-cta:hover {
  background: var(--primary-deep);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 70% 10%, var(--primary-muted) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 15% 90%, var(--secondary-muted) 0%, transparent 65%),
    var(--background);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  padding: 88px 24px 96px;
  max-width: 1040px;
  margin: 0 auto;
}

.hero-brand {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 8vw, 5rem);
  line-height: 1.05;
  color: var(--primary-deep);
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.25;
  color: var(--text-primary);
  margin-top: 18px;
  max-width: 20ch;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 18px;
  max-width: 44ch;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 15px 32px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-deep);
  color: #fff;
  transform: translateY(-1px);
}

.btn-primary:focus-visible,
.nav-cta:focus-visible {
  outline: 2px solid var(--primary-deep);
  outline-offset: 3px;
}

.hero-cta-note {
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

.hero-figure {
  display: flex;
  justify-content: center;
}

.hero-figure img {
  width: min(340px, 80%);
  border-radius: 28%;
  box-shadow: 0 24px 60px rgba(47, 84, 64, 0.25);
  animation: heroFloat 7s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

/* Entrance + reveal: ALWAYS visible by default.
   Motion only arms when html.has-js and motion is allowed.
   This prevents the "half-loaded invisible mess" if JS/CSS is slow. */

.rise,
.reveal {
  opacity: 1;
  transform: none;
}

html.has-js:not(.reduce-motion) .rise {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.7s ease forwards;
}

html.has-js:not(.reduce-motion) .rise-1 { animation-delay: 0.05s; }
html.has-js:not(.reduce-motion) .rise-2 { animation-delay: 0.18s; }
html.has-js:not(.reduce-motion) .rise-3 { animation-delay: 0.31s; }
html.has-js:not(.reduce-motion) .rise-4 { animation-delay: 0.44s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html.has-js:not(.reduce-motion) .reveal:not(.visible) {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

html.has-js:not(.reduce-motion) .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .rise,
  .reveal,
  .hero-figure img {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Sections ---------- */

section {
  padding: 84px 0;
}

.section-kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin-top: 10px;
  color: var(--text-primary);
}

.section-sub {
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 56ch;
}

/* How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}

.step {
  padding: 28px 26px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.step:hover {
  transform: translateY(-2px);
  border-color: var(--border);
  box-shadow: 0 14px 32px rgba(28, 28, 30, 0.05);
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--secondary-muted);
  color: var(--secondary);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 44px;
  text-align: center;
}

.step h3 {
  font-size: 1.15rem;
  margin-top: 16px;
}

.step p {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 0.98rem;
}

/* Why Remedy */

.why {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.why-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 44px;
}

.why-item {
  padding: 28px 26px;
  border-radius: 18px;
  background: var(--background);
  border: 1px solid var(--border-light);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.why-item:hover {
  transform: translateY(-2px);
  border-color: var(--border);
  box-shadow: 0 14px 32px rgba(28, 28, 30, 0.05);
}

.why-tag {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--secondary);
}

.why-item h3 {
  font-size: 1.1rem;
  margin-top: 10px;
}

.why-item p {
  color: var(--text-secondary);
  margin-top: 6px;
  font-size: 0.98rem;
}

/* Closing CTA */

.closing {
  text-align: center;
}

.closing .section-title {
  max-width: 24ch;
  margin-left: auto;
  margin-right: auto;
}

.closing .btn-primary {
  margin-top: 32px;
}

.disclaimer {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  max-width: 60ch;
  margin: 40px auto 0;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.footer-links {
  display: flex;
  gap: 22px;
  font-size: 0.92rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  width: 100%;
  margin-top: 8px;
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.legal h1 {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1.2;
}

.legal .updated {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-top: 10px;
}

.legal .draft-note {
  background: var(--secondary-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-top: 24px;
}

.legal h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-top: 40px;
}

.legal p,
.legal li {
  color: var(--text-secondary);
  margin-top: 12px;
  font-size: 1rem;
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin-top: 8px;
}

/* ---------- Contact ---------- */

.contact-card {
  margin-top: 32px;
  padding: 28px 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.contact-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-top: 0;
}

.contact-email {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--primary-deep);
  margin-top: 8px;
  word-break: break-word;
}

.contact-email:hover {
  color: var(--primary);
}

.contact-btn {
  margin-top: 22px;
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 56px 24px 64px;
    text-align: center;
  }

  .hero-tagline,
  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-row {
    justify-content: center;
  }

  .hero-figure {
    order: -1;
  }

  .hero-figure img {
    width: min(220px, 60%);
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .why-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links .nav-plain {
    display: none;
  }
}
