/*
Theme Name: Phambily Analytics
Theme URI: https://phambilyanalytics.co.za
Author: Phambily Analytics
Author URI: https://phambilyanalytics.co.za
Description: A responsive, engagement-focused WordPress theme for Phambily Analytics, covering data strategy, data literacy, responsible AI, research consulting, mentorship, educational support and school resources.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: phambily-analytics
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-logo, custom-menu, featured-images, one-column, accessibility-ready, education, business
*/

:root {
  --brand-wine: #94182f;
  --brand-wine-dark: #651122;
  --brand-gold: #f3a72f;
  --brand-ink: #20191b;
  --brand-paper: #fbf7f1;
  --brand-line: #e8ddd2;
  --background: #fffdf9;
  --muted-text: #6d6264;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--brand-ink); font-family: "Montserrat", "Avenir Next", "Segoe UI", sans-serif; line-height: 1.6; }
body.admin-bar .site-header { top: 32px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; height: auto; }
svg { width: 1.2rem; height: 1.2rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { top: 8px; left: 8px; width: auto; height: auto; padding: .8rem 1rem; clip: auto; background: white; color: var(--brand-wine); z-index: 9999; }
:focus-visible { outline: 3px solid var(--brand-gold); outline-offset: 3px; }

.site-header { min-height: 86px; padding: 0 5vw; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; background: rgba(255,253,249,.95); border-bottom: 1px solid var(--brand-line); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(16px); }
.brand, .brand .custom-logo-link { display: inline-flex; align-items: center; }
.brand img, .brand .custom-logo { width: 210px; max-height: 66px; object-fit: contain; object-position: left center; }
.primary-navigation .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.65rem; align-items: center; }
.primary-navigation a { position: relative; font-size: .88rem; font-weight: 700; }
.primary-navigation a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--brand-gold); transition: right 180ms ease; }
.primary-navigation a:hover::after, .primary-navigation a:focus-visible::after { right: 0; }
.menu-toggle { display: none; border: 0; background: transparent; padding: .5rem; }
.menu-toggle > span:not(.screen-reader-text) { width: 24px; height: 2px; margin: 4px 0; display: block; background: var(--brand-wine); }
.button { min-height: 46px; padding: .78rem 1.25rem; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; border: 1px solid transparent; border-radius: 999px; font-weight: 800; font-size: .82rem; cursor: pointer; transition: transform 180ms ease, background 180ms ease, border-color 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary, .header-cta { background: var(--brand-wine); color: #fff; }
.button-primary:hover, .header-cta:hover { background: var(--brand-wine-dark); }
.button-outline { border-color: #cbbdb3; background: transparent; color: var(--brand-ink); }
.button-dark { background: var(--brand-ink); color: #fff; }
.header-cta { justify-self: end; }

.hero { min-height: 715px; padding: 5rem 5vw 4.2rem; display: grid; grid-template-columns: minmax(0,1.04fr) minmax(480px,.96fr); align-items: center; gap: 5vw; position: relative; overflow: hidden; background: radial-gradient(circle at 90% 5%,rgba(243,167,47,.19),transparent 30%),linear-gradient(135deg,#fffdf9 0%,#fbf2ea 100%); }
.hero::before { content: ""; width: 300px; height: 300px; border: 1px solid rgba(148,24,47,.12); border-radius: 50%; position: absolute; left: -170px; top: 180px; }
.eyebrow { margin: 0 0 1rem; display: flex; align-items: center; gap: .65rem; color: var(--brand-wine); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 800; }
.eyebrow span { width: 2.5rem; height: 2px; background: var(--brand-gold); display: inline-block; }
.hero h1 { margin: 0; max-width: 760px; font-family: "Abril Fatface", Georgia, serif; font-size: clamp(3.5rem,6vw,6.25rem); font-weight: 400; line-height: .97; letter-spacing: -.035em; }
.hero h1 em { color: var(--brand-wine); font-style: normal; }
.hero-lead { max-width: 700px; margin: 1.65rem 0 2rem; color: #62575a; font-size: clamp(1rem,1.45vw,1.25rem); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.trust-line { margin-top: 2.6rem; padding-top: 1.45rem; border-top: 1px solid var(--brand-line); display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; color: #6f6466; font-size: .73rem; line-height: 1.4; }
.trust-line span { display: flex; flex-direction: column; }
.trust-line strong { color: var(--brand-wine); font-family: Georgia,serif; font-size: 1.55rem; }

.hero-visual { min-height: 520px; padding: 1.4rem; border-radius: 2.2rem; background: var(--brand-wine-dark); color: #fff; box-shadow: 0 36px 80px rgba(84,15,31,.22); position: relative; overflow: hidden; }
.hero-visual::before { content: ""; width: 280px; height: 280px; border-radius: 50%; background: rgba(243,167,47,.18); position: absolute; right: -80px; top: -110px; }
.visual-topline { display: flex; gap: .6rem; align-items: center; padding: .6rem .7rem 1.35rem; color: #f8dfb6; font-size: .8rem; font-weight: 700; position: relative; }
.visual-topline svg { color: var(--brand-gold); }
.data-ribbon { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: .65rem; padding: 1rem; border: 1px solid rgba(255,255,255,.15); border-radius: 1.3rem; background: rgba(255,255,255,.08); position: relative; }
.data-ribbon > svg { width: 17px; color: var(--brand-gold); }
.ribbon-block { display: flex; flex-direction: column; }
.ribbon-block span { color: var(--brand-gold); font-size: .68rem; font-weight: 800; }
.ribbon-block strong { font-size: .9rem; }
.ribbon-block small { color: #d9c8ca; line-height: 1.3; font-size: .68rem; }
.mini-dashboard { min-height: 315px; margin-top: 1rem; padding: 2rem; display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 1.4rem; border-radius: 1.3rem; background: #fffaf3; color: var(--brand-ink); position: relative; }
.status-dot { color: var(--brand-wine); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.status-dot::before { content: ""; width: 7px; height: 7px; display: inline-block; margin-right: .5rem; border-radius: 50%; background: var(--brand-gold); }
.mini-dashboard h2 { margin: 1rem 0 0; font-family: Georgia,serif; font-size: clamp(1.5rem,2vw,2.15rem); line-height: 1.15; font-weight: 500; }
.signal-bars { height: 180px; display: flex; align-items: flex-end; gap: 9px; border-bottom: 1px solid #d8ccc1; }
.signal-bars i { flex: 1; min-width: 12px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg,var(--brand-gold),var(--brand-wine)); opacity: .88; }

.service-section, .about-section, .technology-section, .insights-section, .faq-section, .content-area { padding: 7rem 5vw; }
.section-heading { max-width: 1300px; margin: 0 auto 3rem; display: grid; grid-template-columns: 1.35fr .65fr; gap: 3rem; align-items: end; }
.section-heading h2, .about-statement h2, .contact-copy h2, .academy-section h2, .faq-intro h2 { margin: 0; font-family: Georgia,serif; font-size: clamp(2.2rem,4.3vw,4.2rem); line-height: 1.08; font-weight: 500; letter-spacing: -.025em; }
.section-heading > p { color: #716669; margin: 0 0 .4rem; }
.service-grid { max-width: 1300px; margin: auto; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--brand-line); border-left: 1px solid var(--brand-line); }
.service-card { min-height: 390px; padding: 2rem; display: flex; flex-direction: column; border-right: 1px solid var(--brand-line); border-bottom: 1px solid var(--brand-line); background: #fffefa; position: relative; transition: transform 180ms ease,box-shadow 180ms ease,background 180ms ease; }
.service-card:hover { transform: translateY(-5px); background: #fff8ef; box-shadow: 0 22px 45px rgba(69,26,35,.08); z-index: 2; }
.service-number { position: absolute; top: 1.3rem; right: 1.5rem; color: #c6b8b2; font-family: Georgia,serif; font-size: 1.1rem; }
.service-card > svg { width: 38px; height: 38px; color: var(--brand-wine); margin: 1rem 0 2.1rem; }
.service-card h3 { margin: 0; max-width: 300px; font-family: Georgia,serif; font-size: 1.55rem; line-height: 1.18; }
.service-card p { color: #6b6063; font-size: .91rem; }
.service-card small { margin-top: auto; color: var(--brand-wine); font-size: .72rem; font-weight: 700; }
.service-card button { margin-top: 1.2rem; padding: 0; width: fit-content; display: flex; gap: .45rem; align-items: center; background: none; border: 0; color: var(--brand-ink); font-weight: 800; font-size: .76rem; cursor: pointer; }
.service-card button svg { width: 15px; }

.pathway-section { padding: 7rem 5vw; background: var(--brand-wine-dark); color: #fff; }
.section-heading.light .eyebrow, .pathway-content .eyebrow { color: #ffd890; }
.section-heading.light > p { color: #d8c5c9; }
.pathway-tabs { max-width: 1300px; margin: auto; }
.pathway-list { width: 100%; padding: .4rem; display: grid; grid-template-columns: repeat(3,1fr); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: .8rem; }
.pathway-list button { min-height: 52px; border: 0; border-radius: .55rem; background: transparent; color: #eadde0; font-weight: 700; cursor: pointer; }
.pathway-list button[aria-selected="true"] { background: var(--brand-gold); color: var(--brand-ink); }
.pathway-content { min-height: 380px; padding: 4rem; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 5rem; background: #fffaf3; color: var(--brand-ink); border-radius: 1.5rem; }
.pathway-content[hidden] { display: none; }
.pathway-content h3 { margin: 0 0 1.2rem; max-width: 650px; font-family: Georgia,serif; font-size: clamp(2rem,3.4vw,3.3rem); line-height: 1.1; font-weight: 500; }
.pathway-content p:not(.eyebrow) { max-width: 650px; color: #6b6062; }
.pathway-content .button { margin-top: 1rem; }
.pathway-content ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 1rem; }
.pathway-content li { padding: 1rem 1.1rem; display: flex; align-items: center; gap: 1rem; border: 1px solid var(--brand-line); border-radius: .8rem; background: #fff; font-weight: 700; font-size: .9rem; }
.pathway-content li svg { flex: 0 0 auto; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--brand-gold); color: var(--brand-wine-dark); }

.about-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8vw; background: var(--brand-paper); }
.about-statement::after { content: "PA"; display: block; margin-top: 2rem; color: rgba(148,24,47,.08); font-family: Georgia,serif; font-size: 8rem; line-height: 1; }
.about-copy > p { margin-top: .2rem; color: #5f5557; font-family: Georgia,serif; font-size: 1.35rem; line-height: 1.55; }
.value-grid { margin-top: 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.value-grid div { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; }
.value-grid svg { grid-row: 1/3; width: 27px; height: 27px; color: var(--brand-wine); }
.value-grid strong { line-height: 1.25; }
.value-grid span { color: #796e70; font-size: .8rem; }

.technology-section { background: #fffdf9; }
.technology-grid { max-width: 1300px; margin: auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.technology-grid article { min-height: 220px; padding: 2rem; border: 1px solid var(--brand-line); border-radius: 1.2rem; background: #fffaf3; }
.technology-grid svg { width: 34px; height: 34px; color: var(--brand-wine); }
.technology-grid h3 { margin: 2rem 0 .65rem; font-family: Georgia,serif; font-size: 1.4rem; font-weight: 500; }
.technology-grid p { margin: 0; color: #6b6063; }

.academy-section { padding: 5rem 5vw; display: flex; align-items: end; justify-content: space-between; gap: 4rem; background: var(--brand-gold); }
.academy-section > div { max-width: 850px; }
.academy-section .eyebrow { color: var(--brand-wine-dark); }
.academy-section p:last-child { max-width: 650px; }
.academy-section .button { flex: 0 0 auto; }

.insights-section { background: var(--brand-paper); }
.social-grid { max-width: 1300px; margin: auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.social-grid > a { min-height: 170px; padding: 1.6rem; display: grid; grid-template-columns: 1fr auto; gap: .65rem 1rem; align-content: start; border: 1px solid var(--brand-line); border-radius: 1rem; background: #fff; transition: transform 180ms ease,box-shadow 180ms ease; }
.social-grid > a:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(69,26,35,.08); }
.social-grid strong { font-family: Georgia,serif; font-size: 1.35rem; }
.social-grid span { grid-column: 1/-1; color: #6b6063; font-size: .86rem; line-height: 1.55; }
.social-grid b { color: var(--brand-wine); font-size: 1.2rem; }

.faq-section { display: grid; grid-template-columns: .75fr 1.25fr; gap: 7vw; background: #fff; }
.faq-intro > p:last-child { max-width: 480px; color: #716669; }
.faq-list { border-top: 1px solid var(--brand-line); }
.faq-list details { border-bottom: 1px solid var(--brand-line); }
.faq-list summary { padding: 1.35rem 2.2rem 1.35rem 0; position: relative; list-style: none; cursor: pointer; font-family: Georgia,serif; font-size: 1.25rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: .2rem; color: var(--brand-wine); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin: 0; padding: 0 2.2rem 1.35rem 0; color: #6b6063; }

.contact-section { padding: 7rem 5vw; display: grid; grid-template-columns: .82fr 1.18fr; gap: 6vw; background: var(--brand-ink); color: #fff; }
.contact-copy > p:not(.eyebrow) { max-width: 540px; color: #cdbfc1; }
.contact-copy .eyebrow { color: #ffd890; }
.direct-contact { margin-top: 2.5rem; display: grid; gap: .8rem; }
.direct-contact a { width: fit-content; display: flex; align-items: center; gap: .7rem; color: #f8e5c4; font-size: .85rem; }
.direct-contact svg { width: 20px; color: var(--brand-gold); }
.enquiry-form { padding: 2.2rem; display: grid; gap: 1.2rem; border-radius: 1.5rem; background: #fffaf3; color: var(--brand-ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.enquiry-form label { margin-bottom: .55rem; display: block; font-size: .78rem; font-weight: 700; }
.enquiry-form label small { color: var(--muted-text); font-weight: 400; }
.enquiry-form input, .enquiry-form select, .enquiry-form textarea { min-height: 46px; width: 100%; padding: .7rem .8rem; border: 1px solid #d8cbc0; border-radius: .6rem; background: #fff; color: var(--brand-ink); }
.enquiry-form textarea { min-height: 130px; resize: vertical; }
.form-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.form-actions .button-outline { border-color: #b9aaa0; }
.form-note, .form-status { margin: 0; color: #7a6e70; font-size: .7rem; }
.form-status { min-height: 1.1rem; color: var(--brand-wine); font-weight: 700; }

.site-footer { padding: 3rem 5vw 2rem; display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; background: #130f10; color: #b9acae; }
.footer-brand img { width: 190px; }
.footer-brand p { color: #f3dcae; font-family: Georgia,serif; font-size: 1.2rem; }
.footer-links { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; font-size: .78rem; color: #fff; }
.footer-legal { grid-column: 1/-1; padding-top: 1.4rem; display: flex; gap: 1.5rem; flex-wrap: wrap; border-top: 1px solid #3a3032; font-size: .72rem; }

.content-area { max-width: 1000px; margin: auto; min-height: 60vh; }
.content-area h1 { font-family: Georgia,serif; font-size: clamp(2.5rem,5vw,4.5rem); line-height: 1.08; }
.entry-card { padding: 2rem 0; border-bottom: 1px solid var(--brand-line); }
.entry-card h2 { font-family: Georgia,serif; font-size: 2rem; }
.page-navigation { margin-top: 2rem; display: flex; justify-content: space-between; }

@media (max-width: 1050px) {
  .site-header { grid-template-columns: 1fr auto auto; }
  .menu-toggle { display: block; }
  .primary-navigation { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 1.2rem 5vw 1.8rem; background: #fffdf9; border-bottom: 1px solid var(--brand-line); box-shadow: 0 14px 30px rgba(50,20,28,.1); }
  .primary-navigation.is-open { display: block; }
  .primary-navigation .menu { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-navigation a { display: block; padding: .8rem 0; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 480px; }
  .service-grid { grid-template-columns: repeat(2,1fr); }
  .about-section, .contact-section, .faq-section { grid-template-columns: 1fr; }
  .technology-grid, .social-grid { grid-template-columns: 1fr; }
  .about-statement::after { display: none; }
}

@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

@media (max-width: 720px) {
  .site-header { min-height: 74px; padding-inline: 1.1rem; gap: .45rem; }
  .brand img, .brand .custom-logo { width: 145px; }
  .header-cta { min-height: 36px; padding: .55rem .75rem; font-size: .66rem; }
  .hero, .service-section, .pathway-section, .about-section, .technology-section, .academy-section, .insights-section, .faq-section, .contact-section, .content-area { padding: 4.5rem 1.2rem; }
  .hero { min-height: 0; grid-template-columns: minmax(0,1fr); }
  .hero h1 { font-size: clamp(3.1rem,15vw,5rem); }
  .hero-actions .button { width: 100%; }
  .trust-line { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; padding: .8rem; border-radius: 1.4rem; }
  .data-ribbon { grid-template-columns: 1fr; }
  .data-ribbon > svg { transform: rotate(90deg); justify-self: center; }
  .mini-dashboard { min-height: 360px; padding: 1.4rem; grid-template-columns: 1fr; }
  .signal-bars { height: 110px; }
  .section-heading { grid-template-columns: 1fr; gap: 1rem; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 350px; }
  .pathway-list { grid-template-columns: 1fr; }
  .pathway-content { padding: 2rem 1.3rem; grid-template-columns: 1fr; gap: 2rem; }
  .value-grid, .field-row { grid-template-columns: 1fr; }
  .academy-section { align-items: flex-start; flex-direction: column; gap: 2rem; }
  .form-actions { flex-direction: column; }
  .form-actions .button { width: 100%; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-links, .footer-legal { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
