/* Alok Design — Ink Timber Courtyard */

:root {
  --ink: #1a1814;
  --timber: #7a5a2e;
  --timber-deep: #5c4220;
  --jade: #5b8c7a;
  --jade-deep: #3d6558;
  --jade-soft: #7aa394;
  --paper: #f3f4f1;
  --paper-cool: #eef1ec;
  --mist: #d8e0da;
  --mist-deep: rgba(26, 24, 20, 0.42);
  --line: rgba(26, 24, 20, 0.14);
  --text: #2a2620;
  --text-soft: #5a554c;
  --white: #fbfcf9;
  --font-display: "Instrument Serif", "Noto Serif SC", Georgia, serif;
  --font-body: "Manrope", "Noto Sans SC", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3.5rem;
  --space-xl: 6rem;
  --space-2xl: 8.5rem;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(91, 140, 122, 0.08), transparent 55%),
    radial-gradient(90% 60% at 90% 20%, rgba(122, 90, 46, 0.07), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-cool) 45%, var(--paper) 100%);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--timber-deep);
}

:focus-visible {
  outline: 2px solid var(--jade-deep);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--white);
}

.skip-link:focus {
  top: 1rem;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: var(--header-h);
  background: rgba(243, 244, 241, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: calc(var(--max) + 4rem);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__mark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.nav__mark:hover {
  color: var(--timber-deep);
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav__list a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.25s var(--ease);
}

.nav__lang {
  display: flex;
  align-items: center;
  margin-left: 0.35rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 252, 249, 0.7);
}

.lang-switch__btn {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.2;
}

.lang-switch__btn[lang="zh-CN"] {
  font-family: "Noto Sans SC", var(--font-body);
  letter-spacing: 0.12em;
  text-transform: none;
}

.lang-switch__btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.lang-switch__btn:hover {
  color: var(--ink);
}

.lang-switch__btn[aria-pressed="true"]:hover {
  color: var(--white);
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 100%;
  height: 1px;
  background: var(--jade-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav__list a:hover,
.nav__list a:focus-visible {
  color: var(--ink);
}

.nav__list a:hover::after,
.nav__list a:focus-visible::after {
  transform: scaleX(1);
}

.nav__toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(26, 24, 20, 0.28);
  background: transparent;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav__toggle-bar,
.nav__toggle-bar::before,
.nav__toggle-bar::after {
  display: block;
  width: 1.1rem;
  height: 1px;
  background: var(--ink);
  position: relative;
}

.nav__toggle-bar::before,
.nav__toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav__toggle-bar::before { top: -5px; }
.nav__toggle-bar::after { top: 5px; }

/* Hero — copy panel beside the photograph */
.hero {
  min-height: calc(100svh - var(--header-h));
  display: grid;
  grid-template-columns: minmax(20rem, 0.92fr) 1.15fr;
  background: #f6f3ec;
  color: var(--ink);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 7vh, 5.5rem) clamp(1.75rem, 4.5vw, 4.5rem);
  position: relative;
}

.hero__copy::after {
  content: "";
  position: absolute;
  top: 12%;
  bottom: 12%;
  right: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--timber) 18%, var(--jade) 82%, transparent);
  opacity: 0.55;
}

.hero__place {
  margin: 0 0 1.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--jade-deep);
  opacity: 0;
  transform: translateY(1rem);
  animation: rise-in 0.9s var(--ease) 0.1s forwards;
}

.hero__place [data-lang="zh"] {
  text-transform: none;
  letter-spacing: 0.12em;
  font-weight: 500;
}

html:not([lang="zh-CN"]) [data-lang="zh"] {
  display: none !important;
}

html[lang="zh-CN"] [data-lang="en"] {
  display: none !important;
}

.hero__headline {
  margin: 0 0 1.15rem;
  max-width: 20ch;
  font-family: var(--font-display);
  font-size: clamp(2.55rem, 4.4vw, 4.35rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(1rem);
  animation: rise-in 1s var(--ease) 0.22s forwards;
}

.hero__headline-en {
  display: block;
}

.hero__headline-zh {
  display: block;
  max-width: 18em;
  margin-top: 0.85rem;
  font-family: "Noto Serif SC", var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.45;
  letter-spacing: 0.08em;
  color: var(--timber-deep);
}

.hero__support {
  margin: 0 0 2rem;
  max-width: 36ch;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-soft);
  opacity: 0;
  transform: translateY(1rem);
  animation: rise-in 1s var(--ease) 0.38s forwards;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  opacity: 0;
  transform: translateY(1rem);
  animation: rise-in 1s var(--ease) 0.52s forwards;
}

