/* ============================================================
   Multiplae — agency styles
   Aesthetic: bold dark editorial + electric violet→coral gradient.
   Order: tokens → base → layout → nav → hero → components → sections → footer → utils.
   Brand colors live in the :root tokens below.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Palette — dark is default */
  --bg:         #0b0b12;
  --bg-alt:     #12121c;
  --surface:    #17172a;
  --surface-2:  #1e1e33;
  --border:     #272740;
  --text:       #f3f2fb;
  --text-dim:   #a2a1bd;

  /* Brand — the multiply gradient */
  --brand:      #7c5cfc;   /* electric violet (primary) */
  --brand-2:    #ff4d6d;   /* hot coral (secondary)   */
  --brand-ink:  #0b0b12;   /* text on bright fills     */
  --grad:       linear-gradient(120deg, #7c5cfc 0%, #b14be0 45%, #ff4d6d 100%);
  --brand-soft: rgba(124, 92, 252, 0.14);

  /* Type */
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --maxw: 1140px;
  --pad: clamp(1.1rem, 4vw, 2rem);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
  --shadow-brand: 0 20px 45px -22px rgba(124, 92, 252, 0.55);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme */
[data-theme="light"] {
  --bg:         #ffffff;
  --bg-alt:     #f5f3fc;
  --surface:    #ffffff;
  --surface-2:  #f8f6ff;
  --border:     #e7e3f5;
  --text:       #14131f;
  --text-dim:   #575569;
  --brand:      #6a45f5;
  --brand-2:    #f0356a;
  --brand-ink:  #ffffff;
  --brand-soft: rgba(106, 69, 245, 0.10);
  --shadow: 0 24px 55px -32px rgba(40, 30, 80, 0.4);
  --shadow-brand: 0 20px 45px -24px rgba(106, 69, 245, 0.4);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  margin: 0 0 0.4em;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-lead { color: var(--text-dim); font-size: 1.05rem; }
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 0.7rem;
}
.section h2 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); }

.accent-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.x-glyph { color: var(--brand-2); font-weight: 800; }

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 999;
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.9rem; }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 26px 55px -20px rgba(124, 92, 252, 0.7); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--brand);
  font-weight: 600;
  font-family: var(--font-display);
}
.text-link span { transition: transform var(--transition); }
.text-link:hover span { transform: translateX(4px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.site-header.scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: var(--shadow-brand);
}
.brand-mark .x { font-size: 0.8em; opacity: 0.9; margin-left: 1px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }

.nav-menu { display: flex; align-items: center; gap: 1.4rem; }
.nav-menu > li > a:not(.btn) {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-menu > li > a:not(.btn):hover { color: var(--text); }

.nav-toggle { display: none; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 13vw, 9rem) 0 clamp(4rem, 8vw, 6rem);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}
.blob-a { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; top: -12%; left: -8%; background: var(--brand); }
.blob-b { width: 40vw; height: 40vw; max-width: 540px; max-height: 540px; bottom: -18%; right: -8%; background: var(--brand-2); opacity: 0.4; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
}

.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.hero-eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  color: var(--brand);
  font-weight: 600;
  margin: 0 0 1rem;
}
.hero-title { font-size: clamp(2.3rem, 7vw, 4.4rem); margin-bottom: 1.1rem; }
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--text-dim); max-width: 60ch; }
.hero-sub em { color: var(--text); font-style: normal; font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin: 2rem 0 2.75rem; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; }
.hero-stats span { color: var(--text-dim); font-size: 0.9rem; }

