/* ================================================================
   Zed Foundry — Design System
   CSS custom properties, base styles, animation keyframes
   ================================================================ */

:root {
  --color-forge-black:    #0F1115;
  --color-steel-graphite: #2A313B;
  --color-molten-copper:  #C46B36;
  --color-sandstone-white:#F3F0EA;
  --color-oxide-blue:     #4E6E81;
  --color-iron-gray:      #555D68;
  --color-ash-silver:     #A3ABB5;
  --color-soft-concrete:  #D8DDE2;
  --color-ember-gold:     #D49A54;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-accent:  'IBM Plex Serif', serif;

  --section-padding:    clamp(4rem, 8vw, 8rem);
  --content-max-width:  1280px;
  --content-padding-x:  clamp(1.5rem, 4vw, 2.5rem);

  --transition-fast: 0.2s ease;
  --transition-base: 0.35s ease;
  --transition-slow: 0.5s ease;

  --border-subtle: 1px solid #D8DDE2;
  --border-copper: 1px solid #C46B36;
  --radius-card:   3px;
  --radius-button: 2px;
}

/* ================================================================
   BASE RESET
   ================================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-sandstone-white);
  color: var(--color-iron-gray);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Offset body content below fixed nav */
main {
  padding-top: 4rem;
}

@media (min-width: 1024px) {
  main {
    padding-top: 5rem;
  }
}

/* ================================================================
   NAVIGATION
   ================================================================ */

#nav {
  transition: border-color var(--transition-fast);
}

#nav.is-stuck {
  border-bottom: 1px solid var(--color-molten-copper);
}

.nav-link.is-active {
  color: var(--color-sandstone-white) !important;
  border-bottom: 1px solid var(--color-molten-copper);
  padding-bottom: 2px;
}

/* ================================================================
   SECTION LAYOUT HELPERS
   ================================================================ */

.section-container {
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--content-padding-x);
  padding-right: var(--content-padding-x);
}

.section-padding {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

/* ================================================================
   TYPOGRAPHY
   ================================================================ */

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.75rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--color-sandstone-white);
}

.section-headline {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pull-quote {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.6;
}

/* ================================================================
   BUTTONS
   ================================================================ */

.btn-primary {
  display: inline-block;
  background: var(--color-molten-copper);
  color: var(--color-forge-black);
  border-radius: var(--radius-button);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(196, 107, 54, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-sandstone-white);
  border: 1px solid var(--color-steel-graphite);
  border-radius: var(--radius-button);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.btn-secondary:hover {
  border-color: var(--color-molten-copper);
  color: var(--color-molten-copper);
}

/* ================================================================
   CARDS
   ================================================================ */

.card {
  border: 1px solid var(--color-soft-concrete);
  border-radius: var(--radius-card);
  padding: 2.5rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  border-color: var(--color-molten-copper);
  box-shadow: 0 0 0 1px rgba(196, 107, 54, 0.25);
}

.card-dark {
  border-color: var(--color-steel-graphite);
}

.card-dark:hover {
  border-color: var(--color-molten-copper);
  box-shadow: 0 0 0 1px rgba(196, 107, 54, 0.2);
}

/* ================================================================
   DIVIDERS
   ================================================================ */

.divider-copper {
  border: none;
  height: 2px;
  background: var(--color-molten-copper);
}

.divider-subtle {
  border: none;
  height: 1px;
  background: var(--color-soft-concrete);
}

/* ================================================================
   HERO SECTION
   ================================================================ */

.hero-grid-bg {
  background-image: radial-gradient(circle, rgba(163, 171, 181, 0.12) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* ================================================================
   FOUNDRY PROCESS
   ================================================================ */

.process-step-icon {
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid var(--color-molten-copper);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-forge-black);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

/* Desktop: horizontal connecting line */
.process-track {
  position: relative;
}

.process-track::before {
  content: '';
  position: absolute;
  top: 1.75rem; /* vertically centered on icon */
  left: calc(10% + 1.75rem);
  right: calc(10% + 1.75rem);
  height: 1px;
  background: var(--color-molten-copper);
  opacity: 0.5;
  transform-origin: left;
  animation: lineReveal 1.2s ease 0.6s forwards;
  transform: scaleX(0);
}

@keyframes lineReveal {
  to { transform: scaleX(1); }
}

@media (max-width: 1023px) {
  .process-track::before {
    display: none;
  }
}

/* ================================================================
   ARTICLE / THOUGHT LEADERSHIP CARDS
   ================================================================ */

.article-card {
  border-top: 2px solid var(--color-molten-copper);
  padding-top: 1.5rem;
}

/* ================================================================
   PLACEHOLDER BLOCKS
   ================================================================ */

.placeholder-block {
  border: 2px dashed rgba(196, 107, 54, 0.5);
  border-radius: var(--radius-card);
  padding: 3rem 2rem;
  text-align: center;
}

.placeholder-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-molten-copper);
  display: block;
  margin-bottom: 0.5rem;
}

.placeholder-text {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-ash-silver);
}

/* ================================================================
   CONTACT FORM
   ================================================================ */

.form-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ash-silver);
  margin-bottom: 0.5rem;
}

.form-field {
  width: 100%;
  background: var(--color-steel-graphite);
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  padding: 0.875rem 1rem;
  color: var(--color-sandstone-white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color var(--transition-fast);
  outline: none;
  appearance: none;
}

.form-field:focus {
  border-color: var(--color-molten-copper);
}

.form-field::placeholder {
  color: var(--color-ash-silver);
  opacity: 0.6;
}

/* ================================================================
   SCROLL REVEAL ANIMATIONS
   ================================================================ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .process-track::before {
    animation: none;
    transform: scaleX(1);
  }
}

/* ================================================================
   SERVICE SUB-ITEM ROWS (Services page)
   ================================================================ */

.service-item {
  border-top: var(--border-subtle);
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

.service-item:last-child {
  border-bottom: var(--border-subtle);
}

/* ================================================================
   CASE STUDY METRIC
   ================================================================ */

.case-metric {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
  color: var(--color-molten-copper);
  letter-spacing: -0.04em;
  line-height: 1;
}

/* ================================================================
   FOOTER
   ================================================================ */

footer a:hover {
  color: var(--color-molten-copper);
  transition: color var(--transition-fast);
}
