/* ============================================
   NEIGHBOR casa — Design Tokens
   ============================================ */
:root {
  /* Color */
  --color-bg:        #FAF8F3;  /* warm white */
  --color-sage:      #7C8471;  /* primary brand sage */
  --color-sage-dark: #5E6555;  /* deeper sage for hover/contrast */
  --color-ink:       #2B2722;  /* near-black warm */
  --color-wood:      #A8967E;  /* warm wood accent */
  --color-mist:      #E8E4DB;  /* light divider / section bg */
  --color-white:     #FFFFFF;

  /* Type */
  --font-display: 'Fraunces', 'Noto Serif SC', serif;
  --font-body: 'Inter', 'Noto Sans SC', sans-serif;
  --font-mono: 'Inter', 'Noto Sans SC', sans-serif;

  /* Layout */
  --max-width: 1440px;
  --gutter: clamp(24px, 5vw, 80px);
  --section-pad: clamp(80px, 10vw, 160px);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

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

/* ============================================
   Typography
   ============================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-sage-dark);
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.lang-zh h1, .lang-zh h2, .lang-zh h3 {
  font-family: 'Noto Serif SC', serif;
  font-weight: 500;
  letter-spacing: 0;
}

p { color: var(--color-ink); opacity: 0.78; }

.line-rule {
  display: block;
  height: 1px;
  background: currentColor;
  opacity: 0.25;
}

/* ============================================
   Nav
   ============================================ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--gutter);
  transition: background var(--ease) 0.4s, padding var(--ease) 0.4s, box-shadow var(--ease) 0.4s;
  mix-blend-mode: normal;
}

.site-nav.is-light .nav-link,
.site-nav.is-light .lang-toggle button,
.site-nav.is-light .logo-text { color: var(--color-white); }

.site-nav.is-scrolled {
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(12px);
  padding-top: 18px;
  padding-bottom: 18px;
  box-shadow: 0 1px 0 rgba(43,39,34,0.08);
}

.site-nav.is-scrolled .nav-link,
.site-nav.is-scrolled .lang-toggle button,
.site-nav.is-scrolled .logo-text { color: var(--color-ink) !important; }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-sage);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-logo-mark span {
  font-family: var(--font-display);
  color: var(--color-white);
  font-size: 16px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--color-ink);
  white-space: nowrap;
}
.logo-text b { font-weight: 600; font-style: italic; }

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-link {
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--color-ink);
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 0%;
  background: currentColor;
  transition: width 0.3s var(--ease);
}
.nav-link:hover::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
}
.lang-toggle button {
  color: var(--color-ink);
  opacity: 0.45;
  transition: opacity 0.2s;
  font-weight: 500;
}
.lang-toggle button.active { opacity: 1; }
.lang-toggle .sep { opacity: 0.3; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}
.nav-burger span {
  height: 1px;
  background: currentColor;
  width: 100%;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  width: 100%;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: heroZoom 9s var(--ease) forwards;
}
@keyframes heroZoom {
  to { transform: scale(1); }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,22,16,0.32) 0%, rgba(20,22,16,0.05) 38%, rgba(20,22,16,0.05) 60%, rgba(20,22,16,0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gutter) 96px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-eyebrow {
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 22px;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.3s forwards;
}

.hero-title {
  color: var(--color-white);
  font-size: clamp(40px, 7vw, 92px);
  line-height: 1.04;
  max-width: 920px;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.45s forwards;
}

.hero-rule {
  width: 64px;
  height: 1px;
  background: var(--color-white);
  opacity: 0;
  margin: 30px 0;
  animation: fadeUp 0.9s var(--ease) 0.7s forwards, growLine 1.2s var(--ease) 0.7s forwards;
}

.hero-sub {
  color: rgba(255,255,255,0.82);
  font-size: 16px;
  max-width: 460px;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.85s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes growLine {
  from { width: 0; }
  to { width: 64px; }
}

.hero-scroll {
  position: absolute;
  right: var(--gutter);
  bottom: 40px;
  z-index: 2;
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  letter-spacing: 0.18em;
  display: flex;
  align-items: center;
  gap: 12px;
  writing-mode: vertical-rl;
}
.hero-scroll .dot-line {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.4);
}

/* ============================================
   Intro / Philosophy statement
   ============================================ */
.section { padding: var(--section-pad) 0; }

.intro {
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;
  gap: clamp(32px, 6vw, 120px);
  align-items: start;
}

.intro-label .eyebrow { margin-bottom: 18px; display: block; }

.intro-statement {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.4;
  color: var(--color-ink);
}
.intro-statement em {
  font-style: italic;
  color: var(--color-sage-dark);
}

.intro-meta {
  margin-top: 36px;
  display: flex;
  gap: 56px;
}
.intro-meta-item {
  font-size: 13px;
  color: var(--color-ink);
  opacity: 0.6;
}
.intro-meta-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  color: var(--color-sage-dark);
  opacity: 1;
  margin-bottom: 4px;
}

/* ============================================
   Category strip
   ============================================ */
.cat-section { padding: var(--section-pad) 0 calc(var(--section-pad) * 0.6); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 56px;
  gap: 24px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 44px); }
.section-head .view-all {
  font-size: 13px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.section-head .view-all:hover { opacity: 1; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--color-mist);
  border-top: 1px solid var(--color-mist);
  border-bottom: 1px solid var(--color-mist);
}

