/* =========================================================
   MUAHAHA CREATIVE STUDIO — shared styles
   Bold, bright, work-forward. Brand palette + Bricolage display.
   ========================================================= */

:root {
  --paper:      #FFFFFD;
  --surface:    #F4F2EC;   /* card / section tint on white */
  --ink:        #211F1F;
  --ink-soft:   #6f6863;
  --line:       #E5E1D8;
  --accent:     #FE3328;
  --accent-deep:#D92518;

  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1200px;
  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.08rem);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { position: relative; padding-block: clamp(2.5rem, 5.5vw, 4.5rem); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 0.98; letter-spacing: -0.025em; margin: 0; }
.display { font-size: clamp(2.9rem, 8.5vw, 7rem); }
.eyebrow {
  font-family: var(--font-body); font-size: 0.74rem; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 700; color: var(--accent-deep); margin: 0 0 1.3rem;
}
.lede { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); line-height: 1.4; max-width: 40ch; font-weight: 500; }
.muted { color: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6ch;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  text-decoration: none; padding: 0.9rem 1.6rem; border-radius: 100px;
  background: var(--accent); color: #fff; border: 2px solid var(--accent);
  transition: background .2s, transform .2s, border-color .2s;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-2px); }
.btn::after { content: "→"; transition: transform .2s; }
.btn:hover::after { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 34px; width: auto; aspect-ratio: 1802 / 1072; display: block; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.2rem); }
.nav a { text-decoration: none; font-size: 0.95rem; font-weight: 600; color: var(--ink); padding-block: 0.4rem; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); transition: width .26s ease; }
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }
.nav a[aria-current="page"] { color: var(--accent-deep); }
.nav .btn { padding: 0.55rem 1.15rem; font-size: 0.95rem; }
.nav .btn::after { content: none; }

.nav-toggle { display: none; }
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin-right: -8px; }
  .nav-toggle span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .nav { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 0.5rem var(--gut) 1.5rem;
    transform: translateY(-130%); transition: transform .34s cubic-bezier(.4,0,.2,1); }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav a { width: 100%; padding-block: 0.95rem; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 1rem; width: 100%; justify-content: center; padding: 0.9rem; }
}

/* ---------- hero ---------- */
.hero { padding-top: clamp(2rem, 4.5vw, 3.25rem); }
.hero .display { max-width: 15ch; }
.hero .display .accent { color: var(--accent); }
.hero-statement { margin-top: clamp(1.6rem, 4vw, 2.4rem); max-width: 48ch; }
.hero-cta { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(16px); }
.is-in .reveal { animation: rise .7s cubic-bezier(.2,.7,.3,1) forwards; }
.is-in .reveal:nth-child(2){animation-delay:.07s}.is-in .reveal:nth-child(3){animation-delay:.14s}.is-in .reveal:nth-child(4){animation-delay:.21s}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- services as cards ---------- */
.services { border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
.svc-cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .svc-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .svc-cards { grid-template-columns: repeat(3, 1fr); } }
.svc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.4rem; transition: transform .25s, border-color .25s, background .25s;
}
.svc-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.svc-card .num { font-family: var(--font-body); font-weight: 700; font-size: 0.78rem; color: var(--accent-deep); letter-spacing: 0.08em; }
.svc-card h3 { font-size: 1.4rem; margin: 0.4rem 0 0.6rem; }
.svc-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }

/* ---------- featured (4-up, portrait) ---------- */
.feat-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .feat-grid { grid-template-columns: repeat(4, 1fr); } }
.feat-card { text-decoration: none; color: inherit; display: block; }
.feat-card .frame { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); aspect-ratio: 3 / 4; }
.feat-card .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.feat-card:hover .frame img { transform: scale(1.04); }
.feat-meta { margin-top: 0.8rem; display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.feat-meta h3 { font-size: 1.2rem; }
.feat-meta .yr { font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; color: var(--accent-deep); }

/* ---------- projects (full, editorial 2-up) ---------- */
.work-grid { display: grid; gap: clamp(2rem, 5vw, 3.4rem); grid-template-columns: 1fr; }
@media (min-width: 760px) { .work-grid { grid-template-columns: 1fr 1fr; } }
.work-card { text-decoration: none; color: inherit; display: block; }
.work-card .frame { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.work-card .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.work-card:hover .frame img { transform: scale(1.035); }
.work-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1.1rem; gap: 1rem; }
.work-meta h3 { font-size: 1.6rem; }
.work-meta .yr { font-family: var(--font-body); font-size: 0.82rem; letter-spacing: 0.06em; color: var(--accent-deep); white-space: nowrap; font-weight: 700; }
.work-card p { margin: 0.5rem 0 0.8rem; color: var(--ink-soft); max-width: 50ch; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; list-style: none; margin: 0; padding: 0; }
.tags li { font-size: 0.72rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 100px; padding: 0.22rem 0.7rem; font-weight: 600; }
.ext { display: inline-flex; align-items: center; gap: 0.4ch; margin-top: 0.9rem; font-weight: 700; font-size: 0.92rem; color: var(--accent-deep); text-decoration: none; }
.ext::after { content: "↗"; }
.ext:hover { text-decoration: underline; text-underline-offset: 3px; }
.work-card.is-text .frame { display: flex; align-items: flex-end; padding: 1.6rem; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.work-card.is-text .frame .kicker { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1.05; }
.work-card.is-text .frame::after { display: none; }

/* ---------- about ---------- */
.prose { max-width: 60ch; }
.prose p { margin: 0 0 1.3rem; }
.prose p:first-of-type { font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem); line-height: 1.4; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.about-grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); grid-template-columns: 1fr; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.facts { font-size: 0.95rem; }
.facts dt { font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent-deep); font-weight: 700; margin-top: 1.5rem; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0.3rem 0 0; }
.facts a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.facts a:hover { text-decoration-color: var(--accent); }