.hero__media {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: #c5c8c4;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  transform: scale(1.04);
  animation: hero-kenburns 18s var(--ease) both;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn--primary {
  background: var(--jade-deep);
  color: var(--white);
  border-color: var(--jade-deep);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--timber);
  border-color: var(--timber);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(26, 24, 20, 0.38);
  position: relative;
}

.btn--ghost::after {
  content: "";
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 0.55rem;
  height: 1px;
  background: var(--jade-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
  background: rgba(26, 24, 20, 0.04);
}

.btn--ghost:hover::after,
.btn--ghost:focus-visible::after {
  transform: scaleX(1);
}

/* Sections */
.section {
  padding: var(--space-2xl) 0;
  position: relative;
}

.section__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jade-deep);
}

.eyebrow [data-lang="zh"] {
  text-transform: none;
  letter-spacing: 0.12em;
  font-weight: 500;
}

.section h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  max-width: 16ch;
}

#services-title {
  max-width: 22em;
}

.headline-zh {
  display: block;
  margin-top: 0.45rem;
  font-family: "Noto Serif SC", var(--font-display);
  font-size: 0.55em;
  letter-spacing: 0.06em;
  color: var(--timber);
}

.section__lead {
  margin: 0 0 var(--space-lg);
  max-width: 42ch;
  color: var(--text-soft);
}

/* About */
.about {
  background:
    linear-gradient(180deg, transparent, rgba(216, 224, 218, 0.35) 30%, transparent 100%);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.about__copy p {
  margin: 0 0 1.1rem;
  max-width: 42ch;
  color: var(--text-soft);
}

.about__copy p:last-child {
  margin-bottom: 0;
  color: var(--text);
}

.about__figure {
  margin: 0;
  position: relative;
}

.about__figure::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  border: 1px solid var(--line);
  z-index: 0;
}

.about__figure img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.02);
}

/* Services */
.services {
  background:
    linear-gradient(135deg, rgba(91, 140, 122, 0.06), transparent 40%),
    var(--paper-cool);
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.service-list__item {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.service-list__index {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--timber);
  padding-top: 0.2rem;
}

.service-list h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--ink);
}

.service-list h3 span {
  font-family: "Noto Serif SC", var(--font-display);
  font-size: 0.75em;
  color: var(--jade-deep);
  margin-left: 0.35rem;
}

.service-list p {
  margin: 0;
  max-width: 52ch;
  color: var(--text-soft);
}

/* Projects gallery — courtyard sequence, not a card grid */
.gallery {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.85fr;
  grid-template-rows: auto auto;
  gap: 1.1rem 1.35rem;
  align-items: start;
}

.gallery__item {
  margin: 0;
  overflow: hidden;
}

.gallery__item img {
  width: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
  filter: saturate(0.95);
}

.gallery__item--hero {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gallery__item--hero img {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 32rem;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.gallery__item--wide {
  grid-column: 2 / span 2;
}

.gallery__item--wide img {
  aspect-ratio: 16 / 8.5;
}

.gallery__item--garden img,
.gallery__item--dusk img {
  aspect-ratio: 4 / 3.15;
}

.gallery__item:hover img,
.gallery__item:focus-within img {
  transform: scale(1.06);
  filter: saturate(1.05);
}

.gallery__item figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 0 0;
}

.gallery__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.gallery__meta {
  font-size: 0.9rem;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

/* Contact */
.contact {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(122, 90, 46, 0.08), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--mist) 140%);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact__intro p {
  margin: 0 0 1.25rem;
  max-width: 36ch;
  color: var(--text-soft);
}

.contact__address {
  font-style: normal;
  color: var(--ink);
  line-height: 1.8;
}

.contact__address a {
  color: var(--timber-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 90, 46, 0.35);
}

.contact__address a:hover {
  border-bottom-color: var(--timber);
}

.contact-form {
  background: rgba(251, 252, 249, 0.72);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  gap: 1.1rem;
}

.contact-form__field {
  display: grid;
  gap: 0.4rem;
}

.contact-form label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.contact-form label span {
  font-weight: 500;
  color: var(--text-soft);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 0.8rem 0.9rem;
  font: inherit;
  border-radius: 0;
  transition: border-color 0.25s var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--jade-deep);
}

