/*
Theme Name: FoundryAi
Theme URI: https://www.foundryai.co.nz
Author: FoundryAi
Description: Custom theme for FoundryAi, Silicon Valley product & service concept-to-market builders.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: foundryai
*/

:root{
  --bg:#0B1220;--bg-deep:#080E1A;--panel:#111A2C;--panel-2:#0E1626;--hi:#111D33;
  --line:#1F2B42;--line-2:#2E3D5A;--rule:#1C2740;--grid:#131D31;
  --text:#E7ECF3;--head:#F2F5F9;--body:#B4C0D0;--muted:#8A9AB2;--soft:#C3CDDA;
  --accent:#5B9BFF;
  --sans:'Archivo',ui-sans-serif,'Helvetica Neue',Arial,sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,Menlo,Consolas,monospace;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:100px}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);font-size:17px;line-height:1.6;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:var(--text);text-decoration:none}
a:hover{color:#8FB6FF}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
h1,h2,h3{color:var(--head);margin:0;letter-spacing:-.02em}
p{margin:0}
.container{width:100%;max-width:1248px;margin:0 auto;padding:0 24px}
.skip-link{position:absolute;left:-9999px;top:8px;background:var(--accent);color:var(--bg);padding:10px 16px;z-index:100}
.skip-link:focus{left:8px;color:var(--bg)}
.bp{background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);background-size:48px 48px}
.eyebrow{font-family:var(--mono);font-size:13px;letter-spacing:.14em;text-transform:uppercase;color:var(--accent)}
.label{font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.label-accent{color:var(--accent)}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;height:56px;padding:0 28px;border-radius:3px;font-family:inherit;font-weight:600;font-size:16px;border:0;cursor:pointer;text-align:center}
.btn-primary{background:var(--accent);color:var(--bg)}
.btn-primary:hover{background:#7BB0FF;color:var(--bg)}
.btn-ghost{border:1px solid #3A4A66;color:var(--text)}
.btn-sm{height:46px;padding:0 22px;font-size:15px}

/* Header */
.site-header{position:sticky;top:0;z-index:50;background:rgba(11,18,32,.95);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-bottom:1px solid var(--rule)}
.admin-bar .site-header{top:32px}
.header-inner{height:88px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{font-size:26px;font-weight:800;letter-spacing:-.02em;color:var(--head)}
.brand span{color:var(--accent)}
.brand:hover{color:var(--head)}
.nav{display:flex;align-items:center;gap:32px;font-size:15px;font-weight:500}
.nav a:not(.btn){color:var(--soft)}
.nav a:not(.btn):hover{color:var(--head)}
.nav a[aria-current="page"]{color:var(--head);box-shadow:inset 0 -2px 0 var(--accent);padding-bottom:4px}
.menu{display:none;position:relative}
.menu summary{list-style:none;cursor:pointer;padding:10px 16px;border:1px solid var(--line-2);border-radius:3px;font-weight:600;font-size:15px}
.menu summary::-webkit-details-marker{display:none}
.menu nav{position:absolute;right:0;top:calc(100% + 10px);background:var(--panel);border:1px solid var(--line);border-radius:4px;padding:12px;display:flex;flex-direction:column;min-width:250px}
.menu nav a{padding:12px 10px;color:var(--soft)}
.menu nav .btn{margin-top:8px;color:var(--bg)}

/* Hero */
.hero{padding:112px 0 88px;border-bottom:1px solid var(--rule)}
.hero-grid{display:flex;align-items:center;justify-content:space-between;gap:64px}
.hero-copy{max-width:760px;display:flex;flex-direction:column;gap:28px}
.hero h1{font-size:clamp(40px,6vw,68px);line-height:1.04;font-weight:800;letter-spacing:-.03em}
.lede{font-size:20px;line-height:1.6;color:var(--body);max-width:660px}
.hero-actions{margin-top:12px;display:flex;gap:16px;flex-wrap:wrap}
.hero-art{flex-shrink:0;width:420px;max-width:40%}
.hero-art svg{width:100%;height:auto}
.heritage{margin-top:80px;padding-top:28px;border-top:1px solid #22304A;display:flex;flex-wrap:wrap;align-items:center;gap:12px 28px;font-size:15px;color:var(--body)}
.heritage .label{font-size:12px;letter-spacing:.14em}
.heritage .sep{color:#3A4A66}

/* Sections */
.section{padding:120px 0}
.section-tight{padding-top:0}
.section-rule{border-top:1px solid var(--rule)}
.section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:64px;margin-bottom:64px}
.section-title{display:flex;flex-direction:column;gap:18px;max-width:780px}
.h2{font-size:clamp(32px,4vw,48px);line-height:1.1;font-weight:700;letter-spacing:-.025em}
.section-intro{max-width:500px;font-size:18px;color:var(--body)}
.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}
.card{background:var(--panel);border:1px solid var(--line);border-radius:4px;padding:36px;display:flex;flex-direction:column;gap:16px}
.card h3{font-size:24px;font-weight:700}
.card p{font-size:16px;line-height:1.65;color:var(--body)}
.card .num{font-family:var(--mono);font-size:13px;color:var(--muted)}
.principal{margin-top:24px;max-width:588px;padding:28px 32px;border:1px solid var(--line);border-radius:4px;display:flex;flex-direction:column;gap:6px}
.principal strong{font-size:19px;color:var(--head)}
.principal span{font-size:15px;color:var(--body)}

/* Comparison */
.compare-title{font-size:36px;font-weight:700;margin-bottom:40px}
.compare-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:4px}
.compare{width:100%;min-width:720px;border-collapse:collapse;font-size:17px}
.compare th,.compare td{padding:26px 28px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}
.compare tbody tr:last-child th,.compare tbody tr:last-child td{border-bottom:0}
.compare thead th{font-family:var(--mono);font-size:13px;letter-spacing:.1em;text-transform:uppercase;font-weight:500;color:var(--muted);background:var(--panel-2);padding:20px 28px}
.compare thead th.us{color:var(--accent);background:var(--hi)}
.compare tbody th{width:240px;color:var(--head);font-weight:700}
.compare td{color:var(--muted)}
.compare td.us{color:var(--text);background:var(--hi)}

/* Methodology */
.stage{background:var(--panel-2);border:1px solid var(--line);border-top:2px solid var(--accent);border-radius:4px;padding:32px 28px;display:flex;flex-direction:column;gap:14px}
.stage .num{font-family:var(--mono);font-size:13px;color:var(--accent)}
.stage h3{font-size:22px;font-weight:700}
.stage p{font-size:15px;color:var(--body)}
.deliverable{margin-top:auto;padding-top:14px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:4px}
.deliverable strong{font-size:15px;font-weight:600;color:var(--text)}

/* Sectors */
.sector{background:var(--panel);border:1px solid var(--line);border-radius:4px;padding:32px;display:flex;flex-direction:column;gap:18px}
.sector h3{font-size:22px;font-weight:700}
.kv{display:flex;flex-direction:column;gap:6px}
.kv p{font-size:15px;color:var(--body)}
.kv.build p{color:var(--text)}

/* Pathways */
.pathway{background:var(--panel);border:1px solid var(--line);border-radius:4px;padding:40px 36px;display:flex;flex-direction:column;gap:22px}
.pathway.featured{border-color:var(--accent)}
.pathway-top{display:flex;justify-content:space-between;align-items:center;min-height:30px}
.pathway-top .num{font-family:var(--mono);font-size:13px;color:var(--accent)}
.tag{padding:6px 10px;border:1px solid var(--line-2);border-radius:2px;font-family:var(--mono);font-size:12px;color:var(--soft)}
.pathway h3{font-size:26px;line-height:1.2}
.pathway p{font-size:16px;color:var(--body)}
.pathway .deliverable strong{font-size:16px}
.pathway .btn{height:52px;margin-top:8px}

/* Contact */
.contact-grid{display:grid;grid-template-columns:480px minmax(0,1fr);gap:96px}
.contact-copy{display:flex;flex-direction:column;gap:24px}
.contact-copy h2{font-size:clamp(36px,4.5vw,52px);line-height:1.08;font-weight:800;letter-spacing:-.03em}
.contact-copy > p{font-size:18px;color:var(--body)}
.contact-list{margin-top:16px;border-top:1px solid #22304A}
.contact-list > *{display:flex;justify-content:space-between;gap:16px;padding:18px 0;border-bottom:1px solid #22304A;font-size:17px}
.form-panel{background:var(--panel);border:1px solid var(--line);border-radius:4px;padding:48px;display:flex;flex-direction:column;gap:22px}
.form-panel h3{font-size:26px}
.form-panel .note{font-size:15px;color:var(--body)}
.form-panel .admin-hint{font-size:14px;color:var(--muted);border:1px dashed var(--line-2);padding:14px 16px;border-radius:3px}
.form-panel label{display:block;font-size:14px;font-weight:600;color:var(--soft);margin-bottom:8px}
.form-panel input[type=text],.form-panel input[type=email],.form-panel input[type=tel],.form-panel textarea,.form-panel select{width:100%;min-height:50px;padding:12px 16px;background:var(--bg);border:1px solid var(--line-2);border-radius:3px;color:var(--text);font-family:inherit;font-size:16px}
.form-panel textarea{min-height:140px}
.form-panel button[type=submit],.form-panel input[type=submit]{height:56px;padding:0 28px;border:0;border-radius:3px;background:var(--accent);color:var(--bg);font-family:inherit;font-size:16px;font-weight:600;cursor:pointer}

/* Footer */
.site-footer{background:var(--bg-deep);border-top:1px solid var(--rule);padding:48px 0}
.footer-inner{display:flex;justify-content:space-between;align-items:center;gap:32px;flex-wrap:wrap}
.footer-inner .brand{font-size:22px}
.footer-tag{font-size:14px;color:var(--muted);margin-top:8px}
.footer-meta{display:flex;flex-direction:column;gap:8px;align-items:flex-end;font-size:14px;color:var(--muted)}
.footer-links{display:flex;gap:24px;flex-wrap:wrap}
.footer-links a{color:var(--soft)}

/* Blog listing */
.page-head{padding:96px 0 56px;display:flex;justify-content:space-between;align-items:flex-end;gap:64px}
.page-head h1{font-size:clamp(40px,5.5vw,64px);line-height:1.04;font-weight:800;letter-spacing:-.03em;margin-top:20px;max-width:760px}
.page-head > p{max-width:420px;font-size:18px;color:var(--body)}
.chips{display:flex;flex-wrap:wrap;gap:10px;padding-bottom:48px}
.chip{padding:10px 18px;border-radius:999px;border:1px solid var(--line-2);color:var(--soft);font-size:14px;font-weight:500}
.chip.is-active{background:var(--text);border-color:var(--text);color:var(--bg);font-weight:600}
.thumb{background-color:var(--panel-2);display:flex;align-items:center;justify-content:center;overflow:hidden}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb svg{width:120px;height:auto}
.featured-post{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);border:1px solid var(--line);border-radius:4px;overflow:hidden;background:var(--panel);margin-bottom:72px}
.featured-post .thumb{min-height:440px;border-right:1px solid var(--line)}
.featured-post .thumb svg{width:240px}
.featured-body{padding:56px 56px 48px;display:flex;flex-direction:column;gap:20px}
.featured-body h2{font-size:clamp(28px,3vw,38px);line-height:1.12;font-weight:700}
.featured-body h2 a,.post-card h3 a{color:var(--head)}
.featured-body h2 a:hover,.post-card h3 a:hover{color:#8FB6FF}
.excerpt{font-size:17px;color:var(--body)}
.meta-row{margin-top:auto;padding-top:20px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;font-size:14px;color:var(--muted)}
.read-more{font-weight:600;color:var(--accent)}
.post-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.post-card{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:4px;overflow:hidden;background:var(--panel)}
.post-card .thumb{aspect-ratio:16/9;border-bottom:1px solid var(--line)}
.post-card-body{padding:28px;display:flex;flex-direction:column;gap:12px;flex-grow:1}
.post-card h3{font-size:21px;line-height:1.3}
.post-card .excerpt{font-size:15px}
.post-card .meta{margin-top:auto;padding-top:12px;font-size:13px;color:var(--muted)}
.pagination{padding-top:72px;display:flex;justify-content:center}
.pagination .nav-links{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.pagination .page-numbers{min-width:44px;height:44px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line-2);border-radius:3px;color:var(--soft)}
.pagination .page-numbers.current{background:var(--text);color:var(--bg);border-color:var(--text)}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.empty{padding:64px 24px;border:1px dashed var(--line-2);border-radius:4px;text-align:center;color:var(--body)}
.cta-band{margin:120px 0;padding:56px 64px;border:1px solid #2A3A58;border-radius:4px;background-color:var(--panel-2);display:flex;justify-content:space-between;align-items:center;gap:40px}
.cta-band h2{font-size:32px;line-height:1.15;font-weight:700}
.cta-band p{color:var(--body);margin-top:10px}

/* Article */
.article{max-width:760px;margin:0 auto;padding-top:96px}
.article-head{display:flex;flex-direction:column;gap:20px;margin-bottom:40px}
.article-head h1{font-size:clamp(34px,4.5vw,52px);line-height:1.08;font-weight:800;letter-spacing:-.03em}
.article-meta{font-size:15px;color:var(--muted)}
.article-hero{margin:0 0 48px;border:1px solid var(--line);border-radius:4px;overflow:hidden}
.prose{font-size:18px;line-height:1.75;color:#CDD6E2}
.prose > * + *{margin-top:1.2em}
.prose h2{font-size:30px;line-height:1.2;margin-top:1.8em}
.prose h3{font-size:23px;line-height:1.3;margin-top:1.6em}
.prose a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.prose ul,.prose ol{padding-left:1.3em}
.prose li + li{margin-top:.4em}
.prose blockquote{margin-left:0;margin-right:0;padding:4px 0 4px 24px;border-left:2px solid var(--accent);color:var(--head);font-size:21px}
.prose img{border-radius:4px}
.prose figure{margin-left:0;margin-right:0}
.prose figcaption{font-size:14px;color:var(--muted);margin-top:8px}
.prose code{font-family:var(--mono);font-size:.9em;background:var(--panel);padding:2px 6px;border-radius:3px}
.back-link{display:inline-block;margin-top:56px;font-weight:600;color:var(--accent)}

/* Responsive */
@media (max-width:1100px){
  .nav{gap:22px}
  .hero-art{display:none}
  .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .contact-grid{grid-template-columns:1fr;gap:56px}
}
@media (max-width:960px){
  .nav{display:none}
  .menu{display:block}
  .grid-3,.post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .section-head,.page-head{flex-direction:column;align-items:flex-start;gap:20px}
  .featured-post{grid-template-columns:1fr}
  .featured-post .thumb{min-height:260px;border-right:0;border-bottom:1px solid var(--line)}
  .cta-band{flex-direction:column;align-items:flex-start}
}
@media (max-width:782px){.admin-bar .site-header{top:46px}}
@media (max-width:640px){
  body{font-size:16px}
  html{scroll-padding-top:84px}
  .header-inner{height:72px}
  .section{padding:80px 0}
  .section-tight{padding-top:0}
  .section-head{margin-bottom:40px}
  .hero{padding:72px 0 64px}
  .lede{font-size:18px}
  .heritage{margin-top:56px}
  .grid-3,.grid-4,.post-grid{grid-template-columns:1fr}
  .card,.stage,.pathway{padding:28px 24px}
  .form-panel{padding:28px 22px}
  .featured-body{padding:32px 24px}
  .cta-band{padding:36px 24px;margin:80px 0}
  .contact-list > *{flex-direction:column;gap:4px}
  .footer-meta{align-items:flex-start}
  .hero-actions,.hero-actions .btn{width:100%}
  .page-head{padding:64px 0 40px}
  .article{padding-top:64px}
}
