/*
Theme Name: Awatif Signal
Theme URI: https://awatifmazhar.com/
Author: Awatif Mazhar
Description: Custom dark theme for awatifmazhar.com. Homepage, article, listing and course templates.
Version: 1.0.9
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: awatif-signal
*/

:root {
  --bg: #0E1114;
  --surface: #161A1F;
  --line: #2A3038;
  --text: #EDEFF2;
  --muted: #A9B1BC;
  --body: #D3D8DF;
  --accent: #C8F169;
  --accent-bg: #23301A;
  --radius: 18px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed; top: 10px; left: 10px; width: auto; height: auto; clip: auto; background: var(--accent); color: var(--bg); padding: 10px 16px; z-index: 100; border-radius: 8px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 860px; }
.display { font-family: var(--display); letter-spacing: -0.03em; line-height: 1.05; font-weight: 700; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 14px 24px; border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: var(--sans); }
.button-primary { background: var(--accent); color: var(--bg); }
.button-primary:hover { background: #d8f88c; color: var(--bg); }
.button-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.button-ghost:hover { border-color: var(--muted); color: var(--text); }
.button-light { background: var(--text); color: var(--bg); }
.button-light:hover { background: #fff; color: var(--bg); }

.pill { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; color: var(--muted); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.kicker { font-size: 13px; color: var(--accent); margin-bottom: 10px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; background: rgba(14, 17, 20, 0.92); backdrop-filter: blur(10px); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.brand:hover { color: var(--text); }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); }
.header-cta { padding: 11px 18px; min-height: 44px; }
.mobile-nav { display: none; }
.mobile-nav summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 15px; min-height: 44px; display: flex; align-items: center; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav[open] .mobile-panel { position: absolute; left: 0; right: 0; top: 72px; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 32px 24px; display: flex; flex-direction: column; }
.mobile-panel a { color: var(--text); text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.mobile-panel .button { margin-top: 18px; }
@media (max-width: 900px) {
  .main-nav, .header-cta { display: none; }
  .mobile-nav { display: block; }
}

/* Sections */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 36px; }
.section-title { font-family: var(--display); font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.03em; line-height: 1.1; margin: 0; font-weight: 700; }
.section-head a { font-weight: 600; text-decoration: none; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.card h3 { font-family: var(--display); font-size: 24px; margin: 0 0 10px; letter-spacing: -0.02em; line-height: 1.25; }
.card p { color: var(--muted); margin: 0; }
.icon-box { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-bg); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 22px; }

/* Home hero */
.hero { padding: 96px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(44px, 7vw, 76px); max-width: 980px; margin: 28px auto 24px; }
.hero p { font-size: 20px; color: var(--muted); max-width: 680px; margin: 0 auto 36px; }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .button-row { justify-content: center; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 20px; }
.chart-card .legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.chart-card svg { width: 100%; height: auto; display: block; }

.case-card { text-decoration: none; border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.case-card:hover { border-color: var(--muted); color: var(--text); }
.case-card.featured { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.case-card.featured:hover { color: var(--bg); background: #d8f88c; }
.case-card .big { font-family: var(--display); font-size: 72px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.case-card .title { font-size: 20px; font-weight: 600; line-height: 1.4; }
.case-card .more { font-weight: 600; color: var(--accent); }
.case-card.featured .more { color: var(--bg); }

.about-grid { display: flex; flex-wrap: wrap; gap: 48px; }
.about-grid > div { flex: 1 1 400px; min-width: 0; }
.quote { font-family: var(--display); font-size: clamp(24px, 3vw, 32px); line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 14px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline strong { display: block; }
.timeline span { color: var(--muted); font-size: 15px; }

.site-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.site-item { border-top: 1px solid var(--line); padding-top: 20px; }
.site-item h3 { font-family: var(--display); font-size: 20px; margin: 0 0 4px; }
.site-item a { text-decoration: none; font-size: 14px; }
.site-item p { color: var(--muted); font-size: 15px; margin: 10px 0 0; }

.post-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.post-item { text-decoration: none; color: var(--text); border-top: 1px solid var(--line); padding-top: 20px; display: block; }
.post-item:hover { color: var(--accent); }
.post-item .kicker { margin-bottom: 10px; }
.post-item h3 { font-family: var(--display); font-size: 22px; line-height: 1.3; font-weight: 600; margin: 0; }
.post-item p { color: var(--muted); font-size: 15px; margin: 10px 0 0; }

.band { border: 1px solid var(--line); border-radius: var(--radius); padding: 44px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.band h2 { font-family: var(--display); font-size: 34px; letter-spacing: -0.03em; margin: 0; line-height: 1.15; }
.band > div { flex: 1 1 520px; min-width: 0; }

.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: center; }
.contact-card h2 { font-family: var(--display); font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.03em; margin: 0 0 10px; line-height: 1.1; }
.contact-card > div:first-child { flex: 1 1 460px; min-width: 0; }

/* Page header (listing + article) */
.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.breadcrumbs { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .current { color: var(--accent); }
.page-title { font-family: var(--display); font-size: clamp(36px, 5.5vw, 58px); line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 20px; max-width: 920px; font-weight: 700; }
.dek { font-size: 20px; color: var(--muted); max-width: 760px; margin: 0 0 24px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.byline strong { color: var(--text); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.avatar-lg { width: 56px; height: 56px; font-size: 16px; }

/* Article layout */
.article-layout { display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; padding: 48px 0 80px; }
.toc { flex: 1 1 240px; max-width: 280px; min-width: 0; position: sticky; top: 100px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.toc-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.toc a { text-decoration: none; color: var(--muted); border-left: 2px solid var(--line); padding-left: 12px; line-height: 1.4; }
.toc a:hover { color: var(--accent); border-left-color: var(--accent); }
.article-main { flex: 999 1 560px; min-width: 0; max-width: 760px; }
@media (max-width: 900px) { .toc { display: none; } .article-layout { gap: 0; } }

/* Article content */
.entry { font-size: 19px; line-height: 1.75; color: var(--body); }
.entry > *:first-child { margin-top: 0; }
.entry p { margin: 0 0 24px; }
.entry h2 { font-family: var(--display); font-size: 30px; line-height: 1.25; color: var(--text); margin: 48px 0 14px; letter-spacing: -0.02em; scroll-margin-top: 100px; }
.entry h3 { font-family: var(--display); font-size: 23px; line-height: 1.3; color: var(--text); margin: 34px 0 12px; letter-spacing: -0.01em; }
.entry ul, .entry ol { margin: 0 0 24px; padding-left: 24px; }
.entry li { margin-bottom: 10px; }
.entry li::marker { color: var(--accent); }
.entry strong, .entry b { color: var(--text); }
.entry a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry a:hover { color: var(--text); }
.entry a.strong-link { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); }
.entry figure { margin: 32px 0; }
.entry figure img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.entry figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.entry table { width: 100%; border-collapse: collapse; margin: 8px 0 28px; font-size: 16px; line-height: 1.55; display: block; overflow-x: auto; }
.entry th, .entry td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--line); vertical-align: top; }
.entry th { background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; }
.entry td:first-child { color: var(--text); font-weight: 600; }
.entry blockquote { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px 28px; margin: 12px 0 28px; }
.entry blockquote p { font-family: var(--display); font-size: 22px; line-height: 1.45; color: var(--text); margin: 8px 0 12px; }
.entry blockquote cite { font-style: normal; font-size: 14px; color: var(--muted); }
.entry .stars { color: var(--accent); letter-spacing: 3px; font-size: 18px; }

.entry .callout { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px 28px; margin: 32px 0; }
.entry .callout-alt { border-color: #3b4a2a; }
.entry .callout-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin: 0 0 8px; }
.entry .callout-text { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text); }

.entry .cta-box { background: var(--accent-bg); border: 1px solid #3b4a2a; border-radius: 16px; padding: 30px; margin: 44px 0; text-align: center; }
.entry .cta-box p { font-size: 18px; color: var(--text); margin: 0 0 18px; }
.entry .btn, .entry a.btn { display: inline-flex; align-items: center; min-height: 46px; background: var(--accent); color: var(--bg); padding: 12px 24px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 15px; }
.entry a.btn:hover { background: #d8f88c; color: var(--bg); }

.entry .note, .entry .brief-box { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; padding: 18px 22px; margin: 0 0 26px; font-size: 17px; }
.entry .brief-box ol, .entry .brief-box ul { margin-bottom: 0; }

.entry .facts, .entry .stats, .entry .phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 8px 0 28px; }
.entry .fact, .entry .stat, .entry .phase { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.entry .fact span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.entry .fact strong { display: block; font-size: 16px; margin-top: 4px; line-height: 1.4; }
.entry .stat b { display: block; font-family: var(--display); font-size: 30px; line-height: 1.1; color: var(--accent); }
.entry .stat small { display: block; font-size: 15px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.entry .phase .when { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.entry .phase h3 { font-size: 18px; margin: 6px 0 8px; }
.entry .phase p { font-size: 15px; margin: 0; color: var(--muted); line-height: 1.5; }

.entry .faq-item { border-top: 1px solid var(--line); padding: 18px 0 4px; }
.entry .faq-item:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.entry .faq-item h3 { margin-top: 0; font-size: 20px; }

.entry .related { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 28px; }
.entry .related-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 16px; }
.entry .related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.entry .related-list li { margin: 0; }
.entry .related-list a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; text-decoration: none; color: var(--text); font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.35; }
.entry .related-list a:hover { border-color: var(--accent); color: var(--accent); }

.author-box { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 28px; display: flex; gap: 18px; align-items: flex-start; }
.author-box p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.author-box strong { color: var(--text); }
.author-box a { text-decoration: none; font-weight: 600; }

/* Listing */
.listing { padding: 48px 0 88px; }
.listing .post-list { row-gap: 40px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-row a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; color: var(--muted); text-decoration: none; }
.filter-row a:hover, .filter-row a.active { border-color: var(--accent); color: var(--accent); }

/* Course */
.course-hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 72px 0 64px; }
.course-hero > div:first-child { flex: 999 1 600px; min-width: 0; }
.course-hero h1 { font-size: clamp(40px, 6vw, 62px); margin: 24px 0 22px; }
.course-hero p { font-size: 19px; color: var(--muted); margin: 0 0 30px; max-width: 620px; }
.stat-grid { flex: 1 1 320px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.stat-tile b { display: block; white-space: nowrap; font-family: var(--display); font-size: clamp(30px, 3vw, 40px); color: var(--accent); line-height: 1.1; }
.stat-tile span { color: var(--muted); font-size: 15px; }
.week-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.week-grid .card { padding: 26px; }
.week-grid .card h3 { font-size: 21px; }
.week-grid ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.week-grid li { margin-bottom: 8px; }
.who-list { display: flex; flex-wrap: wrap; gap: 10px; }
.who-list span { border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; color: var(--text); }
.split { display: flex; flex-wrap: wrap; gap: 18px; }
.split > * { flex: 1 1 420px; min-width: 0; }
.instructor-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 24px; }
.instructor-stats b { display: block; font-family: var(--display); font-size: 28px; }
.instructor-stats span { color: var(--muted); font-size: 14px; }
.price-card { background: var(--accent); color: var(--bg); border-radius: var(--radius); padding: 34px; }
.price-card .now { font-family: var(--display); font-size: 52px; font-weight: 700; letter-spacing: -0.03em; }
.price-card s { font-size: 18px; margin-left: 12px; }
.price-card ul { margin: 18px 0 22px; padding-left: 20px; line-height: 1.7; font-size: 15px; }
.price-card .small { font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.price-card a { color: var(--bg); }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.form-grid label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }
.form-grid input, .form-grid select { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; color: var(--text); font-size: 16px; font-family: var(--sans); min-height: 50px; }
.form-grid input:focus, .form-grid select:focus { border-color: var(--accent); outline: none; }
.form-grid .button { align-self: end; }
.hp-field { position: absolute; left: -9999px; }
.notice { border-radius: 12px; padding: 18px 20px; margin-bottom: 24px; }
.notice-success { background: var(--accent-bg); border: 1px solid #3b4a2a; color: var(--text); }
.notice-error { background: #3a1d1d; border: 1px solid #6b2e2e; color: #ffd9d9; }
.faq details { border-top: 1px solid var(--line); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 36px; color: var(--muted); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; margin-bottom: 40px; }
.footer-grid h4 { color: var(--text); font-size: 14px; margin: 0 0 14px; font-weight: 600; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 24px; font-size: 14px; }

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .card, .band, .contact-card, .form-card { padding: 26px; }
  .case-card { padding: 28px; }
  .case-card .big { font-size: 56px; }
  .entry { font-size: 18px; }
  .entry h2 { font-size: 26px; }
  .mobile-nav[open] .mobile-panel { padding: 12px 20px 24px; }
}
