/* =============================================
   BUGZ VISUALS — Design System
   Off-white / Charcoal / Terracotta
   Syne (display) + DM Sans (body)
   ============================================= */

/* ---- 0. CUSTOM PROPERTIES ---- */
:root {
  --bg:        #F7F3EC;
  --bg-alt:    #EDE8DF;
  --fg:        #1A1917;
  --accent:    #C4714A;
  --muted:     #9E9891;
  --border:    #E0D8CC;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Fluid type */
  --fs-xs:   clamp(0.7rem,   0.9vw,  0.8125rem);
  --fs-sm:   clamp(0.8125rem,1.05vw, 0.9375rem);
  --fs-base: clamp(1rem,     1.2vw,  1.125rem);
  --fs-md:   clamp(1.125rem, 1.6vw,  1.375rem);
  --fs-lg:   clamp(1.5rem,   2.5vw,  2.25rem);
  --fs-xl:   clamp(2rem,     4vw,    3.5rem);
  --fs-2xl:  clamp(2.75rem,  5.5vw,  5rem);
  --fs-hero: clamp(2.75rem,  11.5vw, 12rem);

  /* Spacing */
  --sp-xs:  clamp(0.5rem,  1vw,   0.75rem);
  --sp-sm:  clamp(0.75rem, 1.5vw, 1rem);
  --sp-md:  clamp(1rem,    2vw,   1.5rem);
  --sp-lg:  clamp(1.5rem,  3vw,   2.5rem);
  --sp-xl:  clamp(2.5rem,  5vw,   4.5rem);
  --sp-2xl: clamp(4rem,    8vw,   7rem);
  --sp-3xl: clamp(6rem,    12vw,  10rem);

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --gap:    clamp(0.75rem, 2vw,  1.5rem);
  --max-w:  1400px;

  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}


/* ---- 0b. PAGE LOADER + VIEW TRANSITIONS ---- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fg);
}
.loader__mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
  color: var(--bg);
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.5s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }
  ::view-transition-old(root) { animation-name: bv-fade-out; }
  ::view-transition-new(root) { animation-name: bv-fade-in; }

  /* Content-aware transitions: a clicked project's card image + title morph
     directly into the case-study hero (view-transition-name set per-project
     in index.ejs / project.ejs), instead of the whole page just cross-fading. */
  ::view-transition-group(*) {
    animation-duration: 0.55s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }
}
@keyframes bv-fade-out { to { opacity: 0; } }
@keyframes bv-fade-in { from { opacity: 0; } }


/* ---- 1. RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; overflow-x: hidden; } /* Lenis handles smooth scroll */
body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; }


/* ---- 2. LAYOUT UTILITIES ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-md);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.tag-mono {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: var(--sp-xs);
}
.tag-mono--on-dark { color: rgba(247,243,236,0.4); }


/* ---- 3. TEXT REVEAL HELPERS ---- */
.reveal-line {
  display: block;
  overflow: hidden;
  line-height: 0.92;
}
.reveal-inner {
  display: block;
  transform: translateY(110%);
}
.reveal-fade {
  opacity: 0;
  transform: translateY(12px);
}


/* ---- 4. CUSTOM CURSOR ---- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
  transition: width 0.3s var(--ease-out),
              height 0.3s var(--ease-out),
              background 0.3s;
}
.cursor--hover {
  width: 40px;
  height: 40px;
  background: var(--fg);
  mix-blend-mode: normal;
  opacity: 0.12;
}
@media (pointer: coarse) { .cursor { display: none; } }


/* ---- 5. NAV ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--gutter);
  transition: background 0.4s, box-shadow 0.4s;
}
.nav--scrolled {
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
}
.nav__link {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--fg);
  transition: width 0.3s var(--ease-out);
}
.nav__link:hover { color: var(--fg); }
.nav__link:hover::after { width: 100%; }
.nav__cta {
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--fg);
  border-radius: 2rem;
  transition: background 0.25s, color 0.25s;
}
.nav__cta:hover {
  background: var(--fg);
  color: var(--bg);
}

@media (max-width: 640px) {
  .nav__links { gap: var(--sp-md); }
  .nav__link { display: none; }
}

/* NAV TOGGLE (hamburger, mobile only) */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  padding: 0;
  z-index: 201;
}
.nav__toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--fg);
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 640px) {
  .nav__toggle { display: flex; }
}

/* MOBILE MENU PANEL */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--sp-lg);
  padding: var(--sp-2xl) var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
.nav-mobile.is-open {
  opacity: 1;
  visibility: visible;
}
.nav-mobile__link {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
}

