/* ==========================================================================
   STUDIO GRAPHIX — Stylesheet
   ========================================================================== */

:root {
  /* Colors */
  --bg: #004952;
  --bg-alt: #013e46;
  --card-bg: #0a5861;
  --card-border: #0f6570;
  --text: #f7eda2;
  --text-muted: #cdc198;
  --accent: #e8a54b;
  --accent-hover: #f2ba6f;
  --accent-soft: #d8785c;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --max-width: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }

p { margin: 0 0 1em; color: var(--text-muted); }

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

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Eyebrow / label ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background-color: var(--accent);
  color: #1a1305;
}
.btn-primary:hover { background-color: var(--accent-hover); }

.btn-secondary {
  background-color: transparent;
  color: var(--text);
  border-color: rgba(247, 237, 162, 0.4);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 1.8em;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(0, 73, 82, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(247, 237, 162, 0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background-color: var(--accent);
  border-radius: 2px;
}

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

/* ---------- Override nav CTA button ---------- */
.nav-cta .btn-primary {
  color: #000000 !important;
  font-size: 1.1rem;
  padding: 16px 36px;
}

/* Hamburger button — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid rgba(247, 237, 162, 0.25);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  z-index: 110;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 100px;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-copy p.lead {
  font-size: 1.15rem;
  max-width: 46ch;
}

/* Signature visual: stacked carousel cards */
.card-stack {
  position: relative;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stack-card {
  position: absolute;
  width: 210px;
  height: 260px;
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(247, 237, 162, 0.12);
}

.stack-card .stack-index {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.stack-card .stack-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.2;
}

.stack-card.card-1 {
  background-color: var(--card-bg);
  transform: rotate(-9deg) translate(-70px, 10px);
  z-index: 1;
}
.stack-card.card-2 {
  background-color: #073f47;
  transform: rotate(4deg) translate(20px, -18px);
  z-index: 2;
}
.stack-card.card-3 {
  background: linear-gradient(155deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: #1a1305;
  transform: rotate(13deg) translate(78px, 24px);
  z-index: 3;
}
.stack-card.card-3 .stack-title,
.stack-card.card-3 .stack-index { color: #1a1305; }

/* ---------- Sections ---------- */
.section {
  padding: 88px 0;
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- Problem block ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

/* ---------- Card grids ---------- */
.grid {
  display: grid;
  gap: 26px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px;
}

.card .eyebrow { margin-bottom: 0.6em; }

.card ul {
  margin-top: 1.2em;
}

.card ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

/* Feature list (checkmark style, no bullet dot) */
.feature-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Stats Section ---------- */
.stats-grid .stat-item {
  text-align: center;
  padding: 20px 10px;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 600;
  color: var(--accent);
  line-height: 1.1;
}

.stat-label {
  display: block;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
}

/* ---------- Testimonials ---------- */
.testimonials-section {
  background-color: var(--bg);
}

.testimonials-grid {
  gap: 30px;
}

.testimonial-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.testimonial-card blockquote {
  margin: 0 0 20px 0;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  position: relative;
}

.testimonial-card blockquote p {
  margin: 0;
}

.testimonial-card blockquote::before {
  content: "“";
  font-size: 3rem;
  font-family: var(--font-display);
  color: var(--accent);
  line-height: 0.8;
  display: block;
  margin-bottom: 4px;
  opacity: 0.5;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  border-top: 1px solid rgba(247, 237, 162, 0.08);
  padding-top: 16px;
}

.testimonial-author .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  font-family: var(--font-body);
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-info strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.2;
}

.author-info span {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.7;
  line-height: 1.2;
}

/* ---------- Partners / Marquee ---------- */
.partners-section {
  overflow: hidden;
}

.marquee {
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.marquee-track {
  display: flex;
  gap: 60px;
  animation: marqueeScroll 20s linear infinite;
  width: max-content;
}

.marquee-item {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.05em;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.marquee-item:hover {
  opacity: 1;
  color: var(--accent);
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ---------- Offer cards (Services page) ---------- */
.offer {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 44px;
  margin-bottom: 30px;
}

.offer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.offer-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background-color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
}

.offer-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 26px;
}

.mini-stack {
  display: flex;
  gap: 14px;
  margin: 22px 0;
  flex-wrap: wrap;
}

.mini-chip {
  flex: 1 1 140px;
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--card-border);
  background-color: var(--bg-alt);
}

.mini-chip .num {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 1.4rem;
  display: block;
}

.mini-chip span.label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- Who we work with (About page) ---------- */
.audience-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.audience-item {
  border-left: 2px solid var(--accent);
  padding-left: 18px;
}

/* ---------- Final CTA banner ---------- */
.cta-banner {
  text-align: center;
  padding: 90px 0;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.cta-banner h2 { max-width: 20ch; margin-left: auto; margin-right: auto; }

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

.contact-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 40px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background-color: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.contact-detail {
  margin-bottom: 22px;
}

.contact-detail .eyebrow { margin-bottom: 0.3em; }

.contact-detail a {
  color: var(--accent);
  font-weight: 600;
  word-break: break-word;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(247, 237, 162, 0.1);
  padding: 44px 0 30px;
  background-color: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  gap: 18px;
  margin-top: 4px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  border: 1px solid rgba(247, 237, 162, 0.08);
}

.footer-social a:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.footer-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   Subtle scroll animations
   ========================================================================== */

/* Elements start invisible and slightly below */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.9, 0.3, 1),
              transform 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* When they become visible */
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children (cards, list items) */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: 0.10s; }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: 0.20s; }
.stagger-children.is-visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.is-visible > *:nth-child(6) { transition-delay: 0.30s; }

.stagger-children.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Hero gets a faster, more prominent entry */
.hero .animate-on-scroll {
  transition-duration: 0.6s;
  transform: translateY(40px);
}

/* Card hover – tiny scale addition */
.card:hover,
.offer:hover {
  transform: translateY(-6px) scale(1.01);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
  .card-stack { height: 260px; margin-top: 30px; }
  .problem-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .offer-body { grid-template-columns: 1fr; }
  .audience-list { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background-color: var(--bg-alt);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 110px 32px 32px;
    gap: 26px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    margin: 0;
    overflow-y: auto;
    z-index: 100;
  }

  .nav-links.is-open {
    transform: translateX(0);
  }

  .nav-links a { font-size: 1.05rem; }

  .nav-cta { margin-left: 0; }

  .hamburger { display: flex; }

  .brand img { width: 72px; height: 72px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .section { padding: 64px 0; }

  .hero { padding: 56px 0 64px; }

  .offer { padding: 28px; }

  .stats-grid .stat-number {
    font-size: 2.8rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile "Book a Free Consult" button fix */
  .nav-cta .btn-primary {
    width: auto !important;
    padding: 10px 24px !important;
    font-size: 0.95rem !important;
    white-space: nowrap;
  }

  .marquee-item {
    font-size: 1rem;
  }
  .marquee-track {
    gap: 40px;
  }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .btn { width: 100%; justify-content: center; }
  .btn-group { flex-direction: column; }
  .stack-card { width: 170px; height: 210px; padding: 16px; }
  .stats-grid .stat-number {
    font-size: 2.2rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .nav-cta .btn-primary {
    width: auto !important;
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
    white-space: nowrap;
  }

  .marquee-item {
    font-size: 0.85rem;
  }
  .marquee-track {
    gap: 30px;
  }
}