/*
Theme Name: Computers 4 Humans
Theme URI: https://computers4humans.example
Author: Computers 4 Humans
Author URI: https://computers4humans.example
Description: Editorial single-page theme for Computers 4 Humans. Navy + orange, Fraunces display, Inter sans, Source Serif accents. Built around the homepage front-page.php; menu locations "primary" and section copy via widgets optional.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: c4h
*/

/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --c4h-navy: #0e1d38;
  --c4h-navy-mid: #1a3166;
  --c4h-orange: #ea8328;
  --c4h-blue: #3a8fd9;
  --c4h-cream: #f3ede0;
  --c4h-paper: #fbf8f2;
  --c4h-ink: #15192a;
  --c4h-muted: #5d6375;
  --c4h-rule: #e6ddc9;

  --c4h-display: 'Fraunces', 'Source Serif 4', Georgia, serif;
  --c4h-sans: 'Inter', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  --c4h-serif: 'Source Serif 4', Georgia, serif;

  --c4h-max: 1200px;
  --c4h-gutter: 56px;
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--c4h-paper);
  color: var(--c4h-ink);
  font-family: var(--c4h-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

.c4h-container { max-width: var(--c4h-max); margin: 0 auto; padding: 0 var(--c4h-gutter); }

.c4h-eyebrow {
  font-family: var(--c4h-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c4h-orange);
}

/* =========================================================
   Nav
   ========================================================= */
.c4h-nav {
  max-width: var(--c4h-max);
  margin: 0 auto;
  padding: 24px var(--c4h-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}
.c4h-nav__brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.c4h-nav__brand img { width: 40px; height: 40px; object-fit: contain; }
.c4h-nav__wordmark {
  font-weight: 800; color: var(--c4h-navy); letter-spacing: -0.3px;
}
.c4h-nav__wordmark span { color: var(--c4h-orange); margin: 0 5px; }
.c4h-nav__links { display: flex; gap: 36px; color: var(--c4h-navy); font-weight: 500; }
.c4h-nav__links a { color: var(--c4h-navy); text-decoration: none; }
.c4h-nav__links a:hover { color: var(--c4h-orange); }
.c4h-nav__cta {
  background: var(--c4h-navy);
  color: #fff !important;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.c4h-nav__cta:hover { background: var(--c4h-navy-mid); }

/* =========================================================
   Hero
   ========================================================= */
.c4h-hero {
  max-width: var(--c4h-max);
  margin: 0 auto;
  padding: 64px var(--c4h-gutter) 80px;
}
.c4h-hero__tag {
  color: var(--c4h-orange);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.c4h-hero__tag::before {
  content: "";
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--c4h-orange);
}
.c4h-hero h1 {
  font-family: var(--c4h-display);
  font-size: 128px;
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -4px;
  color: var(--c4h-navy);
  max-width: 1100px;
}
.c4h-hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--c4h-orange);
}
.c4h-hero__sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 64px;
  align-items: start;
}
.c4h-hero__sub-lead {
  font-family: var(--c4h-serif);
  font-size: 22px;
  line-height: 1.5;
  color: var(--c4h-ink);
}
.c4h-hero__sub-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--c4h-muted);
  margin-top: 6px;
}

/* =========================================================
   Mission band
   ========================================================= */
.c4h-mission { background: var(--c4h-navy); color: #fff; padding: 80px 0; }
.c4h-mission__inner {
  max-width: var(--c4h-max);
  margin: 0 auto;
  padding: 0 var(--c4h-gutter);
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: center;
}
.c4h-mission__logo {
  background: #fff;
  border-radius: 32px;
  padding: 40px;
  display: flex;
  justify-content: center;
}
.c4h-mission__logo img { max-width: 360px; width: 100%; }
.c4h-mission__label { color: var(--c4h-orange); margin-bottom: 20px; }
.c4h-mission__quote {
  font-family: var(--c4h-display);
  font-size: 40px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.8px;
  color: #fff;
}

/* =========================================================
   Principles
   ========================================================= */
.c4h-principles {
  max-width: var(--c4h-max);
  margin: 0 auto;
  padding: 120px var(--c4h-gutter) 80px;
}
.c4h-principles__eyebrow { margin-bottom: 20px; }
.c4h-principles h2 {
  font-family: var(--c4h-display);
  font-size: 56px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -1.6px;
  color: var(--c4h-navy);
  margin-bottom: 72px;
  max-width: 900px;
}
.c4h-principles__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 64px;
}
.c4h-principle__num {
  font-family: var(--c4h-display);
  font-size: 48px;
  font-weight: 500;
  color: var(--c4h-orange);
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1;
}
.c4h-principle h3 {
  font-family: var(--c4h-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--c4h-navy);
  letter-spacing: -0.6px;
  margin-bottom: 10px;
}
.c4h-principle p {
  color: var(--c4h-muted);
  font-size: 16px;
  line-height: 1.65;
}

