/* =========================================================
   Common Media — minimal modern, tuned to the existing palette
   Fonts: Fenul Standard (headlines), GT Pressura Extended (UI/body),
          Outfit (brand wordmark)
   ========================================================= */

/* Self-hosted heading typeface */
@font-face {
  font-family: "Fenul Standard";
  src: url("fonts/FenulStandard-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Self-hosted body typeface — GT Pressura Extended.
   Light is the default reading weight; Text is reserved for emphasis (bold). */
@font-face {
  font-family: "GT Pressura";
  src: url("fonts/GT-Pressura-Extended-Light.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "GT Pressura";
  src: url("fonts/GT-Pressura-Extended-Text.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette pulled from the current site */
  --bg-peach:   #F2D9C2;
  --bg-cream:   #FBF6F0;
  --ink:        #2A1640;   /* deep plum */
  --ink-2:      #4A2D5C;
  --ink-soft:   #6E5A7A;
  --accent:     #D63A1A;   /* burnt red-orange */
  --accent-2:   #B82D10;
  --mauve:      #5A2A55;
  --footer:     #1A0A2E;
  --rule:       rgba(42, 22, 64, 0.14);
  --rule-strong:rgba(42, 22, 64, 0.30);

  --font-serif: "Fenul Standard", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans:  "GT Pressura", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-brand: "Outfit", "Inter", -apple-system, sans-serif;

  --max:    1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 999px;        /* pill radius */
  --radius-card: 18px;

  --t-fast: 180ms cubic-bezier(.2,.7,.2,1);
  --t-mid:  320ms cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- Base ---------- */
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-cream);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--bg-cream); }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.15; }
h4 { font-size: 1.1rem; }
p  { color: var(--ink-2); }
p.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 56ch;
}

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding: clamp(72px, 10vw, 144px) 0; }
.section--tight { padding: clamp(48px, 6vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.row { display: grid; gap: clamp(28px, 4vw, 64px); }

.cols-2  { grid-template-columns: 1fr; }
.cols-3  { grid-template-columns: 1fr; }
.cols-4  { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) {
  .cols-2 { grid-template-columns: 1fr 1fr; }
  .cols-3 { grid-template-columns: repeat(3, 1fr); }
  .cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in srgb, var(--bg-cream) 78%, transparent);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1;
  color: var(--ink);
}
/* Brand mark: three dots between "common" and "language". */
.brand-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.brand-dots > span {
  width: 5px; height: 5px;
  border-radius: 999px;
  background: var(--accent);
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
}
.nav-links a {
  font-size: 0.96rem;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
  transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
}
.nav-toggle { display: none; }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    padding: 8px 14px;
  }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
    margin-top: 12px;
  }
  .nav.open { flex-wrap: wrap; }
}

/* ---------- Buttons / pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.005em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg-cream);
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg-cream); }
.btn .arrow { transition: transform var(--t-fast); }
.btn:hover .arrow { transform: translateX(3px); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 70% 60% at 0% 0%, var(--bg-peach) 0%, transparent 70%),
    linear-gradient(180deg, #FCEFE1 0%, var(--bg-cream) 70%);
  padding-top: clamp(80px, 12vw, 160px);
  padding-bottom: clamp(56px, 8vw, 120px);
  overflow: hidden;
}
.hero h1 {
  max-width: 28ch;
  font-size: clamp(2.6rem, 6.6vw, 6rem);
  line-height: 1.02;
}
.hero .lead { margin-top: 28px; }
.hero-actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 56px;
  display: flex; gap: 14px;
  flex-wrap: wrap;
}
/* ---------- Section header ---------- */
.section-head {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-bottom: clamp(40px, 5vw, 72px);
}
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1fr 1.4fr; align-items: end; gap: 64px; }
}
.section-head h2 { max-width: 22ch; }
.section-head .lead { margin-top: 8px; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: clamp(24px, 3vw, 36px);
  transition: transform var(--t-mid), border-color var(--t-mid), box-shadow var(--t-mid);
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--rule-strong);
  box-shadow: 0 14px 40px -24px rgba(42,22,64,0.35);
}
.card .num {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}
.card h3 { margin-bottom: 12px; }
.card p { color: var(--ink-2); }
.card ul {
  margin-top: 18px;
  list-style: none;
  display: grid;
  gap: 6px;
}
.card ul li {
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding-left: 16px;
  position: relative;
}
.card ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

/* ---------- Case study card ---------- */
.case {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: clamp(28px, 3vw, 44px);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  transition: transform var(--t-mid), border-color var(--t-mid);
}
.case:hover { transform: translateY(-3px); border-color: var(--rule-strong); }
@media (min-width: 900px) {
  .case { grid-template-columns: 0.45fr 1fr; gap: 56px; align-items: start; }
}
.case-tag {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.case h3 { margin-bottom: 12px; }
.case .case-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 22px;
}
.case .case-meta span {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--bg-peach);
  color: var(--ink);
}
.case .outcome {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.case .outcome .stat .num {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--ink);
  line-height: 1;
  display: block;
}
.case .outcome .stat .label {
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin-top: 6px;
  display: block;
}