/* ---------- contact form ---------- */
.form-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 820px) { .form-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.4rem; }
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 0.8rem 0.9rem;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 140px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-status { margin-top: 1rem; font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: var(--accent-deep); }
.form-status.err { color: #b00020; }

/* ---------- CTA band ---------- */
.cta-band { border-top: 1px solid var(--line); }
.cta-band .wrap { display: flex; flex-direction: column; gap: 1.6rem; align-items: flex-start; }
.cta-band h2 { font-size: clamp(2.2rem, 6vw, 4.2rem); max-width: 16ch; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); }
.site-foot .wrap { padding-block: clamp(2.5rem, 6vw, 4rem); display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: flex-end; }
.foot-brand img { height: 38px; width: auto; aspect-ratio: 1802 / 1072; }
.foot-nav { display: flex; gap: 1.4rem; }
.foot-nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.foot-nav a:hover { color: var(--accent-deep); }
.foot-legal { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.6; flex-basis: 100%; }
.foot-legal .name { letter-spacing: 0.03em; font-weight: 600; color: var(--ink); }

/* ---------- a11y ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

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

/* =========================================================
   BRAND COLOUR THEME — red bands, white text
   Red #FE3328 · paper #FFFFFD · ink #211F1F
   ========================================================= */

/* logo (inline svg, coloured by currentColor) */
.brand .logo { height: 40px; width: auto; display: block; }
.foot-brand .logo { height: 56px; width: auto; display: block; }

/* remove divider lines — coloured bands do the separating */
.site-head { border-bottom: 1px solid rgba(255,255,253,.25); }
.services { border-top: none; }
.site-foot { border-top: none; }
.nav-toggle span { background: #FFFFFD; }

/* NAVBAR — red */
.site-head { background: var(--accent); }
.brand { color: #FFFFFD; }
.nav a { color: #FFFFFD; }
.nav a::after { background: #FFFFFD; }
.nav a[aria-current="page"] { color: #FFFFFD; }
.site-head .nav .btn { background: var(--ink); border-color: var(--ink); color: #FFFFFD; }
.site-head .nav .btn:hover { background: #000; border-color: #000; }
@media (max-width: 720px) {
  .nav { background: var(--accent); border-bottom: none; }
  .nav a { border-bottom: 1px solid rgba(255,255,253,.22); }
}

/* HERO — red on every page */
.hero { background: var(--accent); color: #FFFFFD; }
.hero .eyebrow { color: rgba(255,255,253,.85); }
.hero .display { color: #FFFFFD; }
.hero .display .accent { color: var(--ink); }
.hero .lede { color: #FFFFFD; }
.hero .btn { background: var(--ink); border-color: var(--ink); color: #FFFFFD; }
.hero .btn:hover { background: #000; border-color: #000; }
.hero .btn.ghost { background: transparent; border-color: #FFFFFD; color: #FFFFFD; }
.hero .btn.ghost:hover { background: #FFFFFD; color: var(--accent); }

/* WHAT WE DO — red cards on the white section */
.svc-card { background: var(--accent); border-color: var(--accent); color: #FFFFFD; }
.svc-card .num { color: #FFFFFD; opacity: .85; }
.svc-card h3 { color: #FFFFFD; }
.svc-card p { color: rgba(255,255,253,.85); }
.svc-card:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* kept divider: What we do ↔ Recent projects (index only) */
.divider-top { border-top: 1px solid var(--line); }

/* PROJECTS — red band */
.band-red { background: var(--accent); color: #FFFFFD; }
.band-red .work-meta h3 { color: #FFFFFD; }
.band-red .work-card p { color: rgba(255,255,253,.85); }
.band-red .work-meta .yr { color: var(--ink); }
.band-red .tags li { color: #FFFFFD; border-color: rgba(255,255,253,.5); }
.band-red .ext { color: #FFFFFD; text-decoration: underline; text-underline-offset: 3px; }
.band-red .ext:hover { color: var(--ink); }
.band-red .work-card .frame { border-color: rgba(255,255,253,.3); }
.band-red .work-card.is-text .frame { background: var(--ink); border-color: var(--ink); }

/* CTA band — dark punctuation before the red footer */
.cta-band { background: var(--ink); color: #FFFFFD; border-top: none; }
.cta-band h2 { color: #FFFFFD; }
.cta-band .btn { background: var(--accent); border-color: var(--accent); color: #FFFFFD; }
.cta-band .btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* FOOTER — red */
.site-foot { background: var(--accent); color: #FFFFFD; }
.foot-brand { color: #FFFFFD; }
.foot-nav a { color: #FFFFFD; }
.foot-nav a:hover { color: var(--ink); }
.foot-legal { color: #FFFFFD; }
.foot-legal .name { color: #FFFFFD; }
.foot-legal .copyr { opacity: .72; }


/* ===== Taller navbar + footer watermark ===== */
:root { --nav-h: 74px; }

.site-foot { position: relative; overflow: hidden; }
.site-foot .wrap { position: relative; z-index: 1; }
.foot-mark {
  position: absolute; right: -2.5rem; bottom: -4rem; z-index: 0;
  width: clamp(260px, 30vw, 480px); color: #FFFFFD; opacity: .2;
  transform: rotate(-20deg); pointer-events: none;
}
.foot-mark .mark { width: 100%; height: auto; display: block; fill: currentColor; }
@media (max-width: 600px) { .foot-mark { width: 220px; right: -1.5rem; bottom: -2.5rem; } }