@media (max-width: 640px) {
  .nav-mobile { display: flex; }
}


/* ---- 6. HERO ---- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-2xl) var(--gutter) var(--sp-xl);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -15%;
  right: -12%;
  width: min(60vw, 700px);
  height: min(60vw, 700px);
  background: radial-gradient(circle, rgba(196,113,74,0.16) 0%, rgba(196,113,74,0) 70%);
  pointer-events: none;
  z-index: 0;
}
.hero__particles {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__tag {
  position: absolute;
  top: var(--sp-xl);
  right: var(--gutter);
  z-index: 1;
  margin-bottom: 0;
}
@media (max-width: 640px) {
  .hero__tag { top: 4.75rem; }
}
.hero__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  width: 100%;
  position: relative;
  z-index: 1;
  padding-right: clamp(1.5rem, 4vw, 3.5rem);
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--fg);
  margin-bottom: var(--sp-xl);
}
.hero__title .reveal-line { line-height: 1.05; }
.hero__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: var(--sp-md);
}
.hero__tagline {
  font-size: var(--fs-md);
  font-weight: 300;
  color: var(--fg);
  max-width: 28ch;
}
.hero__location {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.hero__scroll {
  position: absolute;
  bottom: var(--sp-xl);
  right: var(--gutter);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1px;
  height: 3rem;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scroll-line 2s ease-in-out infinite;
  animation-delay: 1.5s;
}
@keyframes scroll-line {
  0%   { top: -100%; }
  50%  { top: 0%; }
  100% { top: 100%; }
}


/* ---- 7. MARQUEE ---- */
.marquee {
  background: var(--fg);
  color: var(--bg);
  overflow: hidden;
  padding: var(--sp-sm) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  white-space: nowrap;
  animation: marquee-scroll 28s linear infinite;
  width: max-content;
}
.marquee__item {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.marquee__sep {
  color: var(--accent);
  font-size: 1.2em;
  flex-shrink: 0;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}
.marquee--reverse .marquee__track {
  animation-direction: reverse;
}


/* ---- 8. WORK ---- */
.work {
  padding-block: var(--sp-3xl);
}
.work__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
  flex-wrap: wrap;
}
.work__header-left { display: flex; flex-direction: column; }
.work__header-cta {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--muted);
  transition: color 0.2s;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  align-self: flex-end;
}
.work__header-cta:hover { color: var(--fg); border-color: var(--fg); }

/* WORK CARD (shared base: scroll-reveal state) */
.work-card {
  min-width: 0;
  opacity: 0;
  transform: translateY(40px);
}

/* FEATURED (top 4) */
.work__featured {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  margin-bottom: var(--sp-2xl);
}
@media (max-width: 1100px) {
  .work__featured { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .work__featured { grid-template-columns: 1fr; }
}
.work-feature__overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}
.work-feature__title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(247,243,236,0.95);
}
.work-feature__tagline {
  font-size: var(--fs-xs);
  color: rgba(247,243,236,0.65);
  letter-spacing: 0.02em;
}

/* MORE WORK (compact list) */
.work-more {
  border-top: 1px solid var(--border);
}
.work-more__item {
  border-bottom: 1px solid var(--border);
}
.work-more__link {
  display: grid;
  grid-template-columns: 2.5rem 3.5rem 1fr auto auto;
  align-items: center;
  gap: var(--sp-md);
  padding-block: var(--sp-sm);
  transition: padding 0.3s var(--ease-out);
}
.work-more__item:hover .work-more__link { padding-left: var(--sp-sm); }
.work-more__index { margin-bottom: 0; }
.work-more__thumb {
  display: block;
  width: 3.5rem;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-alt);
}
.work-more__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.work-more__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.work-more__title {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-more__tagline {
  font-size: var(--fs-xs);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-more__category {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.work-more__arrow {
  font-size: var(--fs-lg);
  color: var(--border);
  transition: color 0.3s, transform 0.3s var(--ease-out);
  flex-shrink: 0;
}
.work-more__item:hover .work-more__arrow {
  color: var(--accent);
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .work-more__link { grid-template-columns: 3rem 1fr auto; }
  .work-more__index, .work-more__category { display: none; }
}

/* SHARED CARD IMAGE (used by featured cards) */
.work-card__link {
  display: block;
  transition: none;
}
.work-card__image-wrap {
  overflow: hidden;
  border-radius: 4px;
}
.work-card__placeholder {
  background-color: var(--card-accent, var(--bg-alt));
  aspect-ratio: 4 / 5;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: var(--sp-md);
  transition: transform 0.7s var(--ease-out);
}
.work-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: card-pan 18s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.work-card__image.is-loaded {
  opacity: 1;
}
.work-card__image.is-in-view {
  animation-play-state: running;
}
@keyframes card-pan {
  0%, 20%  { object-position: top center; }
  80%, 100% { object-position: bottom center; }
}
.work-card__link:hover .work-card__image {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .work-card__image { animation: none; }
}
.work-card__placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,25,23,0.35) 0%, transparent 55%);
  pointer-events: none;
}
.work-card__link:hover .work-card__placeholder {
  transform: scale(1.015);
}

