/* Rooted — joinrooted.org
   Warm, quiet, Scripture-first. Cream paper, forest green, a touch of clay. */
:root {
  --paper: #F7F3EA;
  --paper-deep: #EFE8D8;
  --card: #FFFDF8;
  --line: #E4DCCB;
  --line-strong: #D6CCB6;
  --ink: #23281F;
  --ink-strong: #1F2A20;
  --ink-soft: #4A5145;
  --ink-muted: #5B6155;
  --forest: #2F4A35;
  --forest-deep: #1F2A20;
  --forest-line: #4E6A54;
  --on-forest: #F7F3EA;
  --on-forest-soft: #C9D3C2;
  --clay: #8A4F22;
  --wheat: #E9C99A;
  --highlight: #F1DFB8;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1200px;
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--forest); }
a:hover { color: var(--forest-deep); }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--forest); color: var(--on-forest); padding: 10px 16px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 16px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 600px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
.section { padding-block: 96px; }
@media (max-width: 700px) { .section { padding-block: 64px; } }

/* Type */
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay); }
.on-dark .eyebrow { color: var(--wheat); }
.display { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7vw, 80px); line-height: 1.03; letter-spacing: -0.02em; color: var(--ink-strong); }
.display em { color: var(--forest); }
.h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.15; color: var(--ink-strong); }
.on-dark .h2 { color: var(--on-forest); }
.h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.3; color: var(--ink-strong); }
.lead { margin: 0; font-size: 20px; color: var(--ink-soft); max-width: 36em; }
.muted { color: var(--ink-soft); }
.on-dark .muted { color: var(--on-forest-soft); }
.ref { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.on-dark .ref { color: var(--wheat); }
.verse { margin: 0; font-family: var(--serif); font-style: italic; color: var(--ink-strong); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.prose { max-width: 40em; }
.prose p, .prose li { color: var(--ink-soft); }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1.5px solid var(--forest); background: var(--forest); color: var(--on-forest); }
.btn:hover { background: var(--forest-deep); border-color: var(--forest-deep); color: var(--on-forest); }
.btn.ghost { background: transparent; color: var(--forest); }
.btn.ghost:hover { background: var(--paper-deep); color: var(--forest-deep); }
.btn.wheat { background: var(--wheat); border-color: var(--wheat); color: var(--forest-deep); }
.btn.wheat:hover { background: #F2D9B2; }
.btn.ghost-light { background: transparent; border-color: var(--on-forest-soft); color: var(--on-forest); }
.link-arrow { font-weight: 600; padding: 8px 0; display: inline-block; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest); }
.brand span { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 15px; font-weight: 500; }
.nav-links a { text-decoration: none; padding: 10px 0; }
.nav-links a[aria-current="page"] { color: var(--clay); }
.nav-links .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
@media (max-width: 760px) {
  .nav-links { gap: 0 18px; font-size: 14px; }
  .nav-links .btn { display: none; }
}

/* Hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 56px; align-items: center; padding-block: 88px; }
.hero-card { margin: 0; background: var(--paper-deep); border-radius: 28px; padding: 44px 36px 36px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.hero-card .verse { font-size: 26px; line-height: 1.4; }
.tagline { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink-muted); letter-spacing: 0.02em; }

/* Bands */
.band-forest { background: var(--forest); color: var(--on-forest); }
.band-deep { background: var(--forest-deep); color: var(--on-forest); }
.band-paper { background: var(--paper-deep); }

/* Grids and cards */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid-2 { display: grid; gap: 56px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.pillar { border: 1px solid var(--forest-line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.pillar h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 24px; color: var(--on-forest); }
.pillar p { margin: 0; color: #D3DCCD; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--line); color: var(--ink); }
.tag.dark { background: var(--forest); color: var(--on-forest); }

/* Devotional */
.devo { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 5vw, 44px); display: flex; flex-direction: column; gap: 22px; }
.devo .verse-big { margin: 0; font-family: var(--serif); font-size: clamp(24px, 3vw, 30px); line-height: 1.35; color: var(--ink-strong); }
.devo h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--forest); }
.devo p { margin: 0; color: #3A4036; }
.carry { background: var(--paper-deep); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.carry h3 { color: var(--clay); }

/* Moments */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 46px; padding: 0 20px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; background: var(--card); color: var(--ink); border: 1.5px solid var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--forest); color: var(--on-forest); border-color: var(--forest); }
.moment { background: var(--forest); color: var(--on-forest); border-radius: 24px; padding: clamp(32px, 5vw, 56px); display: flex; flex-direction: column; gap: 14px; }
.moment p.text { margin: 0; font-family: var(--serif); font-size: clamp(22px, 3vw, 32px); line-height: 1.35; }

/* Rhythm list */
.rhythm { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.rhythm li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.rhythm strong { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--clay); min-width: 120px; }
.rhythm span { color: #3A4036; }

/* Commitment */
.pledges { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); counter-reset: pledge; }
.pledges li { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line-strong); counter-increment: pledge; }
.pledges li::before { content: counter(pledge); font-family: var(--serif); font-size: 22px; color: var(--clay); min-width: 28px; }
.pledges strong { display: block; font-size: 18px; color: var(--ink-strong); }
.pledges span { color: var(--ink-soft); font-size: 15px; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-size: 14px; font-weight: 600; color: var(--ink); }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  min-height: 50px; padding: 12px 16px; border: 1.5px solid #B9AE97; border-radius: 14px; background: var(--card); font: inherit; color: var(--ink); width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-soft); }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--forest); flex: none; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-row label { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--card); font-weight: 500; cursor: pointer; }
.radio-row input { accent-color: var(--forest); }
.hidden-field { position: absolute; left: -9999px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-form input { flex: 1 1 220px; min-height: 52px; padding: 0 18px; border-radius: 999px; font: inherit; }
.on-dark .inline-form input { border: 1.5px solid var(--forest-line); background: #2A382B; color: var(--on-forest); }
.on-dark .inline-form input::placeholder { color: #A9B5A3; }
.note { font-size: 13px; color: var(--ink-muted); margin: 0; }
.on-dark .note { color: var(--on-forest-soft); }

/* Beliefs */
.beliefs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; counter-reset: b; }
.beliefs li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; counter-increment: b; }
.beliefs strong { font-family: var(--serif); font-size: 19px; color: var(--ink-strong); display: block; margin-bottom: 4px; }
.beliefs strong::before { content: counter(b) ". "; color: var(--clay); }
.beliefs p { margin: 0; color: var(--ink-soft); }

/* Journals strip */
.journals { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; padding-block: 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.covers { display: flex; gap: 12px; }
.covers span { width: 60px; height: 84px; border-radius: 4px; display: block; }

/* Starter Kit */
.kit-week { gap: 14px; scroll-margin-top: 24px; }
.kit-week p { color: #3A4036; }
.kit-h { margin: 0; font-size: 14px; font-weight: 600; color: var(--forest); text-transform: uppercase; letter-spacing: 0.08em; }
.kit-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: #3A4036; font-size: 16px; }

/* Journal */
.journal-bar { gap: 14px; border: 1.5px solid var(--line-strong); }
.journal-progress { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.progress { flex: 1 1 220px; max-width: 360px; height: 10px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--forest); border-radius: 999px; transition: width .3s ease; }
@media (prefers-reduced-motion: reduce) { .progress span { transition: none; } }
.journal-field { display: flex; flex-direction: column; gap: 6px; }
.journal-field label { font-size: 14px; font-weight: 600; color: var(--clay); }
.journal-field textarea, .journal-field input {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #FBF8F1;
  border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 12px 14px;
  background-image: repeating-linear-gradient(transparent, transparent 31px, var(--line) 31px, var(--line) 32px);
  line-height: 32px;
}
.journal-field input { min-height: 48px; background-image: none; line-height: 1.4; }
.journal-field textarea { min-height: 132px; resize: vertical; padding-top: 4px; }
.journal-field textarea:focus, .journal-field input:focus { border-color: var(--forest); outline: none; box-shadow: 0 0 0 3px rgba(47, 74, 53, .15); }
.journal-pair { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.week-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.week-badge { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--forest); color: var(--on-forest); }
.week-done { font-weight: 600; color: var(--ink); padding-top: 4px; }

@media print {
  .site-header, .site-footer, #join, .share, .journal-bar .share-btns, .journal-bar .share-status, nav.chips, .btns, .skip { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .card, .kit-week { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
  .journal-field textarea, .journal-field input { background: #fff; border: 1px solid #bbb; }
  .section { padding-block: 16px; }
}

/* Accounts and circles */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.account-slot:empty { display: none; }
.account-box { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.card[data-account] .account-box { border-top: 0; padding-top: 0; }
.account-title { margin: 0; font-weight: 600; color: var(--ink-strong); }
.account-row { display: flex; flex-direction: column; gap: 6px; }
.account-row label { font-size: 14px; font-weight: 600; }
.account-box .inline-form input { border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); }
.share-btn.danger { border-color: #B4532A; color: #8E3A17; }
.share-btn.danger:hover { background: #FBEDE6; }
.share-btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.week-share-box { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 14px 16px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.week-share-box legend { padding: 0 6px; font-size: 14px; font-weight: 600; color: var(--forest); }
.callout { margin: 0; background: var(--highlight); border-radius: 12px; padding: 12px 16px; font-weight: 500; }
.circles-list .circle-card { text-decoration: none; color: var(--ink); }
.circles-list .circle-card:hover { border-color: var(--forest); }
.member-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.member-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.shared-week { gap: 18px; }
.shared-entry { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.shared-entry:first-of-type { border-top: 0; padding-top: 0; }
.shared-author { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink-strong); }
.shared-part { display: flex; flex-direction: column; gap: 4px; }
.shared-text { margin: 0; white-space: pre-wrap; color: #3A4036; }

/* Sharing */
.share { display: flex; flex-direction: column; gap: 10px; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.share-btn:hover { border-color: var(--forest); color: var(--forest); }
.share-btn.primary { background: var(--forest); border-color: var(--forest); color: var(--on-forest); }
.share-btn.primary:hover { background: var(--forest-deep); color: var(--on-forest); }
.share-link { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); user-select: all; overflow-wrap: anywhere; }
.share-status { margin: 0; min-height: 1.2em; font-size: 14px; color: var(--forest); }
.invite-banner { margin: 0; align-self: flex-start; background: var(--highlight); color: var(--ink-strong); border-radius: 999px; padding: 8px 16px; font-size: 15px; font-weight: 600; }

/* Footer */
.site-footer { background: var(--forest-deep); color: var(--on-forest-soft); border-top: 1px solid #344535; font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-block: 36px; }
.footer-row a { color: var(--on-forest-soft); padding: 6px 0; }
.footer-row a:hover { color: var(--on-forest); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-brand { display: flex; flex-direction: column; gap: 2px; }
.footer-brand b { font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--on-forest); }
.footer-brand span { color: var(--wheat); font-weight: 600; }