.cat-item {
  background: var(--color-bg);
  padding: 36px 12px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transition: background 0.35s var(--ease);
}
.cat-item:hover { background: var(--color-mist); }

.cat-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: transform 0.35s var(--ease);
}
.cat-item:hover .cat-icon { transform: translateY(-4px); }
.cat-icon svg { width: 100%; height: 100%; stroke: var(--color-ink); stroke-width: 1.4; }

.cat-name {
  font-size: 13.5px;
  letter-spacing: 0.02em;
  text-align: center;
}
.cat-name .en {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-top: 3px;
}

/* ============================================
   Featured products (asymmetric showcase)
   ============================================ */
.showcase {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--gutter);
}

.showcase-card { display: block; }
.showcase-media {
  overflow: hidden;
  background: var(--color-mist);
  margin-bottom: 20px;
  aspect-ratio: 4/3;
}
.showcase-media.tall { aspect-ratio: 3/4; }
.showcase-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.showcase-card:hover .showcase-media img { transform: scale(1.045); }

.showcase-large { grid-row: span 2; }

.showcase-title {
  font-family: var(--font-display);
  font-size: 19px;
  margin-bottom: 6px;
}
.showcase-tag {
  font-size: 12px;
  opacity: 0.55;
  letter-spacing: 0.03em;
}

/* ============================================
   Projects teaser (full-bleed editorial)
   ============================================ */
.projects-teaser {
  background: var(--color-ink);
  color: var(--color-white);
  padding: var(--section-pad) 0;
}
.projects-teaser p { color: var(--color-white); opacity: 0.65; }
.projects-teaser .section-head .view-all { color: var(--color-white); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  margin-top: 56px;
}
.projects-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 860px;
}
.project-card { color: var(--color-white); }
.project-media {
  aspect-ratio: 5/6;
  overflow: hidden;
  margin-bottom: 22px;
  position: relative;
}
.project-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.6s;
  filter: grayscale(15%);
}
.project-card:hover .project-media img {
  transform: scale(1.05);
  filter: grayscale(0%);
}
.project-index {
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.5;
  margin-bottom: 10px;
}
.project-name { font-family: var(--font-display); font-size: 22px; margin-bottom: 6px; }
.project-loc { font-size: 13px; opacity: 0.55; }

/* ============================================
   About teaser
   ============================================ */
.about-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 0;
}
.about-media { height: 100%; min-height: 480px; overflow: hidden; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-copy { padding: clamp(40px, 6vw, 100px); }
.about-copy h2 { font-size: clamp(28px, 4vw, 42px); margin: 20px 0 24px; }
.about-copy p { font-size: 15.5px; max-width: 440px; margin-bottom: 16px; }
.about-cta {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-ink);
  padding-bottom: 6px;
}
.about-cta svg { width: 14px; transition: transform 0.3s var(--ease); }
.about-cta:hover svg { transform: translateX(4px); }

/* ============================================
   Contact band
   ============================================ */
.contact-band {
  background: var(--color-sage);
  color: var(--color-white);
  padding: var(--section-pad) 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 100px);
}
.contact-band h2 { color: var(--color-white); font-size: clamp(30px, 4.5vw, 48px); max-width: 600px; }
.contact-band .eyebrow { color: rgba(255,255,255,0.75); }

.contact-list { margin-top: 36px; display: flex; flex-direction: column; gap: 18px; }
.contact-row { display: flex; gap: 18px; align-items: flex-start; font-size: 14.5px; }
.contact-row .k { opacity: 0.6; min-width: 88px; flex-shrink: 0; }
.contact-row .v { opacity: 0.95; }

.contact-form { display: flex; flex-direction: column; gap: 0; }
.form-field {
  border-bottom: 1px solid rgba(255,255,255,0.35);
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-field label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }
.form-field input, .form-field textarea {
  background: transparent;
  border: none;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  resize: none;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(255,255,255,0.4); }
.form-submit {
  margin-top: 24px;
  align-self: flex-start;
  font-size: 13.5px;
  letter-spacing: 0.05em;
  padding: 14px 32px;
  border: 1px solid rgba(255,255,255,0.6);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.form-submit:hover { background: var(--color-white); color: var(--color-sage); }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--color-ink);
  color: rgba(255,255,255,0.85);
  padding: 64px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand .logo-text { color: var(--color-white); font-size: 22px; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 13.5px; margin-top: 16px; max-width: 280px; }
.footer-col h4 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.5; margin-bottom: 18px; font-weight: 500; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 13.5px; opacity: 0.75; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 12px;
  opacity: 0.45;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-back-top {
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.footer-back-top:hover { background: rgba(255,255,255,0.1); }

/* ============================================
   Scroll reveal utility
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Language visibility
   ============================================ */
[data-en] , [data-zh] { }
.lang-zh [data-en-only] { display: none !important; }
.lang-en [data-zh-only] { display: none !important; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .intro { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .showcase { grid-template-columns: 1fr 1fr; }
  .showcase-large { grid-row: span 1; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .about-teaser { grid-template-columns: 1fr; }
  .about-media { min-height: 360px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
}

@media (max-width: 640px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-title { font-size: 13vw; }
  .intro-meta { gap: 32px; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