.scroll-cue {
  position: absolute;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--border);
  border-radius: 14px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%;
  width: 4px; height: 8px; margin-left: -2px;
  background: var(--brand);
  border-radius: 2px;
  animation: scrollcue 1.6s ease-in-out infinite;
}
@keyframes scrollcue { 0%,100% { opacity: 0; transform: translateY(0); } 50% { opacity: 1; transform: translateY(8px); } }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.25rem;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.service-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: var(--shadow); }
.service-icon {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--brand-soft);
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
}
.service-card h3 { font-size: 1.2rem; }
.service-card p { color: var(--text-dim); font-size: 0.96rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; }
.tags li {
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 500;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ---------- Approach ---------- */
.approach-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.approach-body h2 .x-glyph { margin: 0 0.15em; }
.approach-body > p { color: var(--text-dim); }
.approach-points { margin: 1.5rem 0; display: grid; gap: 0.9rem; }
.approach-points li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-dim);
}
.approach-points li::before {
  content: "×";
  position: absolute; left: 0; top: -1px;
  color: var(--brand-2);
  font-weight: 800;
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.approach-points strong { color: var(--text); }

.approach-visual {
  display: grid;
  gap: 1rem;
  place-items: center;
  text-align: center;
}
.multiply-card {
  width: 100%;
  max-width: 320px;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  gap: 0.35rem;
  justify-items: center;
}
.card-digital { box-shadow: 0 16px 40px -28px rgba(124, 92, 252, 0.6); }
.card-ooh { box-shadow: 0 16px 40px -28px rgba(255, 77, 109, 0.5); }
.mc-emoji { font-size: 2rem; }
.mc-label { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.mc-note { color: var(--text-dim); font-size: 0.85rem; }
.multiply-op { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; color: var(--brand-2); }
.multiply-result {
  width: 100%;
  max-width: 320px;
  padding: 1.3rem;
  border-radius: var(--radius);
  background: var(--grad);
  color: #fff;
  display: grid; gap: 0.3rem; justify-items: center;
  box-shadow: var(--shadow-brand);
}
.multiply-result .mc-label { color: #fff; }

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}
.work-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.work-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.work-card:hover::before { transform: scaleX(1); }
.work-category { font-family: var(--font-display); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 0.75rem; }
.work-result {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 0.6rem;
}
.work-card h3 { font-size: 1.1rem; }
.work-blurb { color: var(--text-dim); font-size: 0.93rem; margin: 0; }

/* ---------- Process ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  counter-reset: step;
}
.process-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.process-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block;
  margin-bottom: 0.6rem;
}
.process-step h3 { font-size: 1.15rem; }
.process-step p { color: var(--text-dim); font-size: 0.93rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-intro > p { color: var(--text-dim); }
.contact-list { margin-top: 1.5rem; display: grid; gap: 0.75rem; }
.contact-list li { display: flex; align-items: center; gap: 0.65rem; }
.contact-list a:hover { color: var(--brand); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: grid;
  gap: 1.1rem;
}
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.88rem; font-weight: 600; font-family: var(--font-display); }
.field .opt { color: var(--text-dim); font-weight: 400; }
.field input, .field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.field textarea { resize: vertical; }
.contact-form .btn { justify-self: start; }
.form-note { margin: 0; font-size: 0.9rem; color: var(--text-dim); min-height: 1.2em; }
.form-note.error { color: var(--brand-2); }
.form-note.success { color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}
.footer-brand .brand-mark { margin-bottom: 0.8rem; }
.footer-tag { color: var(--text-dim); max-width: 30ch; margin: 0; }
.footer-links, .footer-social { display: grid; gap: 0.6rem; align-content: start; }
.footer-links a, .footer-social a { color: var(--text-dim); transition: color var(--transition); }
.footer-links a:hover, .footer-social a:hover { color: var(--brand); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.88rem;
}
.footer-bottom p { margin: 0; }
.back-to-top { color: var(--text-dim); transition: color var(--transition); }
.back-to-top:hover { color: var(--brand); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .approach-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
  }
  .nav-toggle-bar { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-menu {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem var(--pad) 1.5rem;
    transform: translateY(-140%);
    transition: transform var(--transition);
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu > li > a:not(.btn) { display: block; padding: 0.65rem 0; font-size: 1.05rem; }
  .nav-cta { width: 100%; margin-top: 0.5rem; }
  .theme-toggle { justify-self: start; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.6rem; text-align: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
