/*
Theme Name: Geek Source Codes — Coral
Theme URI: https://geeksourcecodes.com
Description: Coral design-system child theme for Geek Source Codes. Recreates the full GSC redesign (dark search-first hero, category grid, project + tutorial cards, prose article styles, dark footer) on top of Kadence. Single --primary accent (#e0563f). Light + dark modes.
Author: Bonalta
Template: kadence
Version: 1.0.0
Text Domain: gsc-coral
*/

/* ============================================================
   This file holds only the WordPress-integration mappings.
   The full design system lives in assets/design.css (enqueued
   in functions.php). Here we map the_content() / WP markup onto
   the prototype's component classes.
   ============================================================ */

/* Smaller hero headline + tighter hero so the search bar is visible above the fold */
.hero h1 { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.12; }
.hero .lede { margin-top: 16px; }
.hero .search { margin-top: 24px; }
.hero-inner { padding-top: clamp(40px, 5vw, 60px); padding-bottom: clamp(30px, 4vw, 48px); }
@media (max-width: 460px){ .hero h1 { font-size: clamp(24px, 7vw, 32px); } }

/* Keep WP admin bar from covering the sticky header */
body.admin-bar .topbar { top: 32px; }
@media (max-width: 782px){ body.admin-bar .topbar { top: 46px; } }

/* the_content() output -> .prose styles (article body) */
.entry-content > * + * { margin-top: 22px; }
.entry-content p { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.entry-content h2 { font-family: var(--font-display); font-size: 28px; margin-top: 44px; letter-spacing: -.02em; scroll-margin-top: 92px; }
.entry-content h3 { font-family: var(--font-display); font-size: 21px; margin-top: 34px; letter-spacing: -.02em; scroll-margin-top: 92px; }
.entry-content ul, .entry-content ol { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.entry-content li { font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.entry-content li::marker { color: var(--primary); }
.entry-content a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.entry-content strong { color: var(--ink); font-weight: 700; }
.entry-content code { font-family: var(--font-mono); font-size: .86em; background: var(--primary-soft); color: var(--primary-700); padding: 2px 7px; border-radius: 6px; }
.entry-content pre { background: var(--night); border: 1px solid var(--night-line); border-radius: var(--r-md); padding: 14px 16px; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.8; color: var(--night-ink-2); overflow-x: auto; }
.entry-content pre code { background: none; color: inherit; padding: 0; }
.entry-content blockquote { border-left: 3px solid var(--primary); padding: 4px 0 4px 22px; margin: 22px 0 22px 0; font-family: var(--font-display); font-size: 21px; color: var(--ink); line-height: 1.4; }
.entry-content img { display: block; border-radius: var(--r-md); border: 1px solid var(--line); height: auto; }
.entry-content figure { margin: 22px 0; }
.entry-content figcaption { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-top: 8px; }

/* "READ ALSO:" inline callouts that exist in legacy content */
.entry-content p > strong:first-child { color: var(--ink); }

/* Visually-hidden helper */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Real featured image inside a project card shot */
.proj-thumb { position: absolute; inset: 0; }
.proj-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .stage .gimg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.gallery .stage img.gimg { object-fit: cover; }

/* Article cover with real featured image */
.article-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Tutorial feature banner image already positioned inline */

/* WP alignment helpers inside prose */
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content .alignright { float: right; margin: 0 0 16px 24px; }
.entry-content .alignleft { float: left; margin: 0 24px 16px 0; }

/* Gated download card */
.gsc-dl-box { max-width: 760px; margin: 0 auto 36px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--r-lg); padding: 22px 26px; box-shadow: var(--shadow-md); }
.gsc-dl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.gsc-dl-price { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); display: inline-flex; align-items: baseline; gap: 8px; }
.gsc-dl-price b { font-family: var(--font-display); font-size: 26px; color: var(--signal-ink); }
.gsc-dl-head .free-tag { background: var(--signal-soft); color: var(--signal-ink); }
.gsc-dl-sub { color: var(--ink-2); font-size: 15px; margin-bottom: 16px; line-height: 1.55; }
.gsc-dl-btn { width: 100%; justify-content: center; }
.gsc-dl-note { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }
.gsc-dl-note a { color: var(--primary); font-weight: 600; }
