/* =========================================================
   Suncovia Referral Program — matches main site language
   ========================================================= */

:root {
  /* Dark charcoal base — The Divinity Group scheme */
  --bg: #0e0f11;
  --bg-2: #0a0b0d;
  --ink: #f3f5f8;
  --ink-soft: #c7cfd8;
  --muted: #8b95a1;
  --line: rgba(241, 122, 35, 0.16);

  --navy: #f17a23;
  --navy-deep: #181a1d;
  --solar: #f17a23;
  --solar-deep: #e2691a;
  --green: #7fa8c9;
  --danger: #f17a23;

  --surface: #181a1d;
  --surface-2: #20242a;

  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6);

  --radius: 26px;
  --radius-sm: 16px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); color: var(--ink); line-height: 1.65; font-size: 16px;
  background:
    radial-gradient(1100px 540px at 88% -8%, rgba(241,122,35,0.14), transparent 60%),
    radial-gradient(900px 520px at -6% 4%, rgba(127,168,201,0.07), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed; overflow-x: hidden;
}
a { color: var(--navy); }
img { display: block; max-width: 100%; }
.container { width: min(1100px, calc(100% - 40px)); margin: 0 auto; }

body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.sun-orb {
  position: fixed; top: -180px; right: -160px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,158,77,0.4), rgba(241,122,35,0.08) 55%, transparent 72%);
  filter: blur(8px); z-index: 0; pointer-events: none; animation: orbFloat 14s ease-in-out infinite;
}
@keyframes orbFloat { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-24px,30px) scale(1.06); } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(14,15,17,0.82); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(241,122,35,0.12);
}
.site-header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand-wrap { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark {
  width: 50px; height: 50px; border-radius: 15px; overflow: hidden; flex: 0 0 auto;
  background: #181a1d; box-shadow: 0 10px 22px rgba(0,0,0,0.4); border: 1px solid rgba(241,122,35,0.2);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { min-width: 0; }
.brand-kicker { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.64rem; font-weight: 800; color: var(--solar-deep); }
.brand-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.02rem,1.7vw,1.4rem); letter-spacing: -0.01em; line-height: 1.1; color: var(--ink); }
.header-cta {
  display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 12px;
  background: linear-gradient(135deg, var(--solar), var(--solar-deep)); color: #fff;
  font-weight: 800; text-decoration: none; box-shadow: 0 10px 24px rgba(196,111,12,0.3);
  transition: transform 0.18s ease;
}
.header-cta:hover { transform: translateY(-2px); }
.header-progress { height: 3px; width: 0%; background: linear-gradient(90deg, var(--solar), var(--solar-deep)); transition: width 0.1s linear; }

main { position: relative; z-index: 2; }
.page-stack { display: grid; gap: 28px; padding: 32px 0 56px; }

.hero-card, .section-card, .final-cta, .hero-aside {
  background: var(--surface); border: 1px solid rgba(236,240,245,0.07); border-radius: var(--radius); box-shadow: var(--shadow);
}

/* Reveal — only hides when JS is active (html.js). Without JS, content stays visible. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } .sun-orb { animation: none; } }

/* Typography */
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 800; font-size: 0.72rem; color: var(--solar-deep); }
.eyebrow.small { font-size: 0.68rem; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem,4.4vw,3.4rem); line-height: 1.05; letter-spacing: -0.02em; margin: 16px 0 16px; }
h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; font-size: clamp(1.5rem,2.6vw,2.2rem); line-height: 1.14; margin: 8px 0 14px; }
h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.ink-accent { position: relative; color: var(--solar-deep); }
.ink-accent::after { content: ""; position: absolute; left: -1%; right: -1%; bottom: 0.06em; height: 0.32em; background: linear-gradient(90deg, rgba(241,122,35,0.32), rgba(241,122,35,0.18)); border-radius: 4px; z-index: -1; }
p { margin: 0 0 12px; }
.hero-subtext, .section-card p { font-size: clamp(1rem,1.05vw,1.07rem); line-height: 1.68; color: var(--ink-soft); }
.muted { color: var(--muted); }

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 13px 24px;
  border-radius: 14px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; border: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--solar), var(--solar-deep)); box-shadow: 0 14px 30px rgba(196,111,12,0.32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(196,111,12,0.4); filter: brightness(1.04); }
