/*
Theme Name: WPPII
Theme URI: https://wppii.ca
Author: Western Pacific Property Inspection Institute
Description: Custom theme for Western Pacific Property Inspection Institute (WPPII), built from the approved WPPII design.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: wppii
*/

/* ---------------------------------------------------------------------
   Design tokens (from the approved design canvas)
------------------------------------------------------------------- */
:root{
  --bg: oklch(98% 0.006 248);
  --surface: oklch(100% 0 0);
  --cream: oklch(95% 0.02 248);
  --navy: oklch(33% 0.075 248);
  --navy-700: oklch(38% 0.075 248);
  --navy-900: oklch(15% 0.05 248);
  --ink: oklch(20% 0.025 248);
  --slate: oklch(46% 0.03 248);
  --line: oklch(89% 0.015 248);
  --accent: oklch(64% 0.11 248);
  --accent-dark: oklch(54% 0.13 248);
}

/* ---------------------------------------------------------------------
   Reset & base type
------------------------------------------------------------------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{ margin:0; font-family:'Work Sans', system-ui, sans-serif; color:var(--ink); background:var(--bg); overflow-x:hidden; }
h1,h2,h3{ font-family:'Newsreader', Georgia, serif; margin:0; color:var(--navy); font-weight:600; }
p{ margin:0; line-height:1.65; }
a{ text-decoration:none; color:var(--accent-dark); }
a:hover{ color:var(--accent); }
img{ max-width:100%; }
ul,ol{ margin:0; padding:0; }

.site-wrap{ width:100%; max-width:1440px; margin:0 auto; background:var(--bg); }

/* ---------------------------------------------------------------------
   Shared components
------------------------------------------------------------------- */
.navlink{ color:var(--ink); font-size:15px; font-weight:500; padding-bottom:4px; border-bottom:2px solid transparent; }
.navlink:hover{ color:var(--navy); }
.navlink.active{ color:var(--navy); border-bottom:2px solid var(--accent); }

.btn-primary{ display:inline-flex; align-items:center; justify-content:center; gap:8px; background:var(--accent); color:var(--navy-900); font-weight:600; font-size:15px; padding:13px 26px; border-radius:2px; white-space:nowrap; border:none; cursor:pointer; font-family:inherit; }
.btn-primary:hover{ background:var(--accent-dark); color:var(--navy-900); }

.btn-ghost{ display:inline-flex; align-items:center; justify-content:center; gap:8px; background:transparent; border:1px solid var(--line); color:var(--navy); font-weight:500; font-size:15px; padding:12px 25px; border-radius:2px; }
.btn-ghost:hover{ border-color:var(--navy); color:var(--navy); }

