/*
 * Mafos Design — styles.
 * Brand colours, fonts and spacing are tokens at the top: change them here once.
 */

:root {
  --brand-yellow: #ffd54f;
  --brand-brown: #7a3e00;
  --brand-cream: #fff6dc;

  --bg: #fffcf4;
  --surface: #ffffff;
  --surface-alt: #fff4d6;
  --ink: #26150a;
  --muted: #6f5a48;
  --line: #ecdfc6;
  --line-strong: #9a8570;
  --accent: var(--brand-brown);
  --on-accent: var(--brand-cream);
  --focus: #1d4ed8;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-space: clamp(56px, 9vw, 112px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #150d06;
    --surface: #20150c;
    --surface-alt: #1c120a;
    --ink: #f6ead6;
    --muted: #c2ab92;
    --line: #3a2919;
    --line-strong: #7d6750;
    --accent: var(--brand-yellow);
    --on-accent: #2a1608;
    --focus: #93c5fd;
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p,
figure {
  margin: 0;
}

[hidden] {
  display: none !important;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 15px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

/* On yellow surfaces */
.btn-dark {
  background: var(--brand-brown);
  color: var(--brand-yellow);
}

/* On brown surfaces */
.btn-light {
  background: var(--brand-yellow);
  color: var(--brand-brown);
}

.btn-ghost {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-right: auto;
  color: var(--accent);
  line-height: 1;
  text-decoration: none;
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-sub {
  margin-top: 5px;
  padding-left: 0.45em;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.45em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.lang-switch button {
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 12px/1 var(--font);
  letter-spacing: 0.06em;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

.menu-toggle {
  display: none;
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 42px;
    height: 42px;
    padding: 0 11px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.2s ease;
  }

  .menu-open .menu-toggle span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-open .menu-toggle span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 4px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .menu-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 17px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 10vw, 128px) 0 clamp(56px, 9vw, 112px);
  background: var(--brand-yellow);
  color: var(--brand-brown);
}

.hero-inner {
  position: relative;
}

.hero-mark {
  position: absolute;
  right: -0.06em;
  bottom: -0.2em;
  font-size: clamp(120px, 24vw, 340px);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

.hero-title {
  max-width: 17ch;
  margin: 18px 0 24px;
  font-size: clamp(36px, 6.4vw, 84px);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-text {
  max-width: 52ch;
  font-size: clamp(17px, 1.6vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--section-space) 0;
}

.section-alt {
  background: var(--surface-alt);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: 28px;
}

.section-head h2,
.about h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  font-stretch: 112%;
}

.section-head p {
  max-width: 46ch;
  color: var(--muted);
}

/* ---------- Work: filters + grid ---------- */
.filters {
  display: flex;
  gap: 8px;
  margin: 0 calc(var(--gutter) * -1) 28px;
  padding: 2px var(--gutter) 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 500 15px/1 var(--font);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  border-color: var(--muted);
}

.chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.chip-count {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}

.card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  padding: 14px 2px 0;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.card-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--brand-cream);
  color: var(--brand-brown);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty {
  padding: 40px 0;
  color: var(--muted);
}

/* ---------- Packages ---------- */
.packages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 20px;
}

.package {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.package h3 {
  font-size: 22px;
  font-weight: 800;
  font-stretch: 112%;
}

.package-for {
  color: var(--muted);
  font-size: 15px;
}

.package ul {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  font-size: 15px;
  list-style: none;
}

.package li {
  position: relative;
  padding-left: 22px;
}

.package li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-yellow);
  box-shadow: inset 0 0 0 2px var(--brand-brown);
}

.package-price {
  margin-top: auto;
  padding-top: 12px;
  font-size: 20px;
  font-weight: 700;
}

.package .btn {
  align-self: flex-start;
}

.package.is-highlight {
  border-color: var(--brand-brown);
  background: var(--brand-brown);
  color: var(--brand-cream);
}

.package.is-highlight .package-for {
  color: rgba(255, 246, 220, 0.78);
}

.package-flag {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--brand-brown);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- About ---------- */
.about {
  display: grid;
  gap: 28px;
}

.about-text {
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.5;
}

.service-list {
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.service-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.service-list strong {
  font-size: 18px;
  font-weight: 600;
}

.service-list span {
  grid-column: 1;
  color: var(--muted);
  font-size: 15px;
}

.service-list a::after {
  content: "→";
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--accent);
  transition: transform 0.15s ease;
}

.service-list a:hover::after {
  transform: translateX(4px);
}

@media (min-width: 900px) {
  .about {
    grid-template-columns: 1fr 1.5fr;
    gap: 64px;
  }
}

/* ---------- Contact ---------- */
.contact {
  padding: var(--section-space) 0;
  background: var(--brand-brown);
  color: var(--brand-cream);
}

.contact h2 {
  max-width: 14ch;
  font-size: clamp(34px, 6vw, 76px);
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -0.02em;
}

.contact-text {
  margin-top: 16px;
  font-size: 18px;
  opacity: 0.85;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.contact-meta {
  margin-top: 28px;
  font-size: 15px;
  opacity: 0.75;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

/* ---------- Project page ---------- */
.project {
  padding: clamp(28px, 5vw, 56px) 0 var(--section-space);
}

.back-link {
  display: inline-flex;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

.project-head {
  max-width: 820px;
  margin: 28px 0 clamp(28px, 4vw, 48px);
}

.project-head .eyebrow {
  color: var(--accent);
}

.project-title {
  margin-top: 12px;
  font-size: clamp(32px, 5.4vw, 64px);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.project-summary {
  margin-top: 20px;
  font-size: clamp(18px, 1.8vw, 21px);
}

.project-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  margin: 28px 0 0;
}

.project-facts dt {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-facts dd {
  margin: 4px 0 0;
  font-weight: 600;
}

.sample-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

/* One column, in order, like a presentation: each image as large as the screen allows. */
.project-gallery {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}

.project-gallery img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.zoom {
  display: block;
  width: min(100%, calc(88vh * var(--ratio, 0.8)));
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: none;
  cursor: zoom-in;
}

.embed {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Full-screen image viewer ---------- */
html.lightbox-open {
  overflow: hidden;
}

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(21, 13, 6, 0.96);
  color: var(--brand-cream);
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgba(21, 13, 6, 0.96);
}

.lightbox-image {
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 128px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 246, 220, 0.45);
  border-radius: 999px;
  background: rgba(255, 246, 220, 0.12);
  color: var(--brand-cream);
  font: 500 22px/1 var(--font);
  cursor: pointer;
}

.lightbox-btn:hover {
  background: rgba(255, 246, 220, 0.24);
}

.lightbox-close {
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: max(16px, env(safe-area-inset-left, 0px));
}

.lightbox-next {
  right: max(16px, env(safe-area-inset-right, 0px));
}

.lightbox-count {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.lightbox.is-single .lightbox-prev,
.lightbox.is-single .lightbox-next,
.lightbox.is-single .lightbox-count {
  display: none;
}

@media (max-width: 560px) {
  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    transform: none;
  }

  .lightbox-image {
    max-height: calc(100vh - 160px);
  }
}

.project-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(28px, 5vw, 56px);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--brand-yellow);
  color: var(--brand-brown);
}

.project-cta h2 {
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 800;
  font-stretch: 112%;
}

.next-project {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.next-project span {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.next-project strong {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  font-stretch: 112%;
}

.not-found {
  display: grid;
  justify-items: start;
  gap: 28px;
  padding: 48px 0;
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-meta {
    font-size: 13px;
  }

  .badge {
    top: 8px;
    left: 8px;
    font-size: 10px;
  }

  .hero-actions .btn,
  .contact-actions .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
