:root {
  --bg: #FBFBF9;
  --surface: #F2F1ED;
  --line: #E6E4DD;
  --ink: #141414;
  --ink-2: #3A3A38;
  --ink-3: #7A7874;
  --ink-4: #B5B3AC;
  --accent: #6B5842;
  --radius: 2px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01","ss02";
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--bg); }

/* ─── NAV ─── */
nav.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px clamp(24px, 5vw, 64px);
  background: rgba(251, 251, 249, .85);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s ease;
}
nav.top.scrolled { border-bottom-color: var(--line); }
nav.top .mark {
  font-size: 16px; font-weight: 500; letter-spacing: -.01em;
}
nav.top .mark span { color: var(--ink-3); font-weight: 300; margin-left: 4px; }
nav.top .links { display: flex; gap: 36px; align-items: center; }
nav.top .links a {
  font-size: 14px; color: var(--ink-2); transition: color .3s ease;
}
nav.top .links a:hover,
nav.top .links a.active { color: var(--ink); }
nav.top .links a.active { font-weight: 500; }
@media (max-width: 720px) {
  nav.top { padding: 20px 20px; }
  nav.top .mark span { display: none; }
  nav.top .links { gap: 20px; }
  nav.top .links a { font-size: 13px; }
}
@media (max-width: 480px) {
  nav.top { padding: 18px 18px; }
  nav.top .mark { font-size: 15px; }
  nav.top .links { gap: 16px; }
  nav.top .links a { font-size: 12px; }
}

/* ─── PAGE HEAD (about/portfolio/contact) ─── */
.page-head {
  padding: clamp(120px, 14vw, 180px) clamp(24px, 5vw, 64px) clamp(60px, 8vw, 100px);
  max-width: 1240px;
  border-bottom: 1px solid var(--line);
}
.page-head .eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 20px;
}
.page-head h1 {
  font-size: clamp(2.8rem, 6vw, 5.2rem); font-weight: 300; line-height: 1;
  letter-spacing: -.035em;
}
.page-head h1 em { font-style: normal; color: var(--ink-3); }
.page-head .sub {
  margin-top: 28px; max-width: 56ch;
  font-size: 17px; line-height: 1.6; color: var(--ink-2);
}

/* ─── FOOTER ─── */
footer {
  padding: 60px clamp(24px, 5vw, 64px) 40px;
  border-top: 1px solid var(--line);
  margin-top: clamp(80px, 10vw, 140px);
}
footer .ft-top {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px; margin-bottom: 48px; flex-wrap: wrap;
}
footer .ft-top h3 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 300;
  line-height: 1.1; letter-spacing: -.02em; max-width: 16ch;
}
footer .ft-top a.cta {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 32px; background: var(--ink); color: var(--bg);
  border-radius: 100px; font-size: 14px; font-weight: 500;
  transition: background .3s ease, gap .4s cubic-bezier(.2,1,.3,1);
}
footer .ft-top a.cta:hover { background: var(--accent); gap: 20px; }
footer .ft-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  padding-top: 40px; border-top: 1px solid var(--line);
}
@media (max-width: 768px) { footer .ft-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
footer .ft-grid .brand .name {
  font-size: 18px; font-weight: 500; margin-bottom: 8px;
}
footer .ft-grid .brand .desc {
  font-size: 13px; color: var(--ink-3); line-height: 1.6; max-width: 280px;
}
footer .ft-col h4 {
  font-size: 11px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px;
}
footer .ft-col a {
  display: block; font-size: 14px; color: var(--ink-2);
  margin-bottom: 8px; transition: color .3s ease;
}
footer .ft-col a:hover { color: var(--ink); }
footer .base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 40px; margin-top: 40px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-3);
}
footer .base a { color: var(--ink-3); transition: color .3s ease; }
footer .base a:hover { color: var(--ink); }

/* ─── PAGE ENTER ─── */
body {
  opacity: 0;
  transition: opacity .6s cubic-bezier(.2, 1, .3, 1);
}
body.loaded { opacity: 1; }

/* ─── REVEAL ─── */
.rv {
  opacity: 0; transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2, 1, .3, 1), transform .9s cubic-bezier(.2, 1, .3, 1);
}
.rv.vis { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; }
.rv-d2 { transition-delay: .16s; }
.rv-d3 { transition-delay: .24s; }
.rv-d4 { transition-delay: .32s; }
.rv-d5 { transition-delay: .4s; }

/* ─── IMAGE LOAD FADE ─── */
img[data-src],
img.fade-img {
  opacity: 0;
  transition: opacity 1s cubic-bezier(.2, 1, .3, 1);
}
img[data-src].loaded,
img.fade-img.loaded { opacity: 1; }

/* ─── A11Y ─── */
.skip {
  position: absolute; left: -9999px; top: 4px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 8px 16px; font-size: 14px;
}
.skip:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
}
