/* MADA — modern skin (soft gray canvas, white cards, floating pill nav, centered headings,
   colorful icon tiles, blur-in reveals, giant footer wordmark). Loaded last; it changes looks only,
   never the content markup the dashboard fills in. Brand blue stays the main colour. */

:root {
  --m-canvas: #f1f3f6;
  --m-card: #ffffff;
  --m-card-soft: #f7f8fa;
  --m-edge: #e4e8ee;
  --m-ink: #0f1a2c;
  --m-muted: #5c6a80;
  --m-radius: 28px;
  --m-radius-sm: 18px;
  --m-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -18px rgba(16, 24, 40, .22);
  --m-shadow-lift: 0 2px 4px rgba(16, 24, 40, .05), 0 24px 48px -22px rgba(16, 24, 40, .32);
  --m-yellow: #ffd84d;
  --m-sky: #38bdf8;
  --m-coral: #ff6b4a;
  --m-violet: #8b5cf6;
  --m-green: #22c55e;
  --paper: var(--m-canvas);
  --line: var(--m-edge);
  --muted: var(--m-muted);
  --section-surface: var(--m-canvas);
}
html[data-theme="dark"] {
  --m-canvas: #0a101b;
  --m-card: #121b2b;
  --m-card-soft: #172235;
  --m-edge: #233149;
  --m-ink: #eef3fb;
  --m-muted: #a3b2c8;
  --m-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .7);
  --m-shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 28px 56px -24px rgba(0, 0, 0, .8);
  --paper: var(--m-canvas);
  --line: var(--m-edge);
  --muted: var(--m-muted);
  --section-surface: var(--m-canvas);
}
body { background: var(--m-canvas); }

/* ---------- Floating pill navigation ---------- */
.site-header, .site-header.is-scrolled, html[data-theme="dark"] .site-header.is-scrolled {
  background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  padding-top: 14px;
}
.site-header .nav-wrap {
  height: 68px; margin-inline: auto; padding-inline: 14px 10px;
  background: color-mix(in srgb, var(--m-card) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--m-edge); border-radius: 22px; box-shadow: var(--m-shadow);
}
.site-header .desktop-nav { background: none; padding: 0; gap: 2px; }
.site-header .desktop-nav a { padding: 8px 14px; border-radius: 12px; color: var(--m-muted); }
.site-header .desktop-nav a:hover, .site-header .desktop-nav a.active { color: var(--m-ink); background: var(--m-card-soft); }
.site-header .theme-toggle, .site-header .language-toggle { background: var(--m-card-soft); border-color: var(--m-edge); }
.site-header .nav-cta { border-radius: 14px; box-shadow: 0 8px 18px -10px var(--blue); }
html { scroll-padding-top: 120px; }

/* ---------- Buttons ---------- */
.button { border-radius: 14px; box-shadow: 0 10px 22px -12px var(--blue); transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px var(--blue); }

/* ---------- Section labels become small chips ---------- */
main .eyebrow, main .section-label {
  display: inline-flex; align-items: center; gap: 8px; width: auto; padding: 5px 14px 5px 12px;
  border: 1px solid var(--m-edge); border-radius: 999px; background: var(--m-card); color: var(--blue);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05); font-weight: 700;
}
main .eyebrow::before, main .section-label::before, main .work-heading-copy > .section-label::before { content: ''; width: 7px !important; height: 7px !important; border-radius: 50% !important; flex: none !important; background: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 15%, transparent); flex: none; }
main .eyebrow > svg, main .section-label > svg { display: none; }

/* ---------- Centered headings, like the reference ---------- */
main h2 { letter-spacing: 0; color: var(--m-ink); }
.section-heading { flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-bottom: 48px; }
.section-heading > div { display: flex; flex-direction: column; align-items: center; gap: 14px; }
/* In a column, the old side-by-side flex sizes would become heights. */
.section-heading > * { flex: 0 0 auto !important; max-width: 640px; width: 100%; text-align: center; }
.work-section .work-heading-copy { text-align: center; }
.work-section .work-heading-title { justify-items: center; gap: 0; line-height: 1.35; }
.work-section .work-heading-title > .work-heading-accent { font-size: 1em; }
/* The intro reads as one quiet subtitle under the heading, not a second heading. */
.work-section .work-intro { margin-top: 4px; max-width: 520px; }
.work-section .work-intro > p { gap: 4px; margin-bottom: 28px; }
.work-section .work-intro-title { font-family: Cairo, Arial, sans-serif; font-size: 17px; font-weight: 700; line-height: 1.7; color: var(--m-muted); }
.work-section .work-intro-description { max-width: 460px; font-size: 15px; line-height: 1.8; color: var(--m-muted); opacity: .85; }
.section-heading > p { max-width: 560px; font-size: 15px; padding: 0; }

/* Blur-in reveal for headings and copy (motion.js toggles these classes). */
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-disabled) .motion-pending { filter: blur(12px); }
  html:not(.motion-disabled) .motion-shown { filter: blur(0); transition: filter .9s cubic-bezier(.2, .7, .2, 1); }
}

