/* ============================================================
   Stack Publishing — Global Stylesheet
   Palette: Charcoal #1C1C1C | Amber #F59E0B | White #FFFFFF
   ============================================================ */

/* --- Reset & Base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #1C1C1C;
  --bg2:       #242424;
  --bg3:       #2E2E2E;
  --border:    #383838;
  --gold:      #F59E0B;
  --gold-dim:  #D97706;
  --white:     #FFFFFF;
  --muted:     #9CA3AF;
  --text:      #E5E7EB;

  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --nav-h:     72px;
  --max-w:     1160px;
  --radius:    8px;
  --transition: 0.22s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* --- Typography ------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
}

h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.15rem; }

p { color: var(--text); }

.gold { color: var(--gold); }
.muted { color: var(--muted); font-size: 0.9rem; }

/* --- Layout ---------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

section { padding-block: 96px; }
section.tight { padding-block: 64px; }

/* --- Buttons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-dim);
  border-color: var(--gold-dim);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--gold);
  border-color: transparent;
  padding-inline: 0;
}
.btn-ghost:hover { color: var(--white); }

/* --- Navigation ------------------------------------------ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.nav.scrolled {
  background: rgba(28,28,28,0.95);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--white);
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }

.nav-cta { margin-left: 12px; }

/* Mobile nav */
.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(--white);
  transition: all var(--transition);
}

/* --- Hero ------------------------------------------------ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(245,158,11,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 70%, rgba(245,158,11,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}
.hero-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
}

.hero h1 { margin-bottom: 24px; }

.hero-desc {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.stat-card {
  background: var(--bg2);
  padding: 32px 28px;
  transition: background var(--transition);
}
.stat-card:hover { background: var(--bg3); }

.stat-num {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* --- Section headers ------------------------------------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold);
}

.section-head { margin-bottom: 56px; }
.section-head p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin-top: 14px;
  line-height: 1.7;
}

/* --- Services Grid --------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.service-card {
  background: var(--bg2);
  padding: 48px 40px;
  transition: background var(--transition);
  position: relative;
}
.service-card:hover { background: var(--bg3); }

.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(245,158,11,0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--gold);
  font-size: 1.4rem;
}

.service-card h3 { margin-bottom: 14px; }
.service-card p { color: var(--muted); line-height: 1.7; }

.service-card .service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  transition: gap var(--transition);
}
.service-card:hover .service-link { gap: 10px; }

/* --- Process --------------------------------------------- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
  counter-reset: step;
}

.step {
  background: var(--bg2);
  padding: 40px 32px;
  position: relative;
  counter-increment: step;
}

.step::before {
  content: "0" counter(step);
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  display: block;
  margin-bottom: 20px;
}

.step h4 { margin-bottom: 10px; }
.step p { font-size: 0.9rem; color: var(--muted); }

/* --- Team ------------------------------------------------ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.team-card {
  background: var(--bg2);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color var(--transition), transform var(--transition);
}
.team-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.team-photo {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.team-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-initials {
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.6;
}

.team-info { padding: 28px; }
.team-info h3 { font-size: 1.2rem; margin-bottom: 4px; }
.team-role {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.team-bio { font-size: 0.9rem; color: var(--muted); line-height: 1.65; }

/* --- Portfolio ------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.work-card {
  background: var(--bg2);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color var(--transition), transform var(--transition);
}
.work-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.work-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.work-thumb-label {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.work-info { padding: 28px; }
.work-tags { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(245,158,11,0.1);
  color: var(--gold);
  border-radius: 4px;
}

.work-info h3 { margin-bottom: 10px; }
.work-info p { font-size: 0.9rem; color: var(--muted); }

.work-result {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.work-result-num {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
}
.work-result-text { font-size: 0.85rem; color: var(--muted); }

/* --- Contact -------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.contact-info h2 { margin-bottom: 16px; }
.contact-info p { color: var(--muted); margin-bottom: 40px; }

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-detail-icon {
  width: 40px;
  height: 40px;
  background: rgba(245,158,11,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
  font-size: 1rem;
}
.contact-detail-text strong { display: block; color: var(--white); font-size: 0.9rem; }
.contact-detail-text span { color: var(--muted); font-size: 0.85rem; }

/* Contact Form */
.contact-form {
  background: var(--bg2);
  border-radius: 12px;
  padding: 48px;
  border: 1px solid var(--border);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-group select option { background: var(--bg3); }

.form-submit { width: 100%; justify-content: center; font-size: 1rem; padding: 16px; }

.form-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 14px;
}

/* --- CTA Banner ----------------------------------------- */
.cta-banner {
  background: var(--gold);
  padding-block: 80px;
}
.cta-banner h2 { color: #000; }
.cta-banner p { color: rgba(0,0,0,0.65); margin-top: 12px; margin-bottom: 36px; font-size: 1.1rem; }
.cta-banner .btn-dark {
  background: #000;
  color: var(--white);
  border-color: #000;
}
.cta-banner .btn-dark:hover { background: #222; }

/* --- Footer --------------------------------------------- */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: 56px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 14px;
  max-width: 280px;
  line-height: 1.65;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}

/* --- Page hero (inner pages) ---------------------------- */
.page-hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 80px;
  border-bottom: 1px solid var(--border);
}

.page-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.page-hero-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold);
}

.page-hero h1 { max-width: 700px; margin-bottom: 20px; }
.page-hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.7;
}

/* --- Divider -------------------------------------------- */
.divider {
  height: 1px;
  background: var(--border);
  margin-block: 0;
}

/* --- Utility -------------------------------------------- */
.text-center { text-align: center; }
.text-center .section-head p { margin-inline: auto; }
.text-center .section-label { margin-inline: auto; }
.mt-auto { margin-top: auto; }
.bg-dark2 { background: var(--bg2); }

/* --- Animations ----------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive ----------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-desc { max-width: 100%; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  section { padding-block: 64px; }
  .services-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .process-steps { grid-template-columns: 1fr; }

  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav-mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(28,28,28,0.98);
    backdrop-filter: blur(12px);
    padding: 32px 24px;
    gap: 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-mobile-open .nav-links a { font-size: 1.1rem; }
  .nav-mobile-open .nav-cta { display: block; padding: 0 24px 32px; }

  .contact-form { padding: 28px; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.8rem; }
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 48px); padding-bottom: 48px; }
  .stat-num { font-size: 1.8rem; }
}
