/* ============================================================
   Interior-page components — Affirmations, Category, Articles, Support
   Extends site.css. Same night-sky system.
   ============================================================ */

/* Compact interior hero (below the fixed nav) */
.page-hero { padding: 168px 0 40px; }
.page-hero .lead { max-width: 620px; }
.backlink { display:inline-flex; align-items:center; gap:8px; color:var(--muted); text-decoration:none; font-size:13px; font-weight:500; margin-bottom:22px; transition:color .3s; }
.backlink:hover { color:#fff; }

/* ---------- Affirmations library: category explorer ---------- */
.explorer { display:grid; grid-template-columns: 1fr 340px; gap:32px; align-items:start; }
@media (max-width: 900px){ .explorer{ grid-template-columns:1fr; } }

.tabs { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:26px; }
.tab {
  font-family:var(--sans); font-size:13px; font-weight:600; letter-spacing:.3px;
  padding:9px 18px; border-radius:100px; cursor:pointer;
  background:rgba(9,13,24,.55); color:var(--muted);
  border:1px solid var(--hairline); transition:all .3s;
}
.tab:hover { color:#fff; border-color:rgba(74,134,255,.4); }
.tab.active { background:var(--accent-grad); color:#fff; border-color:transparent; box-shadow:0 6px 22px rgba(60,120,255,.3); }

.explorer-banner {
  position:relative; height:200px; border-radius:20px; overflow:hidden;
  border:1px solid var(--hairline); margin-bottom:22px;
}
.explorer-banner img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.explorer-banner::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(7,10,18,.2), rgba(7,10,18,.85)); }
.explorer-banner h2 { position:absolute; left:24px; bottom:20px; z-index:2; }

.preview-list { list-style:none; margin:0 0 20px; padding:0; }
.preview-list li { font-family:var(--serif); font-size:20px; font-weight:500; color:var(--ink); padding:12px 0; border-bottom:1px solid var(--hairline); display:flex; gap:14px; align-items:baseline; }
.preview-list li::before { content:"“"; color:var(--accent-light); font-size:26px; line-height:0; }

.record-panel { position:sticky; top:110px; text-align:center; }
.record-mark { width:56px; height:56px; border-radius:50%; margin:0 auto 18px; background:var(--accent-grad); display:flex; align-items:center; justify-content:center; box-shadow:0 0 30px rgba(74,134,255,.5); }
.record-mark span { width:16px; height:16px; border-radius:50%; background:#fff; }

/* ---------- Category detail: affirmation list ---------- */
.cat-hero { display:grid; grid-template-columns:1.3fr 1fr; gap:44px; align-items:center; }
@media (max-width:820px){ .cat-hero{ grid-template-columns:1fr; } }
.cat-photo { position:relative; border-radius:24px; overflow:hidden; border:1px solid var(--hairline); aspect-ratio:4/3; }
.cat-photo img { width:100%; height:100%; object-fit:cover; }
.cat-photo::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, transparent 40%, rgba(7,10,18,.5)); }
.count-pill { display:inline-block; font-size:13px; font-weight:600; color:var(--accent-light); background:rgba(74,134,255,.12); border:1px solid rgba(74,134,255,.3); border-radius:100px; padding:6px 16px; margin-bottom:20px; }

.aff-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:720px){ .aff-grid{ grid-template-columns:1fr; } }
.aff-card {
  display:flex; gap:16px; align-items:flex-start; padding:20px 22px;
  background:linear-gradient(160deg, rgba(22,32,58,.5), rgba(12,18,34,.34));
  border:1px solid var(--hairline); border-radius:16px; transition:border-color .3s, transform .3s;
}
.aff-card:hover { border-color:rgba(74,134,255,.4); transform:translateY(-2px); }
.aff-num { font-family:var(--serif); font-size:16px; color:var(--accent-light); min-width:26px; }
.aff-text { font-family:var(--serif); font-size:20px; font-weight:500; line-height:1.35; margin:0; }
.aff-play { margin-left:auto; color:var(--faint); flex-shrink:0; }