.tag {
  font-size: var(--fs-xs);
  font-weight: 400;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---- 9. ABOUT ---- */
.about {
  padding-block: var(--sp-3xl);
  background: var(--fg);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.about::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -8%;
  width: min(50vw, 620px);
  height: min(50vw, 620px);
  background: radial-gradient(circle, rgba(196,113,74,0.14) 0%, rgba(196,113,74,0) 70%);
  pointer-events: none;
  z-index: 0;
}
.about .container { position: relative; z-index: 1; }
.about .section-label { color: rgba(247,243,236,0.4); }
.about__heading {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.95;
  margin-bottom: var(--sp-lg);
}
.about__body p {
  color: rgba(247,243,236,0.7);
  margin-bottom: var(--sp-md);
  font-size: var(--fs-base);
  max-width: 52ch;
}
.about__body p:last-child { margin-bottom: 0; }
.about__stats {
  display: flex;
  gap: var(--sp-xl);
  margin-top: var(--sp-xl);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--border);
}
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bg);
  line-height: 1;
}
.stat__label {
  display: block;
  font-size: var(--fs-xs);
  color: rgba(247,243,236,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}


/* ---- 10. SERVICES ---- */
.services {
  padding-block: var(--sp-3xl);
}
.services__header {
  margin-bottom: var(--sp-xl);
}
.services__list {
  border-top: 1px solid var(--border);
}
.service-item {
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(20px);
}
.service-item__inner {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: var(--sp-lg);
  align-items: center;
  padding: var(--sp-xl) 0;
  transition: padding 0.3s var(--ease-out);
  cursor: default;
}
.service-item:hover .service-item__inner {
  padding-left: var(--sp-sm);
}
.service-num {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.service-content h3 {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-xs);
  line-height: 1.2;
}
.service-content p {
  font-size: var(--fs-sm);
  color: var(--muted);
  max-width: 52ch;
}
.service-arrow {
  font-size: var(--fs-lg);
  color: var(--border);
  transition: color 0.3s, transform 0.3s var(--ease-out);
  flex-shrink: 0;
}
.service-item:hover .service-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .service-item__inner {
    grid-template-columns: 2.5rem 1fr;
    gap: var(--sp-md);
  }
  .service-arrow { display: none; }
}


/* ---- PROCESS ---- */
.process {
  padding-block: var(--sp-3xl);
}
.process__header {
  margin-bottom: var(--sp-xl);
}
.process__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-xl);
}
.process-num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-sm);
}
.process-item h3 {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-xs);
  line-height: 1.2;
}
.process-item p {
  font-size: var(--fs-sm);
  color: var(--muted);
  max-width: 40ch;
}
@media (max-width: 640px) {
  .process__list { grid-template-columns: 1fr; gap: var(--sp-xl); }
}


/* ---- 11. CONTACT ---- */
.contact {
  padding-block: var(--sp-3xl);
  background: var(--fg);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute;
  bottom: -25%;
  left: -10%;
  width: min(55vw, 640px);
  height: min(55vw, 640px);
  background: radial-gradient(circle, rgba(196,113,74,0.14) 0%, rgba(196,113,74,0) 70%);
  pointer-events: none;
  z-index: 0;
}
.contact .container { position: relative; z-index: 1; }
.contact .section-label { color: rgba(247,243,236,0.4); }
.contact__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.92;
  margin-bottom: var(--sp-xl);
  color: var(--bg);
}
.contact__title .reveal-line { overflow: hidden; }
.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--bg);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.25rem;
  transition: color 0.25s, border-color 0.25s;
  margin-bottom: var(--sp-lg);
}
.contact__email:hover {
  color: var(--accent);
}
.contact__email-arrow {
  transition: transform 0.3s var(--ease-out);
}
.contact__email:hover .contact__email-arrow {
  transform: translate(3px, -3px);
}
.contact__sub {
  font-size: var(--fs-sm);
  color: rgba(247,243,236,0.45);
}
.contact__sub a {
  color: rgba(247,243,236,0.75);
}
.contact__sub a:hover {
  color: var(--accent);
}

