/* GroupKith — landing site styles
   Brand tokens mirror src/theme.ts in the app so the marketing site
   feels continuous with the product. Warm coral/terracotta brand on
   near-white surfaces. */

:root {
  --brand: #e76f45;
  --brand-deep: #b95937;
  --brand-soft: #fdebe1;
  --brand-border: #f5c8b4;

  --warm-dark: #3d2818;
  --warm-mid: #735338;
  --warm-soft: #f1e6d3;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #faf7f3;
  --surface-3: #f7f7f7;

  --border: #d4ccc1;
  --border-light: #ece6dd;

  --text: #1a1512;
  --text-med: #4a4038;
  --text-muted: #9a8f87;
  --text-light: #c0b8b0;

  --success: #5d8a4a;
  --danger: #c0392b;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(26, 21, 18, 0.05);
  --shadow: 0 10px 30px -12px rgba(58, 34, 18, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(58, 34, 18, 0.28);

  --max-w: 1180px;
  --gutter: clamp(20px, 4vw, 40px);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Helvetica Neue", system-ui,
    sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--brand-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
a:hover { color: var(--brand); border-bottom-color: var(--brand-border); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; color: var(--text-med); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-deep);
  background: var(--brand-soft);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--brand-border);
}

.muted { color: var(--text-muted); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(72px, 9vw, 120px) 0; }
.section--tight { padding: clamp(48px, 7vw, 80px) 0; }
.section--alt { background: var(--surface-2); }
.section--dark {
  background: var(--warm-dark);
  color: var(--surface);
}
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--surface); }
.section--dark p { color: rgba(255, 255, 255, 0.78); }
.section--dark .eyebrow {
  background: rgba(231, 111, 69, 0.18);
  color: #ffb89c;
  border-color: rgba(231, 111, 69, 0.4);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 22px -10px rgba(231, 111, 69, 0.65);
}
.btn--primary:hover {
  background: var(--brand-deep);
  color: #fff;
  border-bottom-color: transparent;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--text);
  color: var(--text);
  border-bottom-color: var(--text);
}

.btn--store {
  background: #1a1512;
  color: #fff;
  border-radius: 14px;
  padding: 12px 20px;
  gap: 14px;
  border-bottom-color: transparent;
}
.btn--store:hover {
  background: #2a2118;
  color: #fff;
  border-bottom-color: transparent;
}
.btn--store .store-glyph { font-size: 28px; line-height: 1; }
.btn--store .store-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.btn--store .store-text small { font-size: 0.7rem; opacity: 0.78; font-weight: 500; }
.btn--store .store-text strong { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }


/* --- Nav --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-light);
}
.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-size: 1.25rem;
  border-bottom-color: transparent;
}
.brand:hover { color: var(--text); border-bottom-color: transparent; }
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.brand span small {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--brand-deep);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-top: -2px;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 24px);
}
.site-nav__links a {
  color: var(--text-med);
  font-weight: 500;
  font-size: 0.96rem;
  border-bottom-color: transparent;
}
.site-nav__links a:hover { color: var(--text); border-bottom-color: transparent; }
.site-nav__links .btn { padding: 9px 16px; font-size: 0.92rem; }

.site-nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.site-nav__toggle svg { width: 20px; height: 20px; color: var(--text); }

@media (max-width: 800px) {
  .site-nav__toggle { display: inline-flex; align-items: center; }
  .site-nav__links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 16px var(--gutter) 22px;
    gap: 10px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
  }
  .site-nav[data-open="true"] .site-nav__links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(231, 111, 69, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(231, 111, 69, 0.10), transparent 55%),
    linear-gradient(180deg, #fff, var(--surface-2));
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 .accent { color: var(--brand); }
.hero__lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--text-med);
  max-width: 540px;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero__sub {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.hero__sub .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 4px rgba(93, 138, 74, 0.18);
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: 2; }
}

/* --- Phone mockup --- */
.phone {
  position: relative;
  width: 320px;
  max-width: 100%;
  aspect-ratio: 9 / 19;
  margin: 0 auto;
  background: #1a1512;
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 30px 60px -20px rgba(58, 34, 18, 0.45),
    0 2px 0 rgba(255, 255, 255, 0.08) inset,
    0 0 0 2px rgba(255, 255, 255, 0.06);
}
.phone--lift { transform: rotate(-2deg); }
.phone--lift-r { transform: rotate(2deg); }
.phone__notch {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 22px;
  background: #1a1512;
  border-radius: 999px;
  z-index: 2;
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone__statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
}
.phone__statusbar .right { display: inline-flex; gap: 4px; align-items: center; opacity: 0.8; }

.phone__topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 12px;
  border-bottom: 1px solid var(--border-light);
}
.phone__topbar .avatar {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.8rem;
}
.phone__topbar .title { font-weight: 700; font-size: 0.92rem; line-height: 1.1; }
.phone__topbar .subtitle { font-size: 0.7rem; color: var(--text-muted); }
.phone__topbar .grow { flex: 1; }

.phone__feed {
  flex: 1;
  overflow: hidden;
  padding: 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.78rem;
  color: var(--text-med);
  box-shadow: var(--shadow-sm);
}
.msg .who { color: var(--text); font-weight: 600; font-size: 0.74rem; }
.msg .who small { color: var(--text-muted); font-weight: 500; margin-left: 6px; }
.msg .body { margin-top: 4px; line-height: 1.45; }
.msg .reactions {
  margin-top: 8px;
  display: inline-flex;
  gap: 6px;
}
.msg .reactions span {
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--brand-border);
}

