/* ═══════════════════════════════════════════════
   Castquill — pages.css
   Shared styles for content pages: legal, about,
   contact, pricing, blog, settings, marketplace.
   Loaded after style.css.
   ═══════════════════════════════════════════════ */

/* ── PAGE HERO (compact banner) ── */
.page-hero {
  background: var(--ink); color: #fff;
  padding: 72px 24px 64px; text-align: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: -100px; left: 50%;
  transform: translateX(-50%); width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(124,58,237,.2) 0%, rgba(255,122,43,.13) 50%, transparent 75%);
  pointer-events: none;
}
.page-hero > * { position: relative; }
.page-hero .eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 14px;
}
.page-hero h1 {
  font-size: clamp(32px, 5vw, 56px); font-weight: 800;
  letter-spacing: -.035em; line-height: 1.05; margin-bottom: 16px;
}
.page-hero p {
  font-size: clamp(15px, 2vw, 18px); color: rgba(255,255,255,.6);
  max-width: 540px; margin: 0 auto; line-height: 1.6;
}

/* ── CONTENT CONTAINER ── */
.page-wrap { max-width: 760px; margin: 0 auto; padding: 72px 24px 96px; }
.page-wrap-wide { max-width: 980px; margin: 0 auto; padding: 72px 24px 96px; }

/* ── LEGAL / PROSE ── */
.prose { color: var(--ink); }
.prose .updated { font-size: 13px; color: var(--muted); margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.prose h2 {
  font-size: 22px; font-weight: 800; letter-spacing: -.02em;
  margin: 44px 0 14px; line-height: 1.2;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 16px; font-weight: 700; margin: 28px 0 10px; }
.prose p { font-size: 15px; line-height: 1.75; color: #34343a; margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { font-size: 15px; line-height: 1.7; color: #34343a; margin-bottom: 8px; }
.prose a { color: var(--violet); text-decoration: none; font-weight: 500; }
.prose a:hover { text-decoration: underline; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose .callout {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--violet); border-radius: 10px;
  padding: 18px 20px; margin: 24px 0; font-size: 14px; line-height: 1.65; color: #34343a;
}

/* table of contents (legal) */
.toc { background: var(--surface); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 48px; }
.toc h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }
.toc ol { margin: 0 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.toc a { font-size: 14px; color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--violet); }

/* ── ABOUT ── */
.about-section { padding: 80px 24px; }
.about-inner { max-width: 860px; margin: 0 auto; }
.about-lead { font-size: clamp(20px, 3vw, 28px); font-weight: 700; letter-spacing: -.02em; line-height: 1.4; margin-bottom: 24px; }
.about-lead em { font-style: italic; font-weight: 300; color: var(--muted); }
.about-body p { font-size: 16px; line-height: 1.75; color: #34343a; margin-bottom: 18px; }
.values-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 48px; }
.value-card { background: var(--surface); border-radius: var(--radius); padding: 32px 28px; }
.value-card .ico { font-size: 30px; margin-bottom: 14px; }
.value-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.01em; }
.value-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }
@media (max-width: 760px) { .values-grid { grid-template-columns: 1fr; } }

/* ── CONTACT ── */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.contact-aside h2 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 14px; }
.contact-aside p { font-size: 15px; color: var(--muted); line-height: 1.65; margin-bottom: 28px; }
.contact-method { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-method .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--violet-soft); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.contact-method h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.contact-method p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.5; }
.contact-method a { color: var(--violet); text-decoration: none; font-weight: 500; }
.contact-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; box-shadow: 0 8px 40px rgba(0,0,0,.04); }
@media (max-width: 760px) { .contact-layout { grid-template-columns: 1fr; gap: 40px; } }

