/* =========================================================
   Wildfire Foundry — Social Media Agency
   Design system: warm neutrals + coral/peach flame gradient
   Fonts: Fraunces (display serif) + Inter (body)
   ========================================================= */

:root {
  /* Palette */
  --bg: #fbf6ef;
  --bg-alt: #f3ebe0;
  --surface: #ffffff;
  --ink: #1a1815;
  --ink-soft: #4a453e;
  --ink-mute: #7a746a;
  --line: #ebe1d1;
  --accent: #e97a55;         /* coral flame */
  --accent-deep: #d45a3c;
  --accent-warm: #f5a17a;    /* peach flame top */
  --accent-soft: #fbe0cf;
  --accent-glow: #fdece0;
  --flame-gradient: linear-gradient(180deg, #f5a17a 0%, #e97a55 55%, #d45a3c 100%);
  --flame-gradient-h: linear-gradient(90deg, #f5a17a 0%, #e97a55 55%, #d45a3c 100%);
  --cream: #f7ecd9;

  /* Type */
  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Sizing */
  --text-xs: 0.8125rem;   /* 13px */
  --text-sm: 0.9375rem;   /* 15px */
  --text-base: 1.0625rem; /* 17px */
  --text-lg: 1.25rem;
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --text-hero: clamp(2.75rem, 1.8rem + 4vw, 5.5rem);

  /* Spacing */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(4rem, 8vw, 8rem);

  /* Radius / shadow */
  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(26, 24, 21, 0.06);
  --shadow: 0 12px 40px rgba(26, 24, 21, 0.10);
  --shadow-lg: 0 30px 80px rgba(26, 24, 21, 0.15);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.015em; line-height: 1.08; margin: 0; }
p { margin: 0 0 1em; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 246, 239, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.15rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark { width: 40px; height: 40px; flex: none; display: inline-block; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.nav-links a { position: relative; padding-block: 0.35rem; }
.nav-links a:hover { color: var(--accent); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transition: right 0.3s var(--ease);
}
.nav-links a:hover::after { right: 0; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--ink);
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.6px;
  background: currentColor;
  position: relative;
  transition: 0.25s var(--ease);
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.6px;
  background: currentColor;
  transition: 0.25s var(--ease);
}
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: var(--section-pad);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-mute);
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.hero h1 {
  font-size: var(--text-hero);
  font-weight: 400;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: italic;
  background: var(--flame-gradient-h);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.hero-lede {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 2rem;
}
.hero-cta-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-primary { background: var(--flame-gradient-h); background-size: 200% 100%; background-position: 0% 50%; color: #fff; box-shadow: 0 6px 18px rgba(233, 122, 85, 0.35); transition: background-position 0.4s var(--ease), transform 0.2s var(--ease); }
.btn-primary:hover { background-position: 100% 50%; transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.hero-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-lg);
  transform: rotate(1deg);
}
.hero-media picture, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(26,24,21,0.25));
  pointer-events: none;
}

.hero-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34a853; box-shadow: 0 0 0 4px rgba(52, 168, 83, 0.18);
}

/* Client marquee */
.clients {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 2.5rem;
  background: var(--bg-alt);
}
.clients-label {
  text-align: center;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin-bottom: 1.5rem;
}
.clients-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  color: var(--ink-soft);
  opacity: 0.75;
}
.clients-row span { white-space: nowrap; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section {
  padding-block: var(--section-pad);
}
.section-head {
  max-width: 780px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head h2 {
  font-size: var(--text-2xl);
  font-weight: 400;
  margin-bottom: 1rem;
}
.section-head h2 em {
  font-style: italic;
  background: var(--flame-gradient-h);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-head p {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.service {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}
.service:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.service-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.service-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--flame-gradient);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.service-icon svg { position: relative; z-index: 1; transition: color 0.3s var(--ease); }
.service:hover .service-icon::before { opacity: 1; }
.service:hover .service-icon svg { color: #fff; }
.service h3 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.service p {
  color: var(--ink-soft);
  font-size: var(--text-sm);
  margin: 0;
}

/* ---------- About / Human focus ---------- */
.about {
  background: var(--bg-alt);
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 400;
  background: var(--flame-gradient-h);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat .label {
  font-size: var(--text-xs);
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.member {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-alt);
  aspect-ratio: 3 / 4;
}
.member img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
}
.member:hover img { transform: scale(1.04); }
.member-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem 1.15rem;
  background: linear-gradient(180deg, transparent, rgba(20,18,15,0.85));
  color: #fff;
}
.member-info h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 0.15rem;
}
.member-info span {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ---------- Work / Case studies ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}
.work-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}
.work-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.work-item:hover img { transform: scale(1.03); }
.work-item .caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(20,18,15,0.8));
}
.work-item .caption small {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.85;
}
.work-item .caption h4 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0.25rem 0 0;
}