.prayer {
  background: linear-gradient(180deg, #fff, var(--brand-soft));
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  padding: 12px;
  font-size: 0.78rem;
  color: var(--text-med);
}
.prayer .tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--brand-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #fff;
  border: 1px solid var(--brand-border);
  padding: 3px 8px;
  border-radius: 999px;
}
.prayer .title { font-weight: 700; color: var(--text); margin-top: 6px; font-size: 0.86rem; }
.prayer .body { margin-top: 4px; }
.prayer .footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.prayer .praying-btn {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.event {
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 12px;
  align-items: center;
}
.event .date {
  width: 46px; height: 50px;
  background: var(--warm-soft);
  border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.event .date small { font-size: 0.62rem; font-weight: 700; color: var(--brand-deep); letter-spacing: 0.1em; text-transform: uppercase; }
.event .date strong { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.event .info { flex: 1; min-width: 0; }
.event .info .name { font-weight: 700; font-size: 0.84rem; color: var(--text); }
.event .info .meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.event .info .rsvp {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--success);
}

.phone__tabbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 8px 14px;
  border-top: 1px solid var(--border-light);
  background: #fff;
}
.phone__tabbar .tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 0.62rem; font-weight: 600;
  color: var(--text-muted);
}
.phone__tabbar .tab.active { color: var(--brand-deep); }
.phone__tabbar .tab .glyph {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.phone__tabbar .tab.active .glyph { background: var(--brand-soft); }

/* --- Feature grid --- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--brand-border);
}
.feature-card .icon {
  width: 44px; height: 44px;
  background: var(--brand-soft);
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand-deep);
  margin-bottom: 8px;
  border: 1px solid var(--brand-border);
}
.feature-card h3 { margin: 0; color: var(--text); font-size: 1.1rem; }
.feature-card p { color: var(--text-med); margin: 0; font-size: 0.95rem; }

/* --- Split sections (image + text) --- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
.split--reverse > :first-child { order: 2; }
.split--reverse > :last-child { order: 1; }
.split + .split { margin-top: clamp(64px, 8vw, 96px); }

.split h2 { margin-top: 12px; }
.split p { font-size: 1.05rem; max-width: 480px; }

.checklist { list-style: none; padding: 0; margin: 18px 0 0; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  color: var(--text-med);
}
.checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b95937' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 2px;
}

@media (max-width: 800px) {
  .split, .split--reverse { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 1; }
  .split--reverse > :last-child { order: 2; }
}

/* --- Stats / social proof row --- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-top: 48px;
  padding: 32px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--brand-deep);
  letter-spacing: -0.02em;
}
.stat span { color: var(--text-muted); font-size: 0.92rem; }

/* --- FAQ --- */
.faq {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}
.faq details {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 4px 8px;
  transition: border-color 0.15s ease;
}
.faq details[open] { border-color: var(--brand-border); }
.faq summary {
  cursor: pointer;
  padding: 16px 12px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--brand-deep);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a {
  padding: 0 12px 16px;
  color: var(--text-med);
}
.faq .a p:last-child { margin-bottom: 0; }

/* --- CTA band --- */
.cta-band {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  margin: 0 var(--gutter);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 20% 0%, rgba(255, 255, 255, 0.22), transparent 60%);
  pointer-events: none;
}
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 540px; margin: 0 auto 24px; }
.cta-band .hero__ctas { justify-content: center; }
.cta-band .btn--primary { background: #fff; color: var(--brand-deep); }
.cta-band .btn--primary:hover { background: var(--warm-soft); color: var(--brand-deep); }
.cta-band .btn--store { background: rgba(0, 0, 0, 0.35); }
.cta-band .btn--store:hover { background: rgba(0, 0, 0, 0.55); }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border-light);
  padding: 56px 0 32px;
  margin-top: clamp(64px, 8vw, 96px);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
}
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer ul a { color: var(--text-med); border-bottom-color: transparent; }
.site-footer ul a:hover { color: var(--text); border-bottom-color: transparent; }
.site-footer__brand { max-width: 320px; }
.site-footer__brand p { color: var(--text-muted); font-size: 0.92rem; margin-top: 12px; }
.site-footer__bottom {
  border-top: 1px solid var(--border-light);
  margin-top: 40px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--text-muted);
}

@media (max-width: 800px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* --- Generic prose pages (legal/support) --- */
.prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose h1 { margin-bottom: 8px; }
.prose .updated { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; }
.prose h2 { margin-top: 48px; font-size: 1.55rem; }
.prose h3 { margin-top: 28px; font-size: 1.15rem; color: var(--text); }
.prose p, .prose li { color: var(--text-med); }
.prose ul, .prose ol { padding-left: 22px; }
.prose ul li, .prose ol li { margin: 6px 0; }
.prose code {
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.92em;
}

/* --- Tagline tile --- */
.tile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 40px;
}
.tile > div {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px;
}
.tile strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 4px;
}
.tile span { color: var(--text-muted); font-size: 0.92rem; }

/* --- Visually hidden (a11y) --- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 12px;
  background: var(--text);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 12px; color: #fff; border-bottom-color: transparent; }

/* --- Module hero (feature subpages) --- */
.page-hero {
  padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 64px);
  background: linear-gradient(180deg, var(--brand-soft), transparent 80%);
  border-bottom: 1px solid var(--border-light);
}
.page-hero h1 { max-width: 760px; }
.page-hero p { max-width: 640px; font-size: 1.1rem; }
