/* Brand colours, taken from the MAVI logo. Change them here to restyle the site. */
:root {
  --navy: #14274f;
  --navy-deep: #0e1c3a;
  --cream: #ece7e2;
  --muted-on-navy: #bfc3d1;
  --muted-on-cream: #4a5675;
  --serif: "Abril Fatface", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { font-family: var(--sans); line-height: 1.65; background: var(--navy); color: var(--cream); -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
#work[hidden] + #process { padding-top: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--navy-deep); border-bottom: 1px solid rgb(236 231 226 / .14); }
.bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 76px; }
.brand img { height: 46px; width: auto; }
nav { display: flex; align-items: center; gap: 32px; font-size: .95rem; }
nav a { text-decoration: none; }
nav a:hover, nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.nav-cta { border: 1px solid var(--cream); padding: 7px 18px; }
.menu-btn { display: none; background: none; border: 0; color: var(--cream); cursor: pointer; }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--cream); transform-origin: left; transform: scaleX(0); }

/* Type */
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.1; }
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); max-width: 14ch; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 40px; }
h3 { font-size: 1.1rem; margin-bottom: 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: .75rem; font-weight: 600; margin-bottom: 16px; }

/* Hero and sections */
.hero { padding: clamp(80px, 14vw, 160px) 0; background: radial-gradient(600px circle at var(--x, 80%) var(--y, 20%), rgb(236 231 226 / .11), transparent 70%); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted-on-navy); max-width: 52ch; margin: 28px 0 40px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-block; font: 600 .95rem var(--sans); text-align: center; text-decoration: none; color: var(--cream); background: none; padding: 14px 28px; border: 1px solid var(--cream); cursor: pointer; transition: background-color .2s, transform .15s; }
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--cream); color: var(--navy); }
.btn-solid:hover { background: #fff; }
.btn-line:hover { background: rgb(236 231 226 / .1); }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.light { background: var(--cream); color: var(--navy); }

.grid { display: grid; gap: 32px; list-style: none; }
.services { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.services article { border-top: 1px solid var(--navy); padding-top: 20px; }
.light p { color: var(--muted-on-cream); }
.light .eyebrow { color: var(--navy); }

/* Portfolio */
.work { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.shot { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; margin-bottom: 18px; }
div.shot { display: grid; place-items: center; border: 1px dashed rgb(236 231 226 / .45); color: var(--muted-on-navy); }
.card { min-width: 0; transition: transform .25s ease; }
.card p { color: var(--muted-on-navy); }
.dots { display: none; }

/* Process */
.steps { grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font: 3rem var(--serif); margin-bottom: 12px; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact > * { min-width: 0; }
.contact h2 { margin-bottom: 24px; }
.contact a[href^="mailto"] { overflow-wrap: anywhere; }
.copy { margin-top: 18px; }
.copy[hidden] { display: none; }
.social { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
form { display: flex; flex-direction: column; }
label { font-size: .85rem; margin-bottom: 6px; }
input, textarea { font: inherit; font-size: 1rem; color: var(--cream); background: var(--navy-deep); border: 1px solid rgb(236 231 226 / .3); border-radius: 0; padding: 12px 14px; margin-bottom: 18px; resize: vertical; }
.hint { font-size: .8rem; color: var(--muted-on-navy); margin-top: 10px; }

footer { border-top: 1px solid rgb(236 231 226 / .14); padding: 28px 0; font-size: .85rem; color: var(--muted-on-navy); }
.float-cta { display: none; }

/* Movement */
.js .reveal { opacity: 0; translate: 0 24px; transition: opacity .6s ease, translate .6s ease, transform .25s ease; }
.js .reveal.in { opacity: 1; translate: 0 0; }
@media (hover: hover) {
  .services article:hover, .card:hover, .steps li:hover { transform: translateY(-6px); }
}

/* Tablet */
@media (max-width: 860px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; }
}

/* Phone */
@media (max-width: 720px) {
  html { scroll-padding-top: 68px; }
  .bar { min-height: 68px; }
  .brand img { height: 40px; }
  .section { padding: 56px 0; }
  .hero { display: flex; align-items: center; min-height: calc(100vh - 69px); min-height: calc(100svh - 69px); padding: 48px 0; }
  .hero .wrap { width: calc(100% - 40px); }
  .actions { flex-direction: column; }
  .btn { padding: 16px 24px; }
  h2 { margin-bottom: 28px; }

  /* Menu */
  nav { width: 100%; flex-wrap: wrap; gap: 20px; padding-bottom: 16px; }
  .js .menu-btn { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; width: 48px; height: 48px; margin-right: -12px; }
  .menu-btn span { width: 24px; height: 2px; background: var(--cream); transition: transform .25s, opacity .25s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .js nav { position: absolute; top: 100%; left: 0; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding: 8px 20px 24px; max-height: calc(100vh - 70px); overflow-y: auto; background: var(--navy-deep); border-bottom: 1px solid rgb(236 231 226 / .2); visibility: hidden; opacity: 0; translate: 0 -8px; transition: opacity .2s, translate .2s, visibility .2s; }
  .js nav.open { visibility: visible; opacity: 1; translate: 0 0; }
  .js nav a { padding: 14px 0; font-size: 1.15rem; }
  .js .nav-cta { text-align: center; margin-top: 10px; }

  /* Swipeable projects */
  .work { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -20px; padding-inline: 20px; scroll-padding-inline: 20px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .work::-webkit-scrollbar { display: none; }
  .card { scroll-snap-align: start; }
  .js .dots { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
  .dots span { width: 8px; height: 8px; border-radius: 4px; background: rgb(236 231 226 / .35); transition: width .25s, background-color .25s; }
  .dots span.on { width: 24px; background: var(--cream); }

  /* Process as a compact list */
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps li { display: grid; grid-template-columns: 64px 1fr; align-content: start; }
  .steps li::before { grid-row: span 2; font-size: 2.2rem; line-height: 1; }

  .social { gap: 0 24px; margin-top: 16px; }
  .social a { padding: 10px 0; }

  /* Button that stays within thumb reach */
  .float-cta { display: block; position: fixed; z-index: 9; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); border-color: var(--navy); box-shadow: 0 8px 24px rgb(0 0 0 / .35); translate: 0 150%; visibility: hidden; transition: translate .25s, visibility .25s; }
  .float-cta.show { translate: 0 0; visibility: visible; }
  body:has(#nav.open) .float-cta { visibility: hidden; }
}

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