.contact-form input.is-invalid,
.contact-form textarea.is-invalid {
  border-color: #a0452f;
}

.contact-form__status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--jade-deep);
}

.contact-form__status.is-error {
  color: #a0452f;
}

.contact-form .btn {
  justify-self: start;
  margin-top: 0.25rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
  background: var(--paper-cool);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-kenburns {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__image,
  .hero__place,
  .hero__headline,
  .hero__support,
  .hero__cta,
  .reveal,
  .gallery__item img,
  .btn,
  .nav__list a::after,
  .btn--ghost::after {
    animation: none !important;
    transition: none !important;
  }

  .hero__place,
  .hero__headline,
  .hero__support,
  .hero__cta,
  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero__image {
    transform: none;
  }
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(18rem, 1fr) 1fr;
  }

  .hero__headline {
    font-size: clamp(2.35rem, 4vw, 3.4rem);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero__media {
    order: -1;
    height: 46svh;
    min-height: 16rem;
  }

  .hero__copy {
    padding: 2.25rem 1.5rem 3rem;
  }

  .hero__copy::after {
    display: none;
  }

  .hero__headline {
    max-width: 18ch;
  }

  .about__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .about__figure::before {
    inset: 0.85rem -0.85rem -0.85rem 0.85rem;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .gallery__item--hero {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .gallery__item--hero img {
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
  }

  .gallery__item--wide {
    grid-column: 1 / -1;
  }

  .section h2 {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .nav__toggle {
    display: inline-flex;
  }

  .nav__list {
    position: absolute;
    top: var(--header-h);
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    gap: 0;
    background: rgba(26, 24, 20, 0.94);
    border: 1px solid rgba(251, 252, 249, 0.12);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }

  .nav.is-open .nav__list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav__list a {
    display: block;
    padding: 0.9rem 1.1rem;
    color: var(--white);
  }

  .nav__list a:hover,
  .nav__list a:focus-visible {
    color: var(--white);
  }

  .nav__list a::after {
    display: none;
  }

  .nav__lang {
    margin-left: 0;
    padding: 0.85rem 1.1rem 0.35rem;
  }

  .lang-switch {
    border-color: rgba(251, 252, 249, 0.22);
    background: transparent;
  }

  .lang-switch__btn {
    color: rgba(251, 252, 249, 0.72);
  }

  .lang-switch__btn:hover,
  .lang-switch__btn[aria-pressed="true"]:hover {
    color: var(--white);
  }

  .lang-switch__btn[aria-pressed="true"] {
    background: var(--white);
    color: var(--ink);
  }

  .hero__media {
    height: 32svh;
    min-height: 11.5rem;
  }

  .hero__copy {
    padding-top: 1.75rem;
    padding-bottom: 2.25rem;
  }

  .hero__headline {
    font-size: clamp(2.15rem, 9vw, 2.75rem);
    margin-bottom: 0.85rem;
  }

  .hero__support {
    margin-bottom: 1.35rem;
  }

  .hero__headline-zh {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
  }

  .gallery,
  .gallery__item--hero,
  .gallery__item--wide {
    grid-template-columns: 1fr;
    grid-column: auto;
    grid-row: auto;
  }

  .gallery__item--wide img,
  .gallery__item--garden img,
  .gallery__item--dusk img,
  .gallery__item--hero img {
    aspect-ratio: 4 / 3;
    height: auto;
    min-height: 0;
  }

  .service-list__item {
    grid-template-columns: 3rem 1fr;
    gap: 0.85rem;
  }

  .site-footer__inner {
    flex-direction: column;
  }
}

html[lang="zh-CN"] body {
  font-family: "Noto Sans SC", var(--font-body);
}

html[lang="zh-CN"] .hero__headline-zh,
html[lang="zh-CN"] .headline-zh {
  margin-top: 0;
  font-size: inherit;
  line-height: 1.25;
  letter-spacing: 0.06em;
  color: var(--ink);
}

html[lang="zh-CN"] .gallery__title {
  font-family: "Noto Serif SC", var(--font-display);
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  html[lang="zh-CN"] .hero__headline-zh {
    font-size: clamp(1.85rem, 8vw, 2.45rem);
  }
}
