:root {
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  --ths-background: #f9fbf7;
  --ths-surface: #ffffff;
  --ths-surface-soft: #eef8f2;
  --ths-primary: #0c3d3b;
  --ths-primary-dark: #052f2a;
  --ths-primary-soft: #dff4ed;
  --ths-accent: #6c2bd9;
  --ths-accent-soft: rgba(108, 43, 217, 0.15);
  --text-primary: #0c3d3b;
  --text-secondary: #3f5a58;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ths-background);
  color: var(--text-primary);
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 4rem 1.5rem 3rem;
  max-width: 1080px;
  margin: 0 auto;
}

header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--ths-surface);
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: 0 24px 40px rgba(12, 61, 59, 0.08);
  border: 1px solid rgba(12, 61, 59, 0.06);
}

.eyebrow {
  font-size: clamp(1.3rem, 3.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ths-accent);
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 3.25rem);
  line-height: 1.1;
  margin: 0;
  color: var(--ths-primary);
  font-weight: 800;
  letter-spacing: -0.015em;
}

.intro {
  font-size: 1.1rem;
  max-width: 42ch;
  margin: 0;
  color: var(--text-secondary);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta {
  padding: 0.9rem 1.75rem;
  background: var(--ths-primary);
  color: #ffffff;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(12, 61, 59, 0.18);
}

/* Base button pattern shared by CTAs */
.btn-base,
.cta,
.cta-secondary,
.cta-outline-primary,
.referral-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

.cta-secondary {
  padding: 0.85rem 1.6rem;
  border: 2px solid var(--ths-accent);
  color: var(--ths-accent);
}

.cta-secondary:hover,
.cta-secondary:focus-visible {
  transform: translateY(-2px);
  background-color: var(--ths-accent);
  color: #ffffff;
}

/* Outline button that uses primary color: white background until hovered,
   then fills with primary color like .cta */
.cta-outline-primary {
  padding: 0.9rem 1.75rem;
  background: #ffffff;
  border: 2px solid var(--ths-primary);
  color: var(--ths-primary);
}

.cta-outline-primary:hover,
.cta-outline-primary:focus-visible {
  transform: translateY(-2px);
  background: var(--ths-primary);
  color: #ffffff;
  box-shadow: 0 18px 30px rgba(12, 61, 59, 0.18);
}

.details {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.details article {
  background: var(--ths-surface);
  border-radius: 24px;
  padding: 2.25rem;
  box-shadow: 0 20px 36px rgba(12, 61, 59, 0.08);
  border: 1px solid rgba(12, 61, 59, 0.08);
}

.details article.offer {
  background: var(--ths-primary-soft);
  border-color: rgba(12, 61, 59, 0.12);
  box-shadow: 0 22px 44px rgba(5, 47, 42, 0.12);
}

.details h2 {
  margin-top: 0;
  font-size: 1.35rem;
  color: var(--ths-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: 0.5rem;
}

.details h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 2.5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ths-primary), var(--ths-accent));
}

.details ul {
  padding-left: 1.25rem;
  margin: 0;
}

.details li + li {
  margin-top: 0.5rem;
}

.details a {
  color: var(--ths-primary);
  text-decoration: none;
  font-weight: 600;
}

.inline-link {
  color: var(--ths-accent);
}

/* Referral block: block CTA + small copy button for mobile-friendly layout */
.referral {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.referral-cta {
  padding: 0.85rem 1.6rem;
  background: var(--ths-accent);
  color: #ffffff;
  text-decoration: none;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

/* Compact variant for header where CTAs are constrained to 400px */
.referral--compact {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

/* Header compact variant: white background by default, fills with purple accent on hover */
.referral--compact .referral-cta {
  background: #ffffff;
  color: var(--ths-accent);
  border: 2px solid var(--ths-accent);
  padding: 0.85rem 1.6rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: none;
}

.referral--compact .referral-cta:hover,
.referral--compact .referral-cta:focus-visible {
  transform: translateY(-2px);
  background: var(--ths-accent);
  color: #ffffff;
  box-shadow: 0 18px 30px rgba(108, 43, 217, 0.18);
}

.referral-cta:hover,
.referral-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(108, 43, 217, 0.18);
}

.referral-copy {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(12,61,59,0.12);
  background: #ffffff;
  color: var(--ths-accent);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.referral-copy:hover,
.referral-copy:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(12,61,59,0.08);
}

.copy-feedback {
  font-size: 0.9rem;
  color: var(--text-secondary);
  min-height: 1.1rem;
}

/* Utility: stack CTAs vertically and center them (used in header) */
.cta-group.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Utility: make CTAs a responsive block with max width */
.cta-block {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

/* Referral actions wrapper (used where copy button sits beside CTA) */
.referral-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.details a:hover,
.details a:focus-visible {
  text-decoration: underline;
}

/* Center only the contact block inside a details article */
.details article .contact {
  text-align: center;
}
.details article .contact a {
  display: inline-block;
  margin: 0.35rem 0;
}

.footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-bottom: 1rem;
}

.offer-section {
  display: grid;
  justify-content: center;
  padding: 0 1.5rem;
}

.offer-section article {
  background: var(--ths-primary-soft);
  border: 1px solid rgba(12, 61, 59, 0.12);
  box-shadow: 0 22px 44px rgba(5, 47, 42, 0.12);
  border-radius: 24px;
  padding: 2.25rem;
  max-width: 600px;
}

/* Prevent long, unbroken strings (URLs) from causing horizontal overflow */
.offer-section article,
.offer-section article * {
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.inline-link {
  color: var(--ths-accent);
  /* ensure very long URLs wrap on small screens */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.offer-section h2 {
  margin-top: 0;
  font-size: 1.35rem;
  color: var(--ths-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: 0.5rem;
}

.offer-section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 2.5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ths-primary), var(--ths-accent));
}

@media (min-width: 768px) {
  .hero {
    padding-top: 5rem;
  }

  .details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