/* ---------- Quote / belief ---------- */
.belief {
  background:
    radial-gradient(ellipse 80% 70% at 100% 0%, rgba(214,58,26,0.08) 0%, transparent 60%),
    var(--bg-cream);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.belief blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 26ch;
  color: var(--ink);
}
.belief cite {
  display: block;
  margin-top: 28px;
  font-style: normal;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---------- Logos / clients ---------- */
.client-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: center;
  opacity: 0.78;
}
@media (min-width: 720px) { .client-row { grid-template-columns: repeat(4, 1fr); } }
.client-row .logo {
  display: flex; align-items: center; justify-content: center;
  height: 56px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  border: 1px dashed var(--rule-strong);
  border-radius: 12px;
  background: rgba(255,255,255,0.5);
}

/* ---------- Process steps ---------- */
.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 720px) {
  .step { grid-template-columns: 0.7fr 0.6fr 1.4fr; gap: 36px; align-items: baseline; }
}
.step .step-num {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.step h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}

/* ---------- Contact / footer CTA ---------- */
.cta {
  background:
    radial-gradient(ellipse 60% 80% at 0% 100%, var(--bg-peach) 0%, transparent 60%),
    var(--bg-cream);
  border-top: 1px solid var(--rule);
}
.cta h2 { max-width: 16ch; }
.cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: end;
}
@media (min-width: 900px) {
  .cta-grid { grid-template-columns: 1.3fr 1fr; }
}
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer);
  color: #E8DDF0;
  padding: clamp(56px, 7vw, 96px) 0 32px;
  margin-top: 0;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 16px;
  opacity: 0.6;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
}
.footer-grid p, .footer-grid a, .footer-grid li {
  color: #C8B8D6;
  font-size: 0.95rem;
  line-height: 1.6;
}
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-grid a:hover { color: var(--bg-peach); }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
  font-size: 0.85rem;
  color: rgba(232,221,240,0.55);
  text-align: center;
}
.site-footer .brand { color: #fff; }
.site-footer .brand-dots > span { background: var(--bg-peach); }

/* ---------- Form ---------- */
.form { display: grid; gap: 18px; max-width: 520px; }
.form label {
  display: grid; gap: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.form input, .form textarea, .form select {
  font: inherit;
  padding: 14px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  transition: border-color var(--t-fast);
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--accent);
}
.form textarea { min-height: 140px; resize: vertical; }

/* ---------- Utility ---------- */
.divider { height: 1px; background: var(--rule); margin: 0; border: 0; }
.text-soft { color: var(--ink-soft); }
.mt-s { margin-top: 12px; } .mt-m { margin-top: 24px; } .mt-l { margin-top: 48px; }
.center { text-align: center; }
.muted { opacity: 0.7; }
.cap-rule {
  display: flex; align-items: center; gap: 14px;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 28px;
}
.cap-rule::after { content: ""; flex: 1; height: 1px; background: var(--rule-strong); }

/* ---------- Scroll reveal ---------- */
.reveal {
  --reveal-delay: 0ms;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 750ms cubic-bezier(.2,.7,.2,1) var(--reveal-delay),
    transform 750ms cubic-bezier(.2,.7,.2,1) var(--reveal-delay);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Hero cursor-tracking warmth ---------- */
.hero {
  --mouse-x: 50%;
  --mouse-y: 50%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle 380px at var(--mouse-x) var(--mouse-y),
    rgba(214, 58, 26, 0.22) 0%,
    rgba(214, 58, 26, 0.08) 35%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 500ms ease;
  z-index: 0;
}
.hero.is-warm::before { opacity: 1; }
.hero .container { position: relative; z-index: 1; } /* keep content above the warmth */
@media (hover: none) {
  .hero::before { display: none; } /* skip on touch devices */
}

/* ---------- Case study hero image ---------- */
.case-image {
  grid-column: 1 / -1;
  margin: calc(-1 * clamp(28px, 3vw, 44px)) calc(-1 * clamp(28px, 3vw, 44px)) clamp(20px, 2.5vw, 32px);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-peach);
}
.case-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

/* ---------- Case study live-site link ---------- */
.case-link {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  font-weight: 500;
}
.case-link a {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap var(--t-fast), color var(--t-fast);
}
.case-link a:hover { color: var(--accent-2); gap: 12px; }
.case-link a .arrow { transition: transform var(--t-fast); }
.case-link a:hover .arrow { transform: translateX(2px); }

/* ---------- Team photos (placeholder until real images are added) ---------- */
.team-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, var(--mauve) 0%, var(--ink) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-cream);
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  margin-bottom: 18px;
  overflow: hidden;
}
.team-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Optional: cycle gradients for visual variety on the placeholders */
.team-photo[data-tone="2"] { background: linear-gradient(135deg, var(--ink) 0%, var(--accent-2) 100%); }
.team-photo[data-tone="3"] { background: linear-gradient(135deg, var(--accent) 0%, var(--mauve) 100%); }
.team-photo[data-tone="4"] { background: linear-gradient(135deg, var(--mauve) 0%, var(--accent) 100%); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
