/*
Theme Name: Speck Marketing
Theme URI: https://speckmarketing.com
Author: Matt Speck
Description: Custom theme for Speck Marketing consulting site.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: speck-marketing
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg-alt: #eef5fc;
  --bg-dark: #00275b;
  --bg-dark-2: #003a78;
  --accent: #56a7e8;
  --accent-hover: #3d91d4;
  --accent-light: #e6f3fc;
  --text: #4a6080;
  --heading: #00275b;
  --border: #cce0f5;
  --sans: 'Glacial Indifference', system-ui, -apple-system, sans-serif;
  --max: 1200px;
  --radius-sm: 6px;
  --radius: 12px;
  --shadow-lg: 0 10px 25px -5px rgba(0,39,91,0.12), 0 8px 10px -6px rgba(0,39,91,0.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ---- NAV ---- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-size: 1.125rem; font-weight: 700; color: var(--heading); }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 0.9375rem; font-weight: 700; color: var(--text); transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--heading); }
.nav-links .btn-nav {
  background: var(--accent); color: #fff;
  padding: 9px 22px; border-radius: var(--radius-sm); font-weight: 700; transition: background 0.15s;
}
.nav-links .btn-nav:hover, .nav-links .btn-nav.active { background: var(--accent-hover); color: #fff; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--heading); border-radius: 2px; }

/* ---- HERO ---- */
.hero {
  background: var(--bg-dark); color: #fff;
  padding: 96px 24px 112px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% -10%, rgba(86,167,232,0.25) 0%, transparent 65%);
}
.hero-content { max-width: var(--max); margin: 0 auto; position: relative; z-index: 1; }
.hero-label {
  display: inline-block; font-size: 0.8125rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem); font-weight: 700;
  line-height: 1.08; color: #fff; margin-bottom: 28px; max-width: 820px;
}
.hero p {
  font-size: clamp(1rem, 2vw, 1.125rem); line-height: 1.78;
  color: rgba(255,255,255,0.7); max-width: 620px; margin-bottom: 44px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 1rem; font-family: var(--sans);
  transition: all 0.15s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover {
  background: var(--accent-hover); transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(86,167,232,0.35);
}

/* ---- SECTIONS ---- */
.section { padding: 88px 24px; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-header { margin-bottom: 52px; }
.section-header.centered { text-align: center; max-width: 600px; margin: 0 auto 52px; }
.section-label {
  display: inline-block; font-size: 0.8125rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 12px;
}
.section-dark .section-label { color: #8dc8f0; }
h2 {
  font-size: clamp(1.875rem, 3.5vw, 2.625rem); font-weight: 700;
  line-height: 1.15; color: var(--heading); margin-bottom: 16px;
}
.section-dark h2 { color: #fff; }
.section-sub { font-size: 1.0625rem; color: var(--text); max-width: 540px; line-height: 1.7; }
.section-dark .section-sub { color: rgba(255,255,255,0.65); }

/* ---- PAGE HERO ---- */
.page-hero {
  background: var(--bg-dark); padding: 72px 24px 80px;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(86,167,232,0.2) 0%, transparent 70%);
}
.page-hero-inner { max-width: var(--max); margin: 0 auto; position: relative; z-index: 1; }
.page-hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem); font-weight: 700;
  color: #fff; margin-bottom: 16px; line-height: 1.1;
}
.page-hero p { font-size: 1.0625rem; color: rgba(255,255,255,0.65); max-width: 580px; line-height: 1.75; }

/* ---- SERVICES GRID ---- */
.services-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px; max-width: var(--max); margin: 0 auto;
}
.service-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.service-icon {
  width: 48px; height: 48px; background: var(--accent-light);
  border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; margin-bottom: 20px; font-size: 1.375rem;
}
.service-card h3 { font-size: 1.25rem; font-weight: 700; color: var(--heading); margin-bottom: 12px; }
.service-card p { font-size: 0.9375rem; line-height: 1.72; color: var(--text); }