/* QR / download band */
.qr-band { display:flex; gap:32px; align-items:center; flex-wrap:wrap; justify-content:center; text-align:left; }
.qr-band .qr { width:120px; height:120px; border-radius:14px; background:#fff; padding:8px; flex-shrink:0; }
.qr-band .qr img, .qr-band .qr svg { width:100%; height:100%; }

/* Inline app promo — inserted between affirmations. QR on desktop, App Store button on phones. */
.aff-promo {
  grid-column: 1 / -1;
  display:flex; align-items:center; justify-content:space-between; gap:30px;
  margin:6px 0; padding:28px 34px; position:relative; overflow:hidden;
  border-radius:22px; border:1px solid rgba(74,134,255,0.30);
  background:linear-gradient(160deg, rgba(22,32,58,.74), rgba(12,18,34,.52));
  backdrop-filter:blur(9px); -webkit-backdrop-filter:blur(9px);
}
.aff-promo::after { content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(75% 130% at 100% 0%, rgba(74,134,255,0.16), transparent 60%); }
.aff-promo-text { position:relative; z-index:1; }
.aff-promo-head { display:flex; align-items:center; gap:12px; margin-bottom:8px; }
.aff-promo-icon { width:40px; height:40px; border-radius:10px; box-shadow:0 0 18px rgba(74,134,255,0.55); }
.aff-promo h3 { margin:0; font-size:23px; }
.aff-promo p { color:var(--muted); margin:0 0 16px; max-width:470px; font-size:15px; line-height:1.55; }
.aff-promo p strong { color:var(--ink); }
.aff-promo-btn { display:none; }                 /* shown on mobile only */
.aff-promo-qr { text-align:center; flex-shrink:0; position:relative; z-index:1; }
.aff-promo-qr .qr-box { width:132px; height:132px; background:#fff; border-radius:14px; padding:9px; box-shadow:0 10px 34px rgba(0,0,0,0.35); }
.aff-promo-qr .qr-box img { width:100%; height:100%; display:block; }
.aff-promo-qr span { display:block; margin-top:10px; font-size:12px; letter-spacing:.4px; color:var(--faint); }
@media (max-width:640px){
  .aff-promo { flex-direction:column; align-items:stretch; text-align:center; padding:26px 22px; }
  .aff-promo-head { justify-content:center; }
  .aff-promo p { margin-left:auto; margin-right:auto; }
  .aff-promo-qr { display:none; }                /* hide QR on phones */
  .aff-promo-btn { display:inline-flex; margin:2px auto 0; }   /* show App Store button */
}

/* Chips (browse other categories) */
.chips { display:flex; flex-wrap:wrap; gap:10px; }
.chip { font-size:13px; font-weight:500; color:var(--muted); text-decoration:none; padding:8px 16px; border-radius:100px; border:1px solid var(--hairline); transition:all .3s; }
.chip:hover { color:#fff; border-color:rgba(74,134,255,.45); }

/* ---------- Articles ---------- */
.featured { display:grid; grid-template-columns:1.1fr 1fr; gap:0; border-radius:24px; overflow:hidden; border:1px solid var(--hairline); }
@media (max-width:820px){ .featured{ grid-template-columns:1fr; } }
.featured-img { position:relative; min-height:320px; background:#0c1628; }
.featured-img img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.featured-body { padding:44px; background:linear-gradient(160deg, rgba(22,32,58,.5), rgba(12,18,34,.34)); }

.article-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
@media (max-width:820px){ .article-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .article-grid{ grid-template-columns:1fr; } }
.article-card { display:block; text-decoration:none; color:var(--ink); border-radius:18px; overflow:hidden; border:1px solid var(--hairline); background:rgba(12,18,34,.4); transition:transform .35s, border-color .35s; }
.article-card:hover { transform:translateY(-4px); border-color:rgba(74,134,255,.45); }
.article-card .thumb { aspect-ratio:16/10; background:#0c1628; position:relative; overflow:hidden; }
.article-card .thumb img { width:100%; height:100%; object-fit:cover; }
.article-card .pad { padding:22px; }
.article-card h3 { font-size:21px; margin:0 0 8px; }
.article-card .excerpt { color:var(--muted); font-size:14px; margin:0; }
.article-card .tag { font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color:var(--accent-light); font-weight:600; }

/* ---------- Support ---------- */
.help-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
@media (max-width:720px){ .help-grid{ grid-template-columns:1fr; } }
.help-card { text-align:center; }
a.help-card { text-decoration:none; color:inherit; display:block; }
a.help-card:hover h3 { color:var(--accent-light); }
.help-card .ico { width:52px; height:52px; margin:0 auto 16px; border-radius:14px; background:rgba(74,134,255,.12); border:1px solid rgba(74,134,255,.28); display:flex; align-items:center; justify-content:center; color:var(--accent-light); }

.faq { max-width:820px; margin:0 auto; }
.faq-item { border-bottom:1px solid var(--hairline); }
.faq-q { width:100%; text-align:left; background:none; border:0; color:var(--ink); font-family:var(--sans); font-size:18px; font-weight:500; padding:22px 40px 22px 0; cursor:pointer; position:relative; }
.faq-q::after { content:"+"; position:absolute; right:6px; top:50%; transform:translateY(-50%); font-size:24px; color:var(--accent-light); transition:transform .3s; }
.faq-item.open .faq-q::after { content:"–"; }
.faq-a { max-height:0; overflow:hidden; transition:max-height .4s ease, padding .4s ease; color:var(--muted); }
.faq-item.open .faq-a { max-height:400px; padding-bottom:22px; }
.no-js .faq-a { max-height:none; padding-bottom:22px; }   /* readable without JS */

.form { max-width:620px; margin:0 auto; }
.field { margin-bottom:18px; }
.field label { display:block; font-size:13px; font-weight:600; color:var(--muted); margin-bottom:8px; letter-spacing:.3px; }
.field input, .field textarea {
  width:100%; font-family:var(--sans); font-size:15px; color:var(--ink);
  background:rgba(9,13,24,.55); border:1px solid var(--hairline); border-radius:12px; padding:14px 16px;
  transition:border-color .3s;
}
.field input:focus, .field textarea:focus { outline:none; border-color:var(--accent); }
.field textarea { min-height:140px; resize:vertical; }
.field .err { color:#ff8080; font-size:12px; margin-top:6px; display:none; }
.field.invalid .err { display:block; }
.field.invalid input, .field.invalid textarea { border-color:#ff8080; }
.form-done { display:none; text-align:center; padding:40px; }
.form.sent .form { display:none; }

/* ---------- Prose (legal / app-tips pages) ---------- */
.prose { color:var(--muted); font-size:17px; line-height:1.75; }
.prose h2 { font-size:clamp(24px,2.6vw,30px); margin:40px 0 14px; color:var(--ink); }
.prose h3 { font-size:21px; margin:28px 0 10px; color:var(--ink); }
.prose h4 { font-family:var(--sans); font-size:15px; font-weight:700; letter-spacing:.3px; margin:22px 0 8px; color:var(--ink); }
.prose p { margin:0 0 16px; }
.prose ul { margin:0 0 18px; padding-left:22px; }
.prose li { margin:0 0 8px; }
.prose a { color:var(--accent-light); text-decoration:underline; text-underline-offset:3px; }
.prose h2:first-child, .prose h3:first-child { margin-top:0; }
