/* CortexLeap — Home revamp (page-scoped)
 * Loaded only by en/index.html and pt/index.html via head_extra.
 * Reuses global tokens from style.css; adds Home-only sections.
 * Gradient accents reuse the H1 palette: text -> #c4b5fd -> amber.
 */

/* ── Hero ── */
.home-hero { padding: 6rem 1.5rem 4.5rem; }
.hero-note { margin-top: 1.4rem; font-size: 0.88rem; color: var(--text-muted); }

/* ── Gradient accents (H1 technique reused) ── */
.gradient-heading {
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--text) 0%, #c4b5fd 50%, var(--amber) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text); /* fallback */
}

/* ── Two-path choice ── */
.choice-section { padding: var(--section-pad) 1.5rem; }
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 880px; margin: 0 auto; }
.choice-card {
  display: flex; flex-direction: column; gap: 0.8rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem 1.75rem; text-decoration: none; color: var(--text);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.choice-card:hover { transform: translateY(-3px); border-color: var(--border-hover); background: var(--surface-hover); }
.choice-card:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.choice-icon { color: var(--amber); }
.choice-icon svg { width: 34px; height: 34px; }
.choice-card h3 { font-family: var(--font-heading); font-size: 1.25rem; letter-spacing: -0.01em; }
.choice-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; flex-grow: 1; }
.choice-cta { color: var(--amber); font-weight: 600; font-size: 0.95rem; }

/* ── Demonstration (static, labelled, synthetic) ── */
.demo-section { padding: var(--section-pad) 1.5rem; background: rgba(19, 18, 32, 0.45); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.demo-label {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--amber); border: 1px solid var(--amber);
  border-radius: 999px; padding: 0.3rem 0.9rem; margin-bottom: 1.1rem;
}
.demo-steps { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; margin-top: 2.5rem; }
.demo-step h3 { font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: 0.9rem; }
.demo-bubble { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius) var(--radius) var(--radius) 4px; padding: 1rem 1.1rem; }
.demo-bubble p { font-size: 0.92rem; color: var(--text); line-height: 1.55; }
.demo-draft { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.4rem 1.1rem; }
.demo-draft > div { display: flex; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px dashed var(--border); }
.demo-draft > div:last-child { border-bottom: none; }
.demo-draft dt { flex: 0 0 38%; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding-top: 0.15rem; }
.demo-draft dd { font-size: 0.9rem; color: var(--text); line-height: 1.45; }
.demo-check { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--amber); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.demo-check p { font-size: 0.92rem; color: var(--text); line-height: 1.55; }
.demo-check strong { color: var(--amber); font-weight: 700; }
.demo-step-note { margin-top: 0.7rem; font-size: 0.8rem; color: var(--text-muted); line-height: 1.45; }
.demo-footnote { margin-top: 2rem; text-align: center; font-size: 0.82rem; color: var(--text-muted); }