/* ---- STATS ---- */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; max-width: var(--max); margin: 0 auto;
}
.stat-card {
  text-align: center; padding: 36px 20px;
  background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border);
}
.section-dark .stat-card { background: var(--bg-dark-2); border-color: rgba(255,255,255,0.1); }
.section-alt .stat-card { background: var(--bg); }
.stat-number {
  font-size: clamp(2rem, 4vw, 2.875rem); font-weight: 700;
  color: var(--accent); letter-spacing: -0.02em; line-height: 1; margin-bottom: 12px;
}
.section-dark .stat-number { color: #8dc8f0; }
.stat-label { font-size: 0.875rem; color: var(--text); line-height: 1.5; }
.section-dark .stat-label { color: rgba(255,255,255,0.6); }

/* ---- GALLERY ---- */
.gallery-filters { display: flex; gap: 10px; flex-wrap: wrap; max-width: var(--max); margin: 0 auto 36px; }
.filter-btn {
  padding: 8px 20px; border-radius: 100px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text); font-size: 0.875rem; font-weight: 700;
  font-family: var(--sans); cursor: pointer; transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; max-width: var(--max); margin: 0 auto;
}
.gallery-card {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: var(--bg); transition: box-shadow 0.2s, transform 0.2s;
  display: flex; flex-direction: column;
}
.gallery-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.gallery-card.hidden { display: none; }
.gallery-thumb { aspect-ratio: 16/9; overflow: hidden; position: relative; background: var(--bg-dark-2); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-card:hover .gallery-thumb img { transform: scale(1.04); }
.gallery-thumb--blog {
  background: linear-gradient(135deg, #003a78 0%, #00275b 100%);
  display: flex; align-items: center; justify-content: center;
}
.gallery-thumb--site {
  background: linear-gradient(135deg, #1a5a9a 0%, #00275b 100%);
  display: flex; align-items: center; justify-content: center;
}
.play-overlay {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; background: rgba(0,39,91,0.3); transition: background 0.2s;
}
.gallery-card:hover .play-overlay { background: rgba(0,39,91,0.15); }
.play-btn {
  width: 52px; height: 52px; background: rgba(255,255,255,0.95); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,39,91,0.3); transition: transform 0.2s;
}
.gallery-card:hover .play-btn { transform: scale(1.08); }
.play-btn svg { margin-left: 3px; }
.thumb-label { font-size: 1.0625rem; font-weight: 700; color: rgba(255,255,255,0.85); text-align: center; padding: 0 16px; }
.thumb-icon { font-size: 2rem; opacity: 0.35; }
.gallery-info { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.gallery-category { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--accent); margin-bottom: 6px; }
.gallery-company { font-size: 0.8125rem; color: var(--text); margin-bottom: 4px; }
.gallery-title { font-size: 0.9375rem; font-weight: 700; color: var(--heading); line-height: 1.4; }

/* ---- CTA ---- */
.cta-section {
  background: var(--bg-dark); color: #fff; padding: 100px 24px;
  text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 110%, rgba(86,167,232,0.2) 0%, transparent 65%);
}
.cta-inner { max-width: 600px; margin: 0 auto; position: relative; z-index: 1; }
.cta-inner h2 { color: #fff; font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 16px; }
.cta-inner p { color: rgba(255,255,255,0.65); font-size: 1.0625rem; margin-bottom: 40px; }

/* ---- CONTACT ---- */
.contact-photo { width: 100%; border-radius: var(--radius); display: block; margin-bottom: 24px; box-shadow: 0 8px 32px rgba(0,39,91,0.18); }
.contact-name { font-size: 1.5rem; font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.contact-title-label { font-size: 0.9375rem; font-weight: 700; color: var(--accent); margin-bottom: 20px; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; max-width: 960px; margin: 0 auto; align-items: start; }
.contact-info p { font-size: 1rem; color: var(--text); line-height: 1.75; margin-bottom: 12px; }
.contact-form { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.typeform-wrapper { min-height: 520px; width: 100%; }
.gallery-thumb--logo { background: #ffffff; display: flex; align-items: center; justify-content: center; padding: 32px; }
.gallery-thumb--logo img { width: auto !important; height: auto !important; max-width: 80% !important; max-height: 100px !important; object-fit: contain !important; transform: none !important; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.875rem; font-weight: 700; color: var(--heading); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--sans); font-size: 0.9375rem;
  color: var(--heading); background: var(--bg); transition: border-color 0.15s; outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-submit { align-self: flex-start; }

/* ---- FOOTER ---- */
.footer { background: var(--bg-dark); padding: 40px 24px; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-logo { font-size: 1rem; font-weight: 700; color: #fff; }
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.45); transition: color 0.15s; }
.footer-links a:hover { color: rgba(255,255,255,0.75); }
.footer-copy { font-size: 0.8125rem; color: rgba(255,255,255,0.35); }
.footer-contact { display: flex; align-items: center; gap: 16px; }
.footer-email { font-size: 0.875rem; color: rgba(255,255,255,0.45); transition: color 0.15s; }
.footer-email:hover { color: rgba(255,255,255,0.75); }
.footer-linkedin { display: flex; align-items: center; color: rgba(255,255,255,0.45); transition: color 0.15s; }
.footer-linkedin:hover { color: var(--accent); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); flex-direction: column; padding: 12px 24px 20px; gap: 0; box-shadow: 0 4px 12px rgba(0,39,91,0.1); }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; margin-top: 8px; }
  .nav-links a { display: block; padding: 14px 0; font-size: 1rem; }
  .nav-links .btn-nav { display: block; text-align: center; padding: 12px 20px; border-radius: var(--radius-sm); margin-bottom: 4px; }
  .nav-toggle { display: flex; }
  .nav { position: relative; }
  .hero { padding: 72px 24px 80px; }
  .section { padding: 64px 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .cta-section { padding: 72px 24px; }
}