/* ── PRICING PAGE ── */
.pricing-page-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; align-items: stretch; margin-bottom: 24px; }
.ppg-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 36px 30px; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.ppg-card:hover { transform: translateY(-3px); box-shadow: 0 16px 50px rgba(0,0,0,.08); }
.ppg-card.featured { border-color: var(--violet); box-shadow: 0 16px 50px rgba(124,58,237,.14); }
.ppg-badge { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--brand-gradient); color: #fff; padding: 4px 10px; border-radius: 6px; display: inline-block; margin-bottom: 16px; width: fit-content; }
.ppg-name { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.ppg-price { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin-bottom: 4px; }
.ppg-price span { font-size: 14px; font-weight: 500; color: var(--muted); }
.ppg-period { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.ppg-divider { height: 1px; background: var(--border); margin-bottom: 22px; }
.ppg-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.ppg-features li { font-size: 14px; color: #34343a; display: flex; align-items: flex-start; gap: 10px; line-height: 1.4; }
.ppg-features li::before { content: '✓'; color: var(--violet); font-weight: 800; flex-shrink: 0; }
.ppg-cta { display: block; text-align: center; padding: 13px; border-radius: 980px; font-size: 14px; font-weight: 600; text-decoration: none; margin-top: auto; transition: opacity .2s, border-color .2s; }
.ppg-cta-fill { background: var(--brand-gradient); color: #fff; }
.ppg-cta-fill:hover { opacity: .9; }
.ppg-cta-outline { border: 1.5px solid var(--border); color: var(--ink); }
.ppg-cta-outline:hover { border-color: var(--violet); color: var(--violet); }
@media (max-width: 760px) { .pricing-page-grid { grid-template-columns: 1fr; } }

/* Custom / Enterprise band */
.enterprise-band { margin-top: 32px; background: var(--ink); color: #fff; border-radius: 20px; padding: 36px 40px; display: flex; align-items: center; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.enterprise-band::before { content: ''; position: absolute; top: -80px; right: -40px; width: 380px; height: 280px; background: radial-gradient(ellipse, rgba(124,58,237,.35) 0%, rgba(255,122,43,.18) 50%, transparent 75%); pointer-events: none; }
.enterprise-band > * { position: relative; }
.eb-text { max-width: 620px; }
.eb-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #b9a8ff; margin-bottom: 10px; }
.eb-text h3 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.eb-text p { font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,.7); }
.eb-action { display: flex; flex-direction: column; align-items: center; gap: 10px; flex-shrink: 0; }
.eb-action .ppg-cta { padding: 13px 32px; white-space: nowrap; }
.eb-note { font-size: 12px; color: rgba(255,255,255,.5); }
@media (max-width: 760px) { .enterprise-band { flex-direction: column; align-items: flex-start; padding: 28px 24px; } .eb-action { align-items: stretch; width: 100%; } .eb-action .ppg-cta { text-align: center; } }

/* ── FAQ ── */
.faq-section { max-width: 760px; margin: 0 auto; padding: 24px 24px 96px; }
.faq-section h2 { font-size: clamp(24px,3.5vw,36px); font-weight: 800; letter-spacing: -.025em; text-align: center; margin-bottom: 36px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; background: none; border: none; cursor: pointer; text-align: left; padding: 22px 0; font-size: 16px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: inherit; }
.faq-q .chev { flex-shrink: 0; transition: transform .25s; color: var(--muted); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.faq-item.open .faq-a { max-height: 400px; padding-bottom: 22px; }
.faq-a p { font-size: 15px; line-height: 1.7; color: var(--muted); }

/* ── CASE STUDIES ── */
.cases-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.case-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; text-decoration: none; color: inherit; display: block; }
.case-card:hover { transform: translateY(-3px); box-shadow: 0 16px 50px rgba(0,0,0,.08); }
.case-thumb { height: 180px; background: var(--brand-gradient); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.case-body { padding: 28px; }
.case-tag { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--violet); margin-bottom: 10px; }
.case-body h3 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 10px; line-height: 1.25; }
.case-body p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.case-metrics { display: flex; gap: 24px; }
.case-metric .n { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.case-metric .l { font-size: 11.5px; color: var(--muted); }
@media (max-width: 760px) { .cases-grid { grid-template-columns: 1fr; } }

/* placeholder badge reused across not-yet-real content */
.placeholder-note {
  background: var(--gold-soft); border: 1px solid rgba(245,120,58,.25);
  border-radius: 12px; padding: 16px 20px; margin-bottom: 40px;
  font-size: 13.5px; color: #8a4b1d; line-height: 1.55; text-align: center;
}

/* ── BLOG ── */
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.post-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 16px 50px rgba(0,0,0,.08); }
/* Pre-launch placeholder cards: readable but visibly not links */
.post-card-soon { cursor: default; }
.post-card-soon:hover { transform: none; box-shadow: none; }
.post-card-soon .post-thumb { opacity: .75; }
.post-soon-pill { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--violet-soft); color: var(--violet); padding: 2px 8px; border-radius: 980px; }
.post-thumb { height: 150px; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.post-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.post-cat { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--coral); margin-bottom: 10px; }
.post-body h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; margin-bottom: 10px; }
.post-body p { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; flex: 1; }
.post-meta { font-size: 12px; color: var(--muted); }
@media (max-width: 860px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .blog-grid { grid-template-columns: 1fr; } }

/* ── SETTINGS ── */
.settings-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; max-width: 980px; margin: 0 auto; padding: 56px 24px 96px; }
.settings-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 76px; align-self: start; }
.settings-nav a { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 10px 14px; border-radius: 9px; transition: background .15s, color .15s; }
.settings-nav a:hover { background: var(--surface); color: var(--ink); }
.settings-nav a.active { background: var(--violet-soft); color: var(--violet); font-weight: 600; box-shadow: inset 3px 0 0 var(--violet); }
.settings-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-bottom: 20px; box-shadow: 0 4px 20px rgba(14,14,16,.04); transition: border-color .2s, box-shadow .2s; }
.settings-card:focus-within { border-color: rgba(124,58,237,.35); box-shadow: 0 8px 28px rgba(124,58,237,.08); }
.settings-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.settings-card .sub { font-size: 13.5px; color: var(--muted); margin-bottom: 24px; }
.danger-zone { border-color: rgba(229,62,62,.3); background: linear-gradient(180deg, #fff8f8 0%, var(--white) 60%); }
.danger-zone:focus-within { border-color: rgba(229,62,62,.5); box-shadow: 0 8px 28px rgba(229,62,62,.07); }
.danger-zone h2 { color: var(--error); }
.danger-zone .btn { box-shadow: 0 4px 14px rgba(229,62,62,.25); }
.danger-zone .btn:hover { box-shadow: 0 8px 24px rgba(229,62,62,.32); }
@media (max-width: 760px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; position: static; }
  .settings-nav a.active { box-shadow: inset 0 -3px 0 var(--violet); }
}

/* ── MARKETPLACE (creator brief browsing) ── */
.market-layout { max-width: 980px; margin: 0 auto; padding: 40px 24px 96px; }
.market-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-chip { font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 980px; border: 1.5px solid var(--border); background: var(--white); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.filter-chip:hover { border-color: var(--violet); }
.filter-chip.active { border-color: var(--violet); background: var(--violet-soft); color: var(--violet); }
.brief-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.brief-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: transform .2s, box-shadow .2s; overflow: hidden; }
.brief-card:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,.07); }
/* Brand banner: full-bleed strip that breaks out of the card padding. */
.brief-banner { height: 96px; margin: -26px -26px 16px; background: var(--surface) center/cover no-repeat; }
.brief-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.brief-logo { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; overflow: hidden; }
/* Logo sits inside the tile with the rounded border showing around it. */
.brief-logo img { width: 28px; height: 28px; object-fit: cover; border-radius: 8px; }
.brief-brand { font-size: 14px; font-weight: 700; }
.brief-niche { font-size: 12px; color: var(--muted); }
/* Card shows a shortened teaser; the full brief opens in a modal. */
.brief-desc { font-size: 13.5px; color: #34343a; line-height: 1.55; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.brief-open { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; padding: 0; margin-bottom: 18px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--violet); }
.brief-open:hover { text-decoration: underline; }
.brief-clickable { cursor: pointer; }
/* Detail modal: full brief text with the brand's banner and meta up top. */
.modal-detail-banner { height: 120px; margin: -28px -28px 20px; border-radius: 20px 20px 0 0; background: var(--surface) center/cover no-repeat; }
.modal-detail-meta { display: flex; align-items: center; gap: 14px; margin: 14px 0 18px; }
.brief-detail-desc { font-size: 14px; color: #34343a; line-height: 1.65; white-space: pre-wrap; margin-bottom: 22px; }
.brief-foot { display: flex; justify-content: space-between; align-items: center; }
.brief-rate { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.brief-rate span { font-size: 12px; font-weight: 500; color: var(--muted); }
.brief-spots { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 6px; background: var(--green-soft); color: #007a55; }
@media (max-width: 700px) { .brief-grid { grid-template-columns: 1fr; } }