.work-item.span-4 { grid-column: span 4; aspect-ratio: 16/9; }
.work-item.span-2 { grid-column: span 2; aspect-ratio: 4/5; }
.work-item.span-3 { grid-column: span 3; aspect-ratio: 4/3; }

/* ---------- Testimonial ---------- */
.testimonial {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.testimonial blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 2rem;
  letter-spacing: -0.01em;
}
.testimonial blockquote::before,
.testimonial blockquote::after {
  content: "\201C";
  color: var(--accent);
  font-size: 1.2em;
  line-height: 0;
  vertical-align: -0.2em;
  margin-right: 0.15em;
}
.testimonial blockquote::after {
  content: "\201D";
  margin-left: 0.15em;
  margin-right: 0;
}
.testimonial cite {
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--ink-mute);
  letter-spacing: 0.05em;
}
.testimonial cite strong { color: var(--ink); font-weight: 600; margin-right: 0.4rem; }

/* ---------- Process ---------- */
.process {
  background: var(--ink);
  color: var(--bg);
}
.process .section-head h2 { color: var(--bg); }
.process .section-head h2 em { color: var(--accent-soft); }
.process .section-head p { color: rgba(255,255,255,0.72); }
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}
.step {
  padding: 1.75rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
}
.step-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent-soft);
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 400;
}
.step h3 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--bg);
  margin-bottom: 0.5rem;
}
.step p { color: rgba(255,255,255,0.68); font-size: var(--text-sm); margin: 0; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-copy h2 {
  font-size: var(--text-2xl);
  margin-bottom: 1rem;
}
.contact-copy h2 em {
  font-style: italic;
  background: var(--flame-gradient-h);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact-copy p {
  color: var(--ink-soft);
  font-size: var(--text-lg);
  max-width: 45ch;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
}
.contact-list li { display: flex; align-items: center; gap: 0.85rem; font-size: var(--text-sm); }
.contact-list svg { color: var(--accent); flex: none; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}
.field {
  display: block;
  margin-bottom: 1.15rem;
}
.field label {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-bottom: 0.4rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: var(--text-sm);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-card button[type="submit"] {
  width: 100%;
  background: var(--ink);
  color: var(--bg);
  padding: 1rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.2s var(--ease);
  margin-top: 0.5rem;
}
.form-card button[type="submit"]:hover { background: var(--accent); }
.form-note { font-size: var(--text-xs); color: var(--ink-mute); text-align: center; margin: 1rem 0 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer-brand p { color: var(--ink-soft); font-size: var(--text-sm); max-width: 34ch; margin-top: 0.75rem; }
.footer-col h5 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin: 0 0 1rem;
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--ink-soft); font-size: var(--text-sm); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--text-xs);
  color: var(--ink-mute);
}
.socials { display: flex; gap: 0.75rem; }
.socials a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.socials a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 520px; margin-inline: auto; aspect-ratio: 4/5; }
  .work-grid { grid-template-columns: repeat(4, 1fr); }
  .work-item.span-4 { grid-column: span 4; }
  .work-item.span-2 { grid-column: span 2; }
  .work-item.span-3 { grid-column: span 4; aspect-ratio: 16/10; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header.menu-open .nav-links,
  .site-header.menu-open .nav-cta { display: flex; }
  .site-header.menu-open .nav {
    flex-wrap: wrap;
  }
  .site-header.menu-open .nav-links {
    order: 3;
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0 0.5rem;
    border-top: 1px solid var(--line);
    margin-top: 0.5rem;
  }
  .site-header.menu-open .nav-cta { order: 4; width: 100%; justify-content: center; }
  .stats { grid-template-columns: 1fr; text-align: left; }
  .stat { display: flex; align-items: baseline; gap: 1rem; padding-block: 0.5rem; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .stat .num { margin: 0; }
  .work-grid { grid-template-columns: 1fr; }
  .work-item.span-4, .work-item.span-2, .work-item.span-3 {
    grid-column: 1 / -1;
    aspect-ratio: 4 / 3;
  }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Selection ---------- */
::selection { background: var(--accent); color: #fff; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .menu-toggle, .nav-cta, .hero-badge { display: none; }
  .hero, .section { padding: 1rem 0; }
  body { background: #fff; color: #000; }
}