/* =========================================================
   Building
   ========================================================= */
.c4h-building { background: var(--c4h-cream); padding: 120px 0; }
.c4h-building__inner {
  max-width: var(--c4h-max);
  margin: 0 auto;
  padding: 0 var(--c4h-gutter);
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
}
.c4h-building__eyebrow { margin-bottom: 20px; }
.c4h-building h2 {
  font-family: var(--c4h-display);
  font-size: 48px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -1.4px;
  color: var(--c4h-navy);
}
.c4h-building__body p {
  font-size: 19px;
  line-height: 1.65;
  color: var(--c4h-ink);
  margin-bottom: 20px;
}
.c4h-building__highlight {
  background: var(--c4h-cream);
  border-left: 3px solid var(--c4h-orange);
  padding: 20px 24px;
  margin: 8px 0 40px;
  border-radius: 0 6px 6px 0;
}
.c4h-building__highlight p {
  margin-bottom: 0 !important;
}
.c4h-building__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.c4h-card {
  background: #fff;
  border: 1px solid var(--c4h-rule);
  padding: 22px;
  border-radius: 12px;
}
.c4h-card__title {
  font-family: var(--c4h-display);
  font-weight: 600;
  color: var(--c4h-navy);
  margin-bottom: 6px;
  font-size: 17px;
}
.c4h-card__body { font-size: 14px; color: var(--c4h-muted); line-height: 1.55; }

/* =========================================================
   Founder
   ========================================================= */
.c4h-founder {
  max-width: var(--c4h-max);
  margin: 0 auto;
  padding: 120px var(--c4h-gutter);
}
.c4h-founder__eyebrow { margin-bottom: 20px; }
.c4h-founder__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.c4h-founder__portrait {
  background: var(--c4h-navy);
  border-radius: 20px;
  padding: 40px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
}
.c4h-founder__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.c4h-founder__initials {
  text-align: center;
}
.c4h-founder__initials-letters {
  font-family: var(--c4h-display);
  font-size: 88px;
  font-weight: 600;
  line-height: 1;
  color: var(--c4h-orange);
}
.c4h-founder__initials-caption {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 16px;
  color: rgba(255,255,255,0.7);
}
.c4h-founder h2 {
  font-family: var(--c4h-display);
  font-size: 44px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -1.2px;
  color: var(--c4h-navy);
  margin-bottom: 24px;
}
.c4h-founder__body p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--c4h-ink);
  margin-bottom: 18px;
}
.c4h-founder__body p:last-of-type { margin-bottom: 28px; }
.c4h-founder__stats {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--c4h-muted);
  flex-wrap: wrap;
}
.c4h-founder__stats strong { color: var(--c4h-navy); }

/* =========================================================
   CTA
   ========================================================= */
.c4h-cta {
  background: var(--c4h-navy);
  color: #fff;
  padding: 100px 0;
}
.c4h-cta__inner {
  max-width: var(--c4h-max);
  margin: 0 auto;
  padding: 0 var(--c4h-gutter);
  text-align: center;
}
.c4h-cta__eyebrow { color: var(--c4h-orange); margin-bottom: 24px; }
.c4h-cta h2 {
  font-family: var(--c4h-display);
  font-size: 72px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -2.2px;
  color: #fff;
  margin-bottom: 28px;
}
.c4h-cta__body {
  font-size: 20px;
  color: rgba(255,255,255,0.75);
  max-width: 680px;
  margin: 0 auto 44px;
  line-height: 1.55;
}
.c4h-cta__button {
  display: inline-block;
  background: var(--c4h-orange);
  color: var(--c4h-navy) !important;
  text-decoration: none;
  padding: 20px 40px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease;
}
.c4h-cta__button:hover { transform: translateY(-2px); }

/* =========================================================
   Footer
   ========================================================= */