.btn-hero-ghost{ display:inline-flex; align-items:center; gap:8px; background:transparent; border:1px solid rgba(255,255,255,0.4); color:#fff; font-weight:500; font-size:15px; padding:12px 25px; border-radius:2px; }
.btn-hero-ghost:hover{ border-color:#fff; color:#fff; }

.eyebrow{ font-size:13px; font-weight:600; letter-spacing:0.08em; text-transform:uppercase; color:var(--accent-dark); display:inline-block; }
.eyebrow-light{ color:oklch(76% 0.085 248); }

.card{ background:var(--surface); border:1px solid var(--line); padding:32px; }
.icon-tile{ width:56px; height:56px; border:1px solid var(--line); display:flex; align-items:center; justify-content:center; flex-shrink:0; background:var(--surface); }
.tile{ aspect-ratio:4/3; background:var(--cream); border:1px solid var(--line); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; }

.cell{ padding:16px 20px; font-size:14.5px; display:flex; align-items:center; }
.check{ color:oklch(52% 0.13 150); font-weight:700; }
.dash{ color:var(--line); }

.field-label{ font-size:13px; font-weight:600; color:var(--navy); }
.field{ border:1px solid var(--line); background:var(--surface); padding:13px 14px; font-size:15px; color:var(--slate); }

.step-num{ font-family:'Newsreader',serif; font-size:20px; color:var(--accent-dark); font-weight:600; flex:0 0 44px; }
.tag{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; padding:4px 9px; }

.stat-block .stat-value{ font-family:'Newsreader',serif; font-size:26px; color:#fff; font-weight:600; }
.stat-block .stat-label{ font-size:13px; color:oklch(78% 0.015 250); }

/* ---------------------------------------------------------------------
   Layout utilities
------------------------------------------------------------------- */
.section{ padding:88px 64px; }
.section-sm{ padding:64px; }
.section-tight{ padding:56px 64px; }
.section-cream{ background:var(--cream); }
.section-navy{ background:var(--navy-900); }
.section-navy h1,.section-navy h2,.section-navy h3{ color:#fff; }

.flex{ display:flex; }
.flex-col{ display:flex; flex-direction:column; }
.items-center{ align-items:center; }
.justify-between{ justify-content:space-between; }
.gap-sm{ gap:12px; }
.gap-md{ gap:24px; }
.gap-lg{ gap:48px; }
.gap-xl{ gap:64px; }

.split{ display:flex; gap:56px; }
.split > *{ flex:1; min-width:0; }

.grid-2{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:24px; }
.grid-3{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:24px; }
.grid-4{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:20px; }

.max-w-sm{ max-width:440px; }
.max-w-md{ max-width:560px; }
.max-w-lg{ max-width:760px; }
.max-w-xl{ max-width:820px; }

/* ---------------------------------------------------------------------
   Header
------------------------------------------------------------------- */
.site-header{ display:flex; align-items:center; justify-content:space-between; padding:20px 64px; border-bottom:1px solid var(--line); background:var(--surface); position:relative; z-index:50; }
.site-header .custom-logo-link img{ height:46px; width:auto; display:block; }
.site-header nav.primary-nav{ display:flex; align-items:center; gap:36px; }
.header-actions{ display:flex; align-items:center; gap:20px; }

.nav-toggle{ display:none; background:none; border:none; cursor:pointer; padding:8px; flex-direction:column; gap:5px; }
.nav-toggle span{ display:block; width:24px; height:2px; background:var(--navy); }

/* ---------------------------------------------------------------------
   Hero (home page)
------------------------------------------------------------------- */
.hero-media{ position:relative; min-height:560px; display:flex; align-items:center; overflow:hidden; }
.hero-media img.hero-bg{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.hero-media .hero-scrim{ position:absolute; inset:0; z-index:1; background:linear-gradient(100deg, oklch(17% 0.045 255 / 0.95) 0%, oklch(17% 0.045 255 / 0.86) 34%, oklch(17% 0.045 255 / 0.42) 62%, oklch(17% 0.045 255 / 0.08) 100%); }
.hero-media .hero-content{ position:relative; z-index:2; padding:96px 64px; display:flex; flex-direction:column; gap:24px; max-width:640px; }
.hero-media h1{ color:#fff; font-size:clamp(30px, 4vw, 52px); line-height:1.14; }
.hero-media p{ color:oklch(88% 0.01 250); font-size:18px; max-width:520px; }
.hero-actions{ display:flex; gap:16px; margin-top:8px; flex-wrap:wrap; }
.hero-stats{ display:flex; gap:32px; margin-top:16px; flex-wrap:wrap; }

.founder-strip{ background:var(--navy-900); padding:18px 64px; display:flex; align-items:center; justify-content:center; gap:12px; text-align:center; }
.founder-strip p{ color:oklch(92% 0.01 250); font-size:14px; }

/* Page hero (interior pages) */
.page-hero{ padding:80px 64px 48px 64px; display:flex; flex-direction:column; gap:16px; max-width:760px; }
.page-hero h1{ font-size:clamp(28px, 3.4vw, 44px); line-height:1.16; }
.page-hero p{ font-size:17px; color:var(--slate); }

/* ---------------------------------------------------------------------
   Comparison / pricing table cells (generic responsive table-as-grid)
------------------------------------------------------------------- */
.compare-table{ display:flex; flex-direction:column; gap:1px; background:var(--line); border:1px solid var(--line); }
.compare-row{ display:grid; grid-template-columns:2fr 1fr 1fr; background:var(--surface); padding:16px 20px; font-size:15px; align-items:center; }
.compare-row.head{ background:var(--navy); color:#fff; padding:14px 20px; font-size:13px; font-weight:600; text-transform:uppercase; letter-spacing:0.04em; }
.compare-row.head span{ color:#fff; }

.pricing-grid{ display:grid; grid-template-columns:1.3fr repeat(4, 1fr); background:var(--line); gap:1px; border:1px solid var(--line); overflow-x:auto; }

.faq-list{ display:flex; flex-direction:column; gap:1px; background:var(--line); border:1px solid var(--line); }
.faq-item{ background:var(--surface); padding:28px 32px; display:flex; gap:40px; }
.faq-item h3{ font-size:17px; flex:1; }
.faq-item p{ flex:1.6; font-size:15px; color:var(--slate); }

.course-list{ display:flex; flex-direction:column; gap:1px; background:var(--line); border:1px solid var(--line); }
.course-row{ background:var(--surface); padding:28px 32px; display:flex; gap:32px; }
.course-row.alt{ background:var(--cream); }
.course-num{ flex:0 0 100px; font-family:'Newsreader',serif; font-size:22px; color:var(--accent-dark); font-weight:600; }
.course-hours{ flex:0 0 140px; text-align:right; font-size:13px; color:var(--slate); }

.steps-list{ display:flex; flex-direction:column; gap:1px; background:var(--line); border:1px solid var(--line); }
.step-row{ background:var(--surface); padding:18px 28px; display:flex; gap:24px; align-items:center; }
.step-row.alt{ background:var(--cream); }
.step-row .step-title{ flex:1.3; font-weight:600; color:var(--navy); }
.step-row .step-desc{ flex:1.6; font-size:14px; color:var(--slate); }

.cost-table{ display:grid; grid-template-columns:0.6fr 2fr 1.2fr; background:var(--line); gap:1px; border:1px solid var(--line); overflow-x:auto; }
.cost-table .cost-head{ background:var(--navy); color:#fff; padding:12px 20px; font-size:12px; font-weight:600; text-transform:uppercase; }
.cost-table .cost-cell{ background:var(--surface); padding:12px 20px; font-size:14px; }
.cost-table .cost-cell.alt{ background:var(--cream); }
.cost-table .cost-amount{ font-weight:600; color:var(--navy); }

.gallery-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:20px; }
.gallery-tile{ aspect-ratio:4/3; background:var(--cream); border:1px solid var(--line); position:relative; overflow:hidden; }
.gallery-tile img{ width:100%; height:100%; object-fit:cover; display:block; }
.gallery-tile .caption{ position:absolute; left:0; right:0; bottom:0; background:linear-gradient(0deg, oklch(17% 0.045 255 / 0.85), transparent 90%); color:#fff; font-size:13px; font-weight:600; padding:22px 14px 10px; }

/* ---------------------------------------------------------------------
   Footer
------------------------------------------------------------------- */
.site-footer{ background:var(--navy-900); padding:56px 64px 32px 64px; }
.footer-grid{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1.3fr; gap:32px; }
.footer-col span.footer-label{ font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:0.06em; color:oklch(65% 0.02 250); display:block; margin-bottom:10px; }
.footer-col a, .footer-col span.footer-line{ color:oklch(85% 0.01 250); font-size:14px; display:block; margin-bottom:10px; }
.footer-col p{ font-size:13.5px; color:oklch(70% 0.015 250); }
.footer-brand{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.footer-brand img{ height:34px; width:34px; display:block; }
.footer-brand span{ font-family:'Newsreader',serif; font-weight:600; font-size:18px; color:#fff; }
.footer-bottom{ border-top:1px solid oklch(28% 0.03 250); padding-top:24px; margin-top:40px; }
.footer-bottom span{ font-size:13px; color:oklch(60% 0.015 250); }

/* ---------------------------------------------------------------------
   Responsive
------------------------------------------------------------------- */
@media (max-width: 1024px){
  .grid-4{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .footer-grid{ grid-template-columns:1fr 1fr; row-gap:32px; }
}

@media (max-width: 860px){
  .site-header{ padding:16px 24px; flex-wrap:wrap; }
  .site-header nav.primary-nav{
    display:none; flex-direction:column; align-items:flex-start; gap:0;
    position:absolute; top:100%; left:0; right:0; background:var(--surface);
    border-bottom:1px solid var(--line); padding:8px 24px 16px;
  }
  .site-header.nav-open nav.primary-nav{ display:flex; }
  .site-header nav.primary-nav .navlink{ padding:12px 0; width:100%; border-bottom:1px solid var(--line); }
  .nav-toggle{ display:flex; }
  .header-actions .btn-primary{ display:none; }
  .site-header.nav-open .header-actions .btn-primary{ display:inline-flex; }

  .section, .section-sm, .section-tight{ padding:48px 24px; }
  .page-hero, .hero-media .hero-content{ padding-left:24px; padding-right:24px; }
  .founder-strip{ padding:16px 24px; }

  .split{ flex-direction:column; gap:32px; }
  .grid-3{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .grid-4{ grid-template-columns:1fr; }
  .gallery-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }

  .compare-row, .compare-row.head{ grid-template-columns:1.4fr 1fr 1fr; padding:12px 14px; font-size:13.5px; }
  .pricing-grid{ font-size:13px; }
  .cost-table{ font-size:13px; }

  .footer-grid{ grid-template-columns:1fr; }
}

@media (max-width: 560px){
  .grid-2, .grid-3{ grid-template-columns:1fr; }
  .gallery-grid{ grid-template-columns:1fr; }
  .hero-stats{ gap:20px; }
  .hero-actions .btn-primary, .hero-actions .btn-hero-ghost{ width:100%; }
  .split.hero-form{ flex-direction:column; }
  .pricing-grid{ grid-template-columns:1fr; }
  .pricing-grid > *{ border-bottom:1px solid var(--line); }
  .cost-table{ grid-template-columns:1fr; }
}