/* ---------- Hero: posters on a white card with colourful floating tiles ---------- */
.hero-art {
  border-radius: var(--m-radius); background: var(--m-card);
  background-image: radial-gradient(color-mix(in srgb, var(--m-ink) 9%, transparent) 1px, transparent 1px);
  background-size: 20px 20px; border: 1px solid var(--m-edge); box-shadow: var(--m-shadow-lift);
}
.hero-atmosphere .hero-float {
  border: 0; border-radius: 18px; color: #fff; opacity: 1; padding: 13px;
  box-shadow: 0 14px 28px -14px rgba(16, 24, 40, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.hero-atmosphere .hero-float svg { stroke-width: 1.8; }
.hero-atmosphere .hero-float .hero-float-accent, .hero-atmosphere .hero-float .hero-float-grid { color: inherit; opacity: .55; }
html[data-theme] .hero-atmosphere .hero-float--camera, .hero-atmosphere .hero-float--camera { background: var(--m-yellow); color: #3b2f00 !important; }
html[data-theme] .hero-atmosphere .hero-float--design, .hero-atmosphere .hero-float--design { background: var(--m-coral); }
html[data-theme] .hero-atmosphere .hero-float--edit, .hero-atmosphere .hero-float--edit { background: var(--m-sky); }
html[data-theme] .hero-atmosphere .hero-float--growth, .hero-atmosphere .hero-float--growth { background: var(--m-violet); }
/* Keep the tiles in the margins, clear of the heading and the line under the buttons. */
@media (min-width: 1241px) {
  .hero-float--design { top: 2%; right: .5%; }
  .hero-float--growth { bottom: -2%; right: .5%; }
}
html[data-theme] .hero-atmosphere :is(.hero-float--layers, .hero-float--reach), .hero-atmosphere :is(.hero-float--layers, .hero-float--reach) { background: var(--blue); }
html[data-theme] .hero-atmosphere .hero-float { border: 0; color: #fff; opacity: 1; }
html[data-theme="dark"] .hero-atmosphere .hero-float { opacity: .92; }

/* Partner strip under the hero sits on a white rounded band. */
.teacher-portraits { border-radius: var(--m-radius); }

/* ---------- Sections use the full width: some become white bands, edge to edge ---------- */
#work, #clients, #platforms { background: transparent; }
#approach, #contact, html[data-theme] .contact-section, .studios-section {
  background: var(--m-card); border-block: 1px solid var(--m-edge);
}
.approach-grid, .contact-grid, .studio-panel, html[data-theme] .studio-panel { background: transparent; border: 0; box-shadow: none; }
/* The FAQ section is itself the width-limited container: its band reaches the screen edges by a
   wide shadow clipped to its own height. */
.faq-section {
  background: var(--m-card); box-shadow: 0 0 0 100vmax var(--m-card); clip-path: inset(0 -100vmax);
  border-block: 1px solid var(--m-edge);
}

/* ---------- Services: bento cards with colourful icon tiles ---------- */
.services-grid { border: 0; gap: 18px; }
.service {
  border: 1px solid var(--m-edge) !important; border-radius: var(--m-radius); background: var(--m-card);
  box-shadow: var(--m-shadow); transition: transform .25s, box-shadow .25s;
}
.service:hover { background: var(--m-card); transform: translateY(-4px); box-shadow: var(--m-shadow-lift); }
.service-top > svg { box-sizing: content-box; width: 24px; height: 24px; padding: 12px; border-radius: 16px; color: #fff; background: var(--blue); box-shadow: 0 10px 20px -12px currentColor; }
.services-grid > .service:nth-child(6n+1) .service-top > svg { background: var(--blue); }
.services-grid > .service:nth-child(6n+2) .service-top > svg { background: var(--m-coral); }
.services-grid > .service:nth-child(6n+3) .service-top > svg { background: var(--m-violet); }
.services-grid > .service:nth-child(6n+4) .service-top > svg { background: var(--m-sky); }
.services-grid > .service:nth-child(6n+5) .service-top > svg { background: var(--m-yellow); color: #3b2f00; }
.services-grid > .service:nth-child(6n+6) .service-top > svg { background: var(--m-green); }

/* ---------- Cards across the page share the same radius, edge and shadow ---------- */
.results-board, .client-card, .platform-card, .contact-form, .package, .studio-partner-card {
  border-radius: var(--m-radius) !important; border: 1px solid var(--m-edge); box-shadow: var(--m-shadow);
}
.result-metric { border-radius: var(--m-radius-sm); }
.work-card .work-image { border-radius: 22px; box-shadow: var(--m-shadow); }
.faq-list details { border-color: var(--m-edge); }

/* ---------- Footer: a full-width white band ending in a giant wordmark ---------- */
html[data-theme] .site-footer.mada-footer, .site-footer.mada-footer {
  background: var(--m-card); border-top: 1px solid var(--m-edge); padding-bottom: 0; overflow: hidden;
}
.mada-footer::after {
  content: 'MADA'; display: block; direction: ltr; text-align: center; pointer-events: none; user-select: none;
  font: 800 clamp(96px, 25vw, 420px)/.8 Arial, Helvetica, sans-serif; letter-spacing: -.045em;
  margin: 16px 0 -0.14em;
  background: linear-gradient(180deg, var(--blue) 10%, color-mix(in srgb, var(--blue) 8%, transparent) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* The floating buttons end over the decorative wordmark, so the legal line needs no extra room. */
.mada-footer .footer-legal { border-color: var(--m-edge); padding-bottom: 20px; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .site-header { padding: 8px 10px 0; }
  .site-header .nav-wrap { width: auto; max-width: none; margin-inline: 0; height: 60px; border-radius: 18px; padding-inline: 10px 8px; gap: 8px; }
  .site-header .brand { width: 104px; flex-shrink: 1; min-width: 0; }
  .services-grid { gap: 12px; }
  .service { border-radius: 22px; }
  .section-heading { margin-bottom: 30px; }
}