@media (max-width: 480px) {
  .contact__email { font-size: var(--fs-md); }
}

/* CONTACT FORM */
.contact-form {
  max-width: 32rem;
  margin-bottom: var(--sp-lg);
}
.contact-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
}
.contact-form__field {
  margin-bottom: var(--sp-md);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(247,243,236,0.25);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  padding: 0.6rem 0;
  resize: none;
  transition: border-color 0.25s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(247,243,236,0.4);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form__submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid var(--accent);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--bg);
  padding-bottom: 0.25rem;
  margin-top: var(--sp-sm);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.contact-form__submit:hover {
  color: var(--accent);
}
.contact-form__submit:disabled {
  opacity: 0.5;
  cursor: default;
}
.contact-form__submit-arrow {
  transition: transform 0.3s var(--ease-out);
}
.contact-form__submit:hover .contact-form__submit-arrow {
  transform: translate(3px, -3px);
}
.contact-form__status {
  font-size: var(--fs-sm);
  margin-top: var(--sp-sm);
  min-height: 1.2em;
}
.contact-form__status--success { color: #A8C0A0; }
.contact-form__status--error { color: #D08A7A; }

@media (max-width: 480px) {
  .contact-form__row { grid-template-columns: 1fr; }
}


/* ---- 12. ASK AI ---- */
.ask-ai {
  background: var(--fg);
  color: var(--bg);
  padding-block: var(--sp-2xl);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ask-ai__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xl);
  flex-wrap: wrap;
}
.ask-ai__label {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247,243,236,0.4);
  margin-bottom: 0.4rem;
}
.ask-ai__heading {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
}
.ask-ai__sub {
  font-size: var(--fs-sm);
  color: rgba(247,243,236,0.55);
}
.ask-ai__buttons {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  flex-shrink: 0;
}
.ask-ai__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 400;
  border: 1px solid var(--border);
  border-radius: 3rem;
  background: var(--bg);
  color: var(--fg);
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
  white-space: nowrap;
}
.ask-ai__btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.ask-ai__btn img {
  filter: brightness(0);
  transition: filter 0.25s;
}
.ask-ai__btn:hover img {
  filter: brightness(0) invert(1);
}

@media (max-width: 640px) {
  .ask-ai__inner { flex-direction: column; align-items: flex-start; }
  .ask-ai__buttons { width: 100%; }
  .ask-ai__btn { flex: 1; justify-content: center; }
}


/* ---- 13. FOOTER ---- */
.footer {
  padding-block: var(--sp-xl);
  border-top: 1px solid var(--border);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.footer__copy {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.footer__col-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 0.25rem;
}
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.footer__nav a {
  transition: color 0.2s;
}
.footer__nav a:hover { color: var(--fg); }
.footer__right {
  text-align: right;
  font-size: var(--fs-xs);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.footer__right a {
  transition: color 0.2s;
}
.footer__right a:hover { color: var(--fg); }

.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 9.5vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg);
  opacity: 0.06;
  text-align: center;
  margin-top: var(--sp-2xl);
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
}

@media (max-width: 640px) {
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-xl);
  }
  .footer__right { text-align: left; }
}
@media (max-width: 768px) {
  .footer__inner { gap: var(--sp-xl); }
}


/* ---- 14. PROJECT (CASE STUDY) PAGE ---- */
.project-hero {
  padding-top: clamp(7rem, 14vw, 10rem);
  padding-bottom: var(--sp-xl);
}
.project-back {
  display: inline-block;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: var(--sp-lg);
  transition: color 0.2s;
}
.project-back:hover { color: var(--fg); }
.project-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-sm);
}
.project-hero__meta .tag-mono { margin-bottom: 0; }
.project-hero__year {
  font-size: var(--fs-sm);
  color: var(--muted);
}
.project-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin-bottom: var(--sp-sm);
  overflow-wrap: break-word;
}
.project-hero__title .reveal-line { overflow: hidden; }
.project-hero__tagline {
  font-size: var(--fs-md);
  color: var(--muted);
}

/* 404 */
.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: clamp(7rem, 14vw, 10rem);
  padding-bottom: var(--sp-2xl);
}
.error-page .tag-mono { margin-bottom: var(--sp-sm); }
.error-page__code {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.error-page__tagline {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-top: var(--sp-sm);
}
.error-page__msg {
  font-size: var(--fs-md);
  color: var(--muted);
  max-width: 32rem;
  margin: var(--sp-md) auto var(--sp-lg);
}

.project-image {
  padding-bottom: var(--sp-2xl);
}
.project-image__frame {
  max-width: var(--max-w);
  margin-inline: auto;
  aspect-ratio: 4 / 5;
  max-height: 85vh;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-alt);
}
.project-image__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.project-image__frame img.is-loaded {
  opacity: 1;
}