.btn-secondary { color: var(--navy); background: var(--surface-2); border: 1px solid rgba(241,122,35,0.28); }
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--navy); }
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* Hero */
.hero-card { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(280px,0.8fr); gap: 30px; padding: clamp(26px,3vw,44px); position: relative; overflow: hidden; }
.referral-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, rgba(127,168,201,0.07), transparent 50%); }
.hero-card > * { position: relative; }
.reward-badge {
  display: inline-flex; align-items: baseline; gap: 10px; padding: 12px 20px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(127,168,201,0.18), rgba(241,122,35,0.16));
  border: 1px solid rgba(127,168,201,0.32);
}
.reward-badge span { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; }
.reward-badge strong { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; color: var(--solar-deep); }
.hero-subtext { max-width: 60ch; }
.hero-subtext strong { color: var(--ink); }
.trust-bar { margin-top: 18px; font-size: 0.86rem; color: var(--muted); font-weight: 600; border-left: 3px solid rgba(241,122,35,0.5); padding-left: 12px; }

.hero-aside { align-self: start; background: linear-gradient(170deg, #20242a, #16181c); color: #fff; border: 1px solid rgba(241,122,35,0.14); padding: 26px; box-shadow: var(--shadow-lg); }
.aside-label { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.68rem; font-weight: 800; color: #ff9e4d; margin-bottom: 16px; }
.earn-grid { display: grid; gap: 11px; }
.earn-stat { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); }
.earn-stat span { font-size: 0.92rem; font-weight: 600; color: rgba(255,255,255,0.82); }
.earn-stat strong { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #ffb37e; }
.earn-stat.highlight { background: linear-gradient(135deg, rgba(127,168,201,0.3), rgba(127,168,201,0.16)); border-color: rgba(127,168,201,0.4); }
.earn-stat.highlight strong { color: #c5dcef; }
.hero-aside .muted { color: rgba(255,255,255,0.72); margin-top: 16px; font-size: 0.9rem; }

/* Sections base */
.section-card { padding: clamp(24px,2.8vw,40px); }

/* Urgency */
.urgency-section { background: linear-gradient(180deg, var(--surface), #1c1f23); }
.urgency-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 22px 0; }
.urgency-item { padding: 22px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid rgba(241,122,35,0.18); }
.u-num { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; color: var(--danger); line-height: 1; margin-bottom: 10px; }
.u-num em { font-style: normal; font-size: 1.1rem; color: var(--ink-soft); }
.urgency-item p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; line-height: 1.55; }
.urgency-close { font-size: 1.05rem !important; color: var(--ink) !important; margin: 0; }
.urgency-close strong { color: var(--solar-deep); }

/* How it works */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 22px; }
.step-card { padding: 26px 22px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); position: relative; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, var(--solar), var(--solar-deep)); margin-bottom: 14px; }
.step-card:last-child .step-num { background: linear-gradient(135deg, var(--solar), var(--solar-deep)); }
.step-card h3 { font-size: 1.2rem; margin: 0 0 8px; }
.step-card p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; line-height: 1.55; }
.step-card strong { color: var(--solar-deep); }