.c4h-footer {
  max-width: var(--c4h-max);
  margin: 0 auto;
  padding: 32px var(--c4h-gutter) 48px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--c4h-muted);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  :root { --c4h-gutter: 28px; }
  .c4h-nav { flex-wrap: wrap; gap: 16px; }
  .c4h-nav__links { display: none; }
  .c4h-hero h1 { font-size: 72px; letter-spacing: -2px; }
  .c4h-hero__sub { grid-template-columns: 1fr; gap: 24px; margin-top: 40px; }
  .c4h-mission__inner,
  .c4h-building__inner,
  .c4h-founder__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .c4h-mission__quote { font-size: 28px; }
  .c4h-principles { padding: 80px var(--c4h-gutter) 40px; }
  .c4h-principles h2 { font-size: 36px; letter-spacing: -1px; margin-bottom: 48px; }
  .c4h-principles__grid { grid-template-columns: 1fr; gap: 40px; }
  .c4h-building { padding: 80px 0; }
  .c4h-building h2 { font-size: 32px; }
  .c4h-building__cards { grid-template-columns: 1fr; }
  .c4h-founder { padding: 80px var(--c4h-gutter); }
  .c4h-founder h2 { font-size: 32px; }
  .c4h-cta { padding: 72px 0; }
  .c4h-cta h2 { font-size: 44px; letter-spacing: -1.2px; }
  .c4h-footer { flex-direction: column; gap: 8px; }
}

@media (max-width: 520px) {
  .c4h-hero h1 { font-size: 52px; letter-spacing: -1.5px; }
  .c4h-cta h2 { font-size: 34px; }
  .c4h-cta__button { padding: 16px 24px; font-size: 14px; }
}

/* =========================================================
   Smooth scroll
   ========================================================= */
html { scroll-behavior: smooth; }

/* =========================================================
   Sticky nav
   ========================================================= */
.c4h-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c4h-paper);
  transition: box-shadow 0.25s ease;
}
.c4h-site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--c4h-rule), 0 4px 20px rgba(14, 29, 56, 0.07);
}

/* =========================================================
   Mobile hamburger
   ========================================================= */
.c4h-nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--c4h-navy);
  line-height: 0;
}

@media (max-width: 960px) {
  .c4h-site-header { position: sticky; }
  .c4h-nav { position: relative; }
  .c4h-nav__hamburger { display: block; }

  /* Override the blanket display:none so the open class can restore it */
  .c4h-nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c4h-paper);
    border-top: 1px solid var(--c4h-rule);
    border-bottom: 1px solid var(--c4h-rule);
    box-shadow: 0 8px 24px rgba(14, 29, 56, 0.08);
    flex-direction: column;
    padding: 8px var(--c4h-gutter) 16px;
    gap: 0;
  }
  .c4h-nav__links.is-open { display: flex !important; }
  .c4h-nav__links a {
    padding: 12px 0;
    border-bottom: 1px solid var(--c4h-rule);
    font-size: 16px;
  }
  .c4h-nav__links a:last-child { border-bottom: none; }
}

/* =========================================================
   Hero — decorative background element + sub-section fix
   ========================================================= */
.c4h-hero { position: relative; overflow: hidden; }
.c4h-hero::after {
  content: 'C4H';
  position: absolute;
  right: -20px;
  top: 30px;
  font-family: var(--c4h-display);
  font-size: 280px;
  font-weight: 700;
  letter-spacing: -8px;
  color: var(--c4h-navy);
  opacity: 0.03;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.c4h-hero__sub-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.c4h-hero__sub-body + .c4h-hero__sub-body { margin-top: 0; }

/* =========================================================
   Principles — hover treatment
   ========================================================= */
.c4h-principle {
  padding: 28px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
  margin: -28px;
}
.c4h-principle:hover {
  background: var(--c4h-cream);
  border-color: var(--c4h-rule);
}
/* Re-offset so hover padding doesn't shift the grid */
.c4h-principles__grid { gap: 28px 8px; }

/* =========================================================
   Service cards — hover lift
   ========================================================= */
.c4h-card {
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.c4h-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(14, 29, 56, 0.1);
  border-color: var(--c4h-orange);
}

/* =========================================================
   Building — fix invisible highlight (cream-on-cream)
   ========================================================= */
.c4h-building__highlight {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* =========================================================
   CTA button — glow on hover
   ========================================================= */
.c4h-cta__button {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.c4h-cta__button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(234, 131, 40, 0.45);
}

/* =========================================================
   Founder stats — visual separator
   ========================================================= */
.c4h-founder__stats {
  border-top: 1px solid var(--c4h-rule);
  padding-top: 24px;
}

/* =========================================================
   Footer — top rule
   ========================================================= */
.c4h-footer {
  border-top: 1px solid var(--c4h-rule);
}

/* =========================================================
   Scroll fade-in (class added by JS so elements stay
   visible when JS is disabled)
   ========================================================= */
.c4h-fade {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.c4h-fade.is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Small-screen tweaks for additions above
   ========================================================= */
@media (max-width: 520px) {
  .c4h-hero::after { font-size: 160px; right: -10px; }
  .c4h-principle { padding: 20px; margin: -20px; }
}
