/*
Theme Name: Sunword
Theme URI: https://sunword.com
Author: Sunword LLC
Description: Custom theme for Sunword LLC — AI/ML Consulting
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: sunword
*/

/* ─── Design Tokens ─── */
:root {
  --navy:        #0D1B2A;
  --navy-mid:    #162436;
  --navy-light:  #1E3048;
  --slate:       #4A6580;
  --slate-light: #7A96B0;
  --gold:        #F5A623;
  --orange:      #E8622A;
  --yellow:      #FDD835;
  --cream:       #FFFDF7;
  --white:       #FFFFFF;
  --gray-light:  #F4F6F8;
  --gray-mid:    #E2E8EF;
  --gray-text:   #5A6B7A;
  --border:      #DDE4EC;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', 'Helvetica Neue', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
  --shadow-sm:   0 2px 8px rgba(13,27,42,0.08);
  --shadow-md:   0 8px 24px rgba(13,27,42,0.12);
  --shadow-lg:   0 20px 48px rgba(13,27,42,0.16);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--orange); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--navy); }

/* ─── Typography ─── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
}

/* ─── Layout ─── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── Navigation ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
  letter-spacing: -0.03em;
  font-weight: 700;
}
.site-logo span { color: var(--gold); }
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.main-nav a {
  color: var(--gray-text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--navy); }
.nav-cta {
  background: var(--orange);
  color: var(--white) !important;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.15s !important;
}
.nav-cta:hover {
  background: var(--navy) !important;
  color: var(--white) !important;
  transform: translateY(-1px);
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 0.9rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 6px;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
}

/* ─── Section Shared ─── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.75rem;
  display: block;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--navy);
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--gray-text);
  max-width: 560px;
  line-height: 1.75;
}

/* ─── Hero ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--navy);
  position: relative;
  overflow: hidden;
  padding: 8rem 0 5rem;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 70% 30%, rgba(245,166,35,0.12) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(232,98,42,0.08) 0%, transparent 40%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative;
  max-width: 780px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245,166,35,0.15);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease both;
}
.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  color: var(--white);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s 0.1s ease both;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.7);
  max-width: 560px;
  margin-bottom: 3rem;
  animation: fadeUp 0.6s 0.2s ease both;
  line-height: 1.8;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.3s ease both;
}
.hero-actions .btn-secondary {
  border-color: rgba(255,255,255,0.3);
  color: var(--white);
}
.hero-actions .btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  animation: fadeUp 0.6s 0.4s ease both;
}
.hero-stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.hero-stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}

/* ─── Services ─── */
.services {
  padding: 7rem 0;
  background: var(--white);
}
.services-header {
  margin-bottom: 4rem;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-mid);
}
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}
.service-card h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.service-card p {
  font-size: 0.92rem;
  color: var(--gray-text);
  line-height: 1.7;
}

/* ─── CTA Band ─── */
.cta-band {
  background: var(--navy);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 80% 50%, rgba(245,166,35,0.1), transparent 70%);
}
.cta-band .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}
.cta-band h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--white);
  max-width: 560px;
}
.cta-band h2 em {
  font-style: normal;
  color: var(--gold);
}
.cta-band-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ─── Case Studies ─── */
.case-studies {
  padding: 7rem 0;
  background: var(--gray-light);
}
.case-studies-header {
  margin-bottom: 4rem;
}
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}
.case-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
}
.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.case-card-tag {
  background: var(--navy);
  padding: 1.5rem 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.case-tag-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.case-tag-industry {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}
.case-card-body {
  padding: 1.75rem 2rem 2rem;
}
.case-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--navy);
}
.case-card-body p {
  font-size: 0.9rem;
  color: var(--gray-text);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.case-result {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--orange);
}

/* ─── About ─── */
.about-section {
  padding: 7rem 0;
  background: var(--white);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-content h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 1.5rem;
}
.about-content p {
  color: var(--gray-text);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}
.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.about-value {
  background: var(--gray-light);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
}
.about-value h4 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.about-value p {
  font-size: 0.82rem;
  color: var(--gray-text);
  margin: 0;
}
.about-visual {
  background: var(--navy);
  border-radius: 16px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.about-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(245,166,35,0.15), transparent 60%);
}
.about-visual-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.about-stat {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}
.about-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.about-stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