/* Form */
.form-section { scroll-margin-top: 90px; }
.form-intro { max-width: 70ch; }
.referral-form { margin-top: 22px; display: grid; gap: 22px; }
.hidden-field { position: absolute; left: -9999px; }
.fieldset-block { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; margin: 0; background: var(--surface-2); }
.fieldset-block legend { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--navy); padding: 0 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row + .field-row { margin-top: 16px; }
.field-group { display: flex; flex-direction: column; gap: 7px; }
.field-group.full { margin-top: 4px; }
.field-group > span { font-size: 0.88rem; font-weight: 700; color: var(--ink); }
.field-group em { color: var(--danger); font-style: normal; }
.field-group input, .field-group textarea {
  font: inherit; padding: 13px 15px; border-radius: 12px; border: 1px solid rgba(236,240,245,0.14);
  background: #121417; color: var(--ink); transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field-group input:focus, .field-group textarea:focus { outline: none; border-color: var(--solar); box-shadow: 0 0 0 3px rgba(241,122,35,0.18); }
.field-group textarea { resize: vertical; }

.friend-block { padding: 18px; border-radius: 12px; background: #121417; border: 1px solid var(--line); margin-bottom: 14px; position: relative; }
.friend-block .friend-label { font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--solar-deep); margin-bottom: 12px; display: block; }
.remove-friend { position: absolute; top: 14px; right: 14px; background: transparent; border: 0; color: var(--danger); font-weight: 800; cursor: pointer; font-size: 0.85rem; }
.remove-friend:hover { text-decoration: underline; }
.add-friend-btn {
  appearance: none; border: 2px dashed rgba(127,168,201,0.3); background: transparent; color: var(--navy);
  font: inherit; font-weight: 800; padding: 13px 18px; border-radius: 12px; cursor: pointer; width: 100%;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.add-friend-btn:hover { border-color: var(--navy); background: rgba(127,168,201,0.06); }
.add-friend-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.friend-hint { margin: 12px 0 0; font-size: 0.88rem; color: var(--muted); }
.friend-hint strong { color: var(--solar-deep); }

.consent { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--solar-deep); }
.consent span { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; }
.submit-btn { width: 100%; min-height: 56px; font-size: 1.05rem; }
.form-fineprint { font-size: 0.78rem; color: var(--muted); margin: 0; text-align: center; }

.form-success { margin-top: 22px; padding: 36px 28px; border-radius: var(--radius-sm); background: linear-gradient(135deg, rgba(127,168,201,0.14), rgba(241,122,35,0.1)); border: 1px solid rgba(127,168,201,0.3); text-align: center; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: #fff; background: linear-gradient(135deg, #7fa8c9, #4f7795); margin: 0 auto 16px; box-shadow: 0 12px 28px rgba(127,168,201,0.4); }
.form-success h3 { font-size: 1.5rem; margin: 0 0 10px; color: var(--ink); }
.form-success p { color: var(--ink-soft); max-width: 52ch; margin: 0 auto; }
.form-success strong { color: var(--solar-deep); }

/* Trust strip */
.trust-strip { background: linear-gradient(135deg, rgba(127,168,201,0.06), rgba(127,168,201,0.08)); }
.rating-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 22px 0 16px; }
.rating-chip { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.stars { color: var(--solar); font-size: 1.05rem; letter-spacing: 2px; }
.bbb-badge, .local-badge { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 1.05rem; }
.bbb-badge { background: linear-gradient(135deg, var(--solar), var(--solar-deep)); }
.local-badge { background: linear-gradient(135deg, #7fa8c9, #4f7795); }
.rating-meta { display: flex; flex-direction: column; line-height: 1.2; }
.rating-meta strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.rating-meta span { font-size: 0.8rem; color: var(--muted); font-weight: 600; }

/* Final CTA */
.final-cta { display: flex; justify-content: space-between; align-items: center; gap: 26px; padding: clamp(26px,3vw,42px); border: 0; background: linear-gradient(135deg, var(--solar), var(--solar-deep)); color: #fff; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.final-cta::before { content: ""; position: absolute; top: -50%; right: -10%; width: 360px; height: 360px; background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 70%); pointer-events: none; }
.final-cta > * { position: relative; }
.final-cta .eyebrow { color: rgba(255,255,255,0.9); }
.final-cta h2, .final-cta p { color: #fff; }
.final-cta p { color: rgba(255,255,255,0.9); margin-bottom: 0; max-width: 56ch; }
.final-cta .btn-primary { flex: 0 0 auto; background: #fff; color: var(--solar-deep); box-shadow: 0 16px 30px rgba(0,0,0,0.18); }
.final-cta .btn-primary:hover { background: #fff; filter: none; }

/* Footer */
.site-footer { position: relative; z-index: 2; padding: 30px 0 40px; border-top: 1px solid rgba(241,122,35,0.12); background: rgba(20,22,25,0.7); }
.site-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 0.86rem; flex-wrap: wrap; }
.footer-terms { font-size: 0.8rem; }

/* Responsive */
@media (max-width: 1000px) {
  .hero-card { grid-template-columns: 1fr; }
  .urgency-grid, .steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .container { width: min(100% - 28px, 1100px); }
  .field-row { grid-template-columns: 1fr; }
  .cta-group .btn-primary, .cta-group .btn-secondary { flex: 1 1 100%; }
  .final-cta { flex-direction: column; align-items: flex-start; }
  .final-cta .btn-primary { width: 100%; }
  .rating-chip { flex: 1 1 100%; }
  .header-cta { padding: 0 14px; font-size: 0.9rem; }
}
@media (max-width: 420px) {
  .brand-title { font-size: 0.96rem; }
  .reward-badge { flex-wrap: wrap; }
}
