/* =========================================================
   base.css — shared by every page
   tokens, reset, nav, section heading, project card,
   contact block, footer, reveal-on-scroll
   ========================================================= */
:root {
  --paper: #FDFBF9;
  --navy: #0B2545;
  --ink: #16233A;
  --mute: #64738A;
  --orange: #E4572E;
  --blush: #FBEAE3;
  --line: #E6E2DB;
  --white: #FFFFFF;

  --display: 'Bricolage Grotesque', sans-serif;
  --body: 'Public Sans', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --page: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }
img { display: block; }

.page { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 28px; }
@media (max-width: 600px) { .page { padding: 0 20px; } }

/* ---------- animation helpers ---------- */
.fu { opacity: 0; transform: translateY(16px); animation: fu .6s ease-out forwards; }
@keyframes fu { to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease-out, transform .5s ease-out; }
.reveal.in { opacity: 1; transform: none; }
@keyframes float0 { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(6deg); } }
@keyframes float1 { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(6px) rotate(-7deg); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) rotate(0); } 50% { transform: translate(3px,-6px) rotate(5deg); } }

/* ---------- nav ---------- */
.nav-spacer { height: 76px; }
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center;
  background: rgba(253,251,249,0);
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease;
}
.nav.solid {
  background: rgba(253,251,249,.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-row { width: 100%; max-width: var(--page); display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--navy); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a.l { font-size: 14.5px; font-weight: 500; text-decoration: none; color: var(--ink); position: relative; padding-bottom: 3px; transition: color .2s ease; }
.nav-links a.l span { position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav-links a.l.on { color: var(--orange); }
.nav-links a.l.on span { transform: scaleX(1); }
.cta { font-weight: 600; font-size: 14px; color: #fff; background: var(--navy); padding: 9px 18px; border-radius: 100px; text-decoration: none; display: inline-block; transition: transform .2s ease; }
.cta:hover { transform: translateY(-2px); }
.nav-mobile { display: none; align-items: center; gap: 14px; }
.nav-mobile .cta { font-size: 13px; padding: 8px 14px; white-space: nowrap; }
.burger { position: relative; width: 24px; height: 18px; background: none; border: 0; cursor: pointer; padding: 0; flex-shrink: 0; }
.burger i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--navy); transition: transform .25s var(--ease), opacity .2s ease; }
.burger i:nth-child(1) { top: 0; } .burger i:nth-child(2) { top: 8px; } .burger i:nth-child(3) { top: 16px; }
.nav.open .burger i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav.open .burger i:nth-child(2) { opacity: 0; }
.nav.open .burger i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.mmenu { display: none; width: 100%; overflow: hidden; border-top: 1px solid var(--line); max-height: 0; opacity: 0; transition: max-height .25s var(--ease), opacity .25s var(--ease); }
.nav.open .mmenu { max-height: 520px; opacity: 1; }
.mmenu.instant { transition: none; }
.mmenu-in { display: flex; flex-direction: column; align-items: center; padding: 16px 24px 28px; }
.mmenu a { width: 100%; max-width: 320px; padding: 16px 0; text-align: center; font-family: var(--display); font-size: 21px; font-weight: 600; color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--line); }
.mmenu a.on { color: var(--orange); }
@media (max-width: 810px) {
  .nav-links { display: none; }
  .nav-mobile { display: flex; }
  .mmenu { display: block; }
}

/* ---------- section heading ---------- */
.sec { width: 100%; display: flex; flex-direction: column; gap: 32px; padding: 64px 0; scroll-margin-top: 90px; }
.sec-head { display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); }
.h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.015em; color: var(--navy); }

/* ---------- project card (home + other projects) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.pcard { display: flex; flex-direction: column; gap: 14px; text-decoration: none; cursor: pointer; opacity: 0; transform: translateY(14px); animation: fu .45s ease-out forwards; }
.thumb { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--blush); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.pcard:hover .thumb img { transform: scale(1.04); }
.pmeta { display: flex; flex-direction: column; gap: 6px; }
.pcat { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.ptitle { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ptitle h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.3; color: var(--navy); }
.ptitle span { flex-shrink: 0; font-size: 18px; color: var(--orange); transition: transform .25s var(--ease); }
.pcard:hover .ptitle span { transform: translate(3px, -3px); }
@media (max-width: 400px) { .grid { grid-template-columns: 1fr; } }

/* ---------- award badge (winning projects) ---------- */
.award { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 10px; border-radius: 100px; background: var(--orange); color: var(--paper); font-size: 13px; font-weight: 700; line-height: 1.2; letter-spacing: .01em; box-shadow: 0 6px 18px rgba(228,87,46,.28); }
.award svg { width: 16px; height: 16px; flex-shrink: 0; }
.thumb .award { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--navy); box-shadow: 0 6px 18px rgba(11,37,69,.3); }
.thumb .award svg { color: #FFB59E; }
.award.full { align-self: flex-start; font-size: 13.5px; }

/* ---------- contact ---------- */
.contact { position: relative; width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; padding: 56px; margin: 16px 0; border-radius: 24px; background: var(--orange); overflow: hidden; scroll-margin-top: 90px; }
.scribs { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.scrib { position: absolute; color: var(--paper); line-height: 1; }
.scrib svg { width: 100%; height: 100%; display: block; }
.c-left { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; max-width: 480px; }
.c-left .eyebrow { color: rgba(253,251,249,.75); }
.c-left h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.15; letter-spacing: -.015em; color: var(--paper); }
.c-links { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.c-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 4px; border-bottom: 1px solid rgba(253,251,249,.28); text-decoration: none; font-size: 16px; font-weight: 500; color: var(--paper); transition: opacity .2s ease; }
.c-links a:hover { opacity: .7; }
.c-links a span { font-size: 14px; }
@media (max-width: 600px) { .contact { padding: 36px 28px; } }

/* ---------- footer ---------- */
.site-footer { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0 40px; border-top: 1px solid var(--line); }
.site-footer .copy { font-size: 13px; color: var(--mute); }
.site-footer .fl { display: flex; align-items: center; gap: 18px; }
.site-footer .fl a { font-size: 13px; font-weight: 500; color: var(--mute); text-decoration: none; }
.site-footer .fl a.top { color: var(--navy); }

/* ---------- load error ---------- */
.load-error { margin: 40px 0; padding: 20px; border-radius: 14px; background: var(--blush); color: var(--navy); font-size: 15px; line-height: 1.6; }
.load-error code { font-family: var(--mono); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fu, .pcard { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scrib { animation: none !important; }
}