/* ─── Footer ─── */
.site-footer {
  background: var(--navy);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 300px;
  line-height: 1.7;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
  font-weight: 700;
}
.footer-logo span { color: var(--gold); }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.25rem;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}
.footer-tagline {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  font-family: var(--font-mono);
}

/* ─── About Page ─── */
.page-hero {
  background: var(--navy);
  padding: 10rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 70% 50%, rgba(245,166,35,0.1), transparent 70%);
}
.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--white);
  position: relative;
  margin-bottom: 1rem;
}
.page-hero .lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.65);
  max-width: 580px;
  line-height: 1.8;
  position: relative;
}
.page-body {
  padding: 5rem 0;
}
.page-content {
  max-width: 760px;
}
.page-content h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1rem;
  color: var(--navy);
}
.page-content p {
  color: var(--gray-text);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

/* ─── Generic Page ─── */
.generic-page {
  padding: 8rem 0 5rem;
}
.generic-page h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 2rem;
}
.generic-page-content {
  max-width: 760px;
  color: var(--gray-text);
  line-height: 1.85;
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats { flex-wrap: wrap; gap: 2rem; }
  .cta-band .container { flex-direction: column; text-align: center; }
  .cta-band-actions { justify-content: center; }
  .about-values { grid-template-columns: 1fr; }
}

/* ─── Contact Form ─── */
.contact-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form input,
.contact-form textarea {
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--navy);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,166,35,0.15);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--slate-light); }
.contact-form textarea { resize: vertical; min-height: 140px; }
.form-success {
  background: #f0faf0;
  border: 1px solid #a3d9a5;
  color: #276749;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}
.form-error {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ─── Mobile Menu ─── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Responsive Overrides ─── */
@media (max-width: 768px) {
  /* Fix horizontal overflow */
  html, body { overflow-x: hidden; max-width: 100%; }
  .container { padding: 0 1.25rem; }
  section, .hero, .services, .cta-band, .case-studies, .about-section,
  .site-header, .site-footer { max-width: 100%; overflow-x: hidden; }

  /* Header */
  .site-header { padding: 1rem 0; }
  .site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    width: 100%;
  }
  .site-logo { font-size: 1.25rem; flex-shrink: 0; }

  /* Show hamburger, hide nav links */
  .menu-toggle { display: flex; }
  .main-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    box-shadow: var(--shadow-md);
    z-index: 99;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    width: 100%;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-mid);
    font-size: 1rem;
    margin: 0;
  }
  .nav-cta {
    margin: 1rem 1.5rem;
    width: calc(100% - 3rem);
    text-align: center;
    border-radius: 6px;
  }

  /* Hero */
  .hero { padding: 6rem 0 3rem; min-height: auto; }
  .hero h1 { font-size: 2.2rem; }
  .hero-sub { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary { width: 100%; text-align: center; justify-content: center; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; margin-top: 3rem; padding-top: 2rem; }
  .hero-stat-number { font-size: 2rem; }

  /* Services */
  .services { padding: 4rem 0; }
  .services-grid { grid-template-columns: 1fr; }

  /* CTA Band */
  .cta-band { padding: 3rem 0; }
  .cta-band .container { flex-direction: column; text-align: center; }
  .cta-band h2 { font-size: 1.5rem; }
  .cta-band-actions { flex-direction: column; width: 100%; }
  .cta-band-actions .btn-primary,
  .cta-band-actions .btn-secondary { width: 100%; text-align: center; justify-content: center; }

  /* Case Studies */
  .case-studies { padding: 4rem 0; }
  .case-studies-grid { grid-template-columns: 1fr; }

  /* About */
  .about-section { padding: 4rem 0; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-values { grid-template-columns: 1fr; }
  .about-visual { padding: 2rem; }
  .about-visual-inner { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .site-footer { padding: 3rem 0 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Pages */
  .page-hero { padding: 7rem 0 3rem; }
  .page-hero h1 { font-size: 2rem; }
  .generic-page { padding: 6rem 0 3rem; }

  /* Contact form */
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 1.8rem; }
  .section-title { font-size: 1.6rem; }
  .about-visual-inner { grid-template-columns: 1fr; }
}