.project-body {
  padding-bottom: var(--sp-3xl);
}
.project-body__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-2xl);
  align-items: start;
}
.project-block { margin-bottom: var(--sp-xl); }
.project-block p {
  font-size: var(--fs-base);
  color: var(--fg);
  line-height: 1.7;
  max-width: 62ch;
}
.project-features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.project-feature {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-md);
}
.project-feature h3 {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.project-feature p {
  font-size: var(--fs-sm);
  color: var(--muted);
  max-width: 55ch;
}

.project-body__side {
  padding-top: var(--sp-xs);
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-lg);
}
.project-visit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.25rem;
  transition: color 0.25s;
}
.project-visit:hover { color: var(--accent); }

/* SOLUTIONS + DESIGN SYSTEM */
.project-system {
  padding-block: var(--sp-2xl);
  border-top: 1px solid var(--border);
}
.project-system__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--sp-2xl);
  align-items: start;
}
.stack-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.stack-list li {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 700;
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--border);
}

.palette {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}
.swatch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}
.swatch__color {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: block;
}
.swatch__name {
  font-size: var(--fs-sm);
  font-weight: 500;
}
.swatch__hex {
  margin-bottom: 0;
  color: var(--muted);
}

.type-specimen {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-lg);
}
.type-specimen__row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-lg);
  padding-block: var(--sp-sm);
}
.type-specimen__row + .type-specimen__row {
  border-top: 1px solid var(--border);
}
.type-specimen__label {
  flex-shrink: 0;
  width: 5ch;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.type-specimen__sample {
  font-size: var(--fs-xl);
  line-height: 1;
}

.design-rationale {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-lg);
  margin-top: var(--sp-lg);
  color: var(--muted);
  font-size: var(--fs-base);
  max-width: 62ch;
}

@media (max-width: 800px) {
  .project-system__grid { grid-template-columns: 1fr; gap: var(--sp-xl); }
}

.project-pitch {
  background: var(--bg-alt);
  padding-block: var(--sp-2xl);
  border-top: 1px solid var(--border);
}
.project-pitch__heading {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin-bottom: var(--sp-md);
}
.project-pitch__heading .reveal-line { overflow: hidden; }
.project-pitch__text {
  font-size: var(--fs-base);
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.7;
  margin-bottom: var(--sp-lg);
}
.project-pitch__cta {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
  transition: color 0.2s, border-color 0.2s;
}
.project-pitch__cta:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 800px) {
  .project-body__grid { grid-template-columns: 1fr; }
  .project-image__frame { aspect-ratio: 3 / 4; max-height: 70vh; }
}

/* ---- REAL ESTATE PORTFOLIO PAGE ---- */
.re-gallery-section { padding-block: var(--sp-3xl); }
.re-gallery-section .section-title { margin-top: var(--sp-md); margin-bottom: var(--sp-xl); }
.re-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
}
.re-gallery__item { transform: none; width: 100%; text-align: left; }
.re-gallery__note {
  margin-top: var(--sp-lg);
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* Lightbox */
.re-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(26, 25, 23, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0s linear 0.3s;
}
.re-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s var(--ease-out);
}
.re-lightbox__figure {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
}
.re-lightbox__img {
  max-width: min(88vw, 1400px);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
}
.re-lightbox__caption {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(247, 243, 236, 0.6);
}
.re-lightbox__close,
.re-lightbox__prev,
.re-lightbox__next {
  position: absolute;
  color: var(--bg);
  line-height: 1;
  padding: var(--sp-sm);
  transition: color 0.2s, transform 0.2s;
}
.re-lightbox__close:hover,
.re-lightbox__prev:hover,
.re-lightbox__next:hover { color: var(--accent); }
.re-lightbox__close { top: var(--sp-md); right: var(--sp-md); font-size: var(--fs-lg); }
.re-lightbox__prev { left: var(--sp-md); top: 50%; transform: translateY(-50%); font-size: var(--fs-xl); }
.re-lightbox__next { right: var(--sp-md); top: 50%; transform: translateY(-50%); font-size: var(--fs-xl); }
.re-lightbox__prev:hover { transform: translateY(-50%) translateX(-3px); }
.re-lightbox__next:hover { transform: translateY(-50%) translateX(3px); }
@media (max-width: 640px) {
  .re-lightbox__prev, .re-lightbox__next { display: none; }
}
