/* ============================================================
   Get Happy, LLC — "Sunrise" design system (2026 refresh)
   Warm, optimistic, hand-crafted: ivory paper, deep ink type,
   a coral-to-amber sunrise accent, and dusk-gradient heroes.
   Implements the shared class vocabulary used across all pages.
   ============================================================ */

:root {
  /* Ink & paper */
  --ink: #23273f;
  --ink-soft: #4c5066;
  --paper: #fbf8f2;
  --card: #ffffff;

  /* Sunrise accent */
  --sun-1: #ff7a59;
  --sun-2: #ffb036;
  --sun-grad: linear-gradient(120deg, var(--sun-1), var(--sun-2));

  /* Dusk (dark hero) */
  --dusk-1: #272b4e;
  --dusk-2: #46396f;
  --dusk-grad: linear-gradient(160deg, var(--dusk-1) 0%, var(--dusk-2) 70%, #6a4a76 100%);

  /* Warm gray scale (legacy variable names kept for older pages) */
  --gray-50: #f6f2ea;
  --gray-100: #efeadf;
  --gray-200: #e4ddcf;
  --gray-300: #cfc8b8;
  --gray-500: #8a8678;
  --gray-600: #585c70;
  --gray-700: #3c405a;
  --gray-800: #2b2f47;

  /* Legacy link color variable (now terracotta) */
  --blue: #d9532f;

  --radius-sm: 12px;
  --radius: 20px;
  --shadow-soft: 0 2px 6px rgba(39, 43, 78, 0.06), 0 14px 36px rgba(39, 43, 78, 0.08);
  --shadow-lift: 0 6px 14px rgba(39, 43, 78, 0.10), 0 24px 56px rgba(39, 43, 78, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

/* App Store badge images must stay inline so any text-centered band
   (product-hero, cta, or per-page custom heroes) centers them */
img[src*="applemediaservices"] { display: inline-block; }

a { color: var(--blue); text-decoration: none; }

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.text-center { text-align: center; }

.subtitle {
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.7;
  max-width: 640px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun-1);
  margin-bottom: 10px;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 242, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-200);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.nav-logo img { height: 34px; width: auto; }

.nav-links { display: flex; gap: 26px; }

.nav-links a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-links a:hover { color: var(--ink); border-color: var(--sun-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn-primary {
  background: var(--sun-grad);
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 122, 89, 0.35);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255, 122, 89, 0.45); }

.btn-outline {
  border: 2px solid currentColor;
  color: var(--ink);
}

.btn-outline:hover { transform: translateY(-2px); }

.btn-group { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* Dark-background contexts get a light outline button */
.hero .btn-outline, .cta .btn-outline, .product-hero .btn-outline { color: #fff; }

/* ---------- Index hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 120px;
  background:
    radial-gradient(720px 420px at 12% -8%, rgba(255, 176, 54, 0.22), transparent 65%),
    radial-gradient(820px 520px at 95% 0%, rgba(255, 122, 89, 0.18), transparent 60%),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}

.hero h1 { margin-bottom: 18px; }
.hero .subtitle { margin-bottom: 6px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-light { background: #fffdf9; border-top: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); }
.section-header { margin-bottom: 52px; }
.section-header .subtitle { margin-left: auto; margin-right: auto; }

.section-dark {
  background: var(--dusk-grad);
  padding: 96px 0;
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .subtitle { color: rgba(255, 255, 255, 0.75); }

/* ---------- Feature cards ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.feature-icon {
  font-size: 1.6rem;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 122, 89, 0.14), rgba(255, 176, 54, 0.18));
  margin-bottom: 18px;
}

.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Product cards ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

.product-card-img {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
}

.product-card-img img { max-height: 100%; }

.product-card-body { padding: 28px; flex: 1; }

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(39, 43, 78, 0.15);
}

.product-card-body h3 { font-size: 1.3rem; margin-bottom: 10px; }
.product-card-body p { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 16px; }

.product-card-link {
  font-weight: 700;
  color: var(--blue);
}
.product-card-link::after { content: " \2192"; }
.product-card-link:hover { text-decoration: underline; }

.privacy-link { font-size: 0.9rem; color: var(--gray-500); }
.privacy-link:hover { color: var(--blue); }

.badge-new {
  display: inline-block;
  background: var(--sun-grad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 12px;
  margin-left: 10px;
  vertical-align: middle;
}

/* ---------- Product page hero (dark) ---------- */
.product-hero {
  background: var(--dusk-grad);
  padding: 96px 0 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.product-hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -55% -10%;
  height: 70%;
  background: radial-gradient(closest-side, rgba(255, 150, 80, 0.35), transparent);
  pointer-events: none;
}

.product-hero > .container { position: relative; }
.product-hero h1 { color: #fff; font-size: clamp(2.6rem, 5vw, 3.8rem); }
.product-hero .subtitle { color: rgba(255, 255, 255, 0.85); }

.product-hero-desc {
  color: rgba(255, 255, 255, 0.75);
  max-width: 620px;
  margin: 16px auto 0;
  font-size: 1.05rem;
  line-height: 1.7;
}

.product-hero .price { font-size: 0.95rem; color: rgba(255, 255, 255, 0.65); margin-top: 16px; }
.product-hero .price strong { color: #fff; }

/* Framed media (video or screenshot) inside heroes and sections */
.media-frame {
  max-width: 880px;
  margin: 40px auto 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 14px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.media-frame video, .media-frame img {
  width: 100%;
  border-radius: 12px;
  display: block;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.35);
}

.media-frame-light {
  background: var(--card);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-soft);
}

.media-frame-light video, .media-frame-light img { box-shadow: 0 8px 28px rgba(39, 43, 78, 0.16); }

.media-caption {
  text-align: center;
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* ---------- Steps ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.step {
  background: var(--card);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-soft);
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sun-grad);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 6px 16px rgba(255, 122, 89, 0.35);
}

.step h3 { margin-bottom: 10px; }
.step p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Highlight band ---------- */
.highlight { padding: 96px 0; }

.highlight-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 56px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--gray-100);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  padding: 56px;
}

.highlight-text h2 { margin-bottom: 16px; }
.highlight-text p { color: var(--ink-soft); margin-bottom: 12px; }
.highlight-img { display: flex; justify-content: center; }

/* ---------- Bottom features (dark band) ---------- */
.bottom-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.bottom-feature {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
}

.bottom-feature-icon { font-size: 1.7rem; margin-bottom: 12px; }
.bottom-feature h3 { color: #fff; font-size: 1.02rem; margin-bottom: 8px; }
.bottom-feature p { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }

/* ---------- CTA ---------- */
.cta {
  background: var(--dusk-grad);
  padding: 96px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 75%;
  background: radial-gradient(closest-side, rgba(255, 150, 80, 0.3), transparent);
  pointer-events: none;
}

.cta > .container { position: relative; }
.cta h2 { color: #fff; margin-bottom: 14px; }
.cta .subtitle { color: rgba(255, 255, 255, 0.75); margin: 0 auto; }

/* ---------- Footer ---------- */
.footer {
  background: var(--paper);
  border-top: 1px solid var(--gray-200);
  padding: 30px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--gray-500);
  font-size: 0.92rem;
}

.footer a { color: var(--gray-600); font-weight: 600; }
.footer a:hover { color: var(--blue); }

/* ---------- Scene chips (Serene Screens) ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 860px;
  margin: 0 auto;
}

.chip {
  background: var(--card);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- Fade-in reveal ---------- */
.fade-in { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 72px 0 80px; }
  .hero-grid, .highlight-inner { grid-template-columns: 1fr; }
  .hero-img { order: -1; }
  .highlight-inner { padding: 36px 28px; }
  .nav-links { gap: 16px; }
  .section { padding: 68px 0; }
}