/* ── Founder ── */
.founder-section { padding: var(--section-pad) 1.5rem; }
.founder-grid { display: grid; grid-template-columns: 320px 1fr; gap: 3rem; align-items: start; }
.founder-monogram {
  display: flex; align-items: center; justify-content: center;
  width: 92px; height: 92px; border-radius: 50%; margin-bottom: 1.4rem;
  font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--text);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, #c4b5fd, var(--amber)) border-box;
  border: 2px solid transparent;
}
.founder-id h2 { font-family: var(--font-heading); font-size: 1.6rem; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.founder-name { font-weight: 700; color: var(--text); }
.founder-role { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 1.2rem; }
.founder-link { color: var(--amber); font-weight: 600; text-decoration: none; }
.founder-link:hover { text-decoration: underline; }
.founder-link:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.founder-facts { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.founder-facts li { position: relative; padding-left: 1.6rem; color: var(--text); font-size: 0.97rem; line-height: 1.55; }
.founder-facts li::before { content: ""; position: absolute; left: 0; top: 0.55rem; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #c4b5fd, var(--amber)); }

/* ── Offer previews ── */
.offers-section { padding: var(--section-pad) 1.5rem; background: rgba(19, 18, 32, 0.45); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.offer-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 880px; margin: 0 auto; }
.offer-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.offer-card h3 { font-family: var(--font-heading); font-size: 1.15rem; margin-bottom: 0.6rem; }
.offer-card p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.55; margin-bottom: 1rem; }
.offer-link { color: var(--amber); font-weight: 600; text-decoration: none; }
.offer-link:hover { text-decoration: underline; }
.offer-link:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.offers-note { text-align: center; margin-top: 1.8rem; font-size: 0.85rem; color: var(--text-muted); }

/* ── Process ── */
.process-section { padding: var(--section-pad) 1.5rem; }
.process-steps { list-style: none; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; counter-reset: home-process; max-width: 1000px; margin: 0 auto; }
.process-steps li { counter-increment: home-process; position: relative; padding-top: 3.4rem; }
.process-steps li::before {
  content: counter(home-process);
  position: absolute; top: 0; left: 0;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; color: #09090d;
  background: linear-gradient(135deg, var(--amber), var(--amber-hover));
}
.process-steps h3 { font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: 0.5rem; }
.process-steps p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; }

/* ── Recent articles ── */
.home-articles { padding: var(--section-pad) 1.5rem; background: rgba(19, 18, 32, 0.45); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.home-article-list { display: flex; flex-direction: column; gap: 1.4rem; max-width: 760px; margin: 0 auto; }
.home-article { border-bottom: 1px solid var(--border); padding-bottom: 1.4rem; }
.home-article-date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.home-article h3 { font-family: var(--font-heading); font-size: 1.1rem; line-height: 1.35; margin-bottom: 0.4rem; }
.home-article h3 a { color: var(--text); text-decoration: none; }
.home-article h3 a:hover { color: var(--amber); }
.home-article h3 a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.home-article-summary { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.home-article-empty { color: var(--text-muted); font-size: 0.95rem; }
.home-articles-more { margin-top: 1.6rem; text-align: center; }
.home-articles-more a { color: var(--amber); font-weight: 600; text-decoration: none; }
.home-articles-more a:hover { text-decoration: underline; }
.home-articles-more a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ── Buying answers ── */
.answers-section { padding: var(--section-pad) 1.5rem; }
.answers-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.8rem; }
.answers-list details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.answers-list summary {
  cursor: pointer; padding: 1rem 1.2rem; font-weight: 600; font-size: 0.97rem; color: var(--text);
  list-style-position: outside;
}
.answers-list summary:hover { color: var(--amber); }
.answers-list summary:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.answers-list details[open] summary { border-bottom: 1px solid var(--border); }
.answers-list details p { padding: 1rem 1.2rem; color: var(--text-muted); font-size: 0.93rem; line-height: 1.6; }

/* ── Closing ── */
.closing-section { padding: 5rem 1.5rem; text-align: center; }
.closing-section h2 { font-family: var(--font-heading); font-size: 2rem; letter-spacing: -0.02em; margin-bottom: 0.8rem; }
.closing-sub { color: var(--text-muted); max-width: 560px; margin: 0 auto 2.2rem; line-height: 1.55; }
.closing-cta { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.closing-alt { font-size: 0.9rem; color: var(--text-muted); }
.closing-alt a { color: var(--amber); }

/* ── Mobile ── */
@media (max-width: 900px) {
  .demo-steps { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .founder-grid { grid-template-columns: 1fr; gap: 2rem; }
  .process-steps { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 768px) {
  /* R1 fix (Codex review): tighten the hero's vertical spend so the reassurance
     note clears the closed chat toggle's zone (bottom 5.4rem + 54px) at initial
     load, without moving the obstruction onto the CTA buttons or the booking bar.
     Chat behaviour unchanged; scoped to Home classes only. */
  .home-hero { padding: 3.1rem 1.25rem 2.6rem; }
  .home-hero h1 { margin-bottom: 0.7rem; }
  .home-hero .hero-sub { font-size: 0.95rem; line-height: 1.45; margin-bottom: 1.4rem; }
  .home-hero .hero-cta { gap: 0.75rem; }
  .home-hero .hero-cta .btn { font-size: 0.9rem; padding: 0.65rem 1.1rem; }
  .home-hero .hero-note { margin-top: 0.9rem; font-size: 0.85rem; line-height: 1.4; }
  .choice-cards, .offer-cards { grid-template-columns: 1fr; }
  /* Chat toggle above the sticky mobile CTA bar (Home-scoped overlap fix) */
  .chat-widget { bottom: 5.4rem; }
  .chat-panel { max-height: calc(100vh - 220px); }
}
@media (max-width: 400px) {
  /* Extra clearance for the narrowest widths, where the hero subhead wraps most */
  .home-hero { padding-top: 2.6rem; }
  .home-hero .hero-sub { font-size: 0.92rem; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .choice-card, .choice-card:hover { transform: none; transition: none; }
  .home-articles a, .answers-list summary { transition: none; }
}
