:root {
  --bg: #f3eee4;
  --bg-strong: #e5d8c7;
  --surface: #fffdf8;
  --text: #211a14;
  --muted: #5f5145;
  --line: #d4c0a8;
  --accent: #8c4e2b;
  --accent-deep: #5f2f16;
  --shadow-soft: 0 18px 40px rgba(44, 24, 13, 0.11);
  --shadow-card: 0 8px 22px rgba(24, 11, 5, 0.12);
  --radius-lg: 26px;
  --radius-md: 16px;
  --max-width: 1180px;
  --header-height: 78px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(173, 107, 71, 0.14), transparent 28%),
    radial-gradient(circle at 88% 76%, rgba(110, 68, 44, 0.16), transparent 36%),
    linear-gradient(180deg, #f7f2e8 0%, #f1e9dc 54%, #ede3d2 100%);
  line-height: 1.62;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #be6b3d;
  outline-offset: 2px;
}

.sr-only {
  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: 12px;
  top: -46px;
  z-index: 1000;
  padding: 0.6rem 0.95rem;
  background: var(--accent-deep);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  top: 14px;
}

.container {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin-inline: auto;
}

.section {
  padding: clamp(4.2rem, 8vw, 7.2rem) 0;
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 18px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(248, 241, 230, 0.8);
  border-bottom: 1px solid rgba(124, 92, 67, 0.2);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand {
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #43352b;
  padding: 0.5rem 0.35rem;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.35rem;
  right: 0.35rem;
  bottom: 0.28rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 260ms ease;
}

.site-nav a:hover::after,
.site-nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(105, 77, 57, 0.33);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 0.45rem 0.76rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  color: #4a3c31;
}

.lang-btn.active {
  background: var(--accent-deep);
  color: #fff;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(105, 77, 57, 0.33);
  border-radius: 10px;
  background: rgba(255, 252, 247, 0.88);
  width: 44px;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle-line {
  width: 19px;
  height: 2px;
  border-radius: 4px;
  background: #503a2a;
}

.hero {
  position: relative;
  min-height: min(88vh, 840px);
  display: grid;
  align-items: center;
  color: #fff;
  padding-top: calc(var(--header-height) + 1.4rem);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media picture,
.hero-media img {
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(0.88) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(17, 12, 10, 0.78) 0%, rgba(21, 15, 12, 0.48) 52%, rgba(0, 0, 0, 0.2) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.62));
}

.hero-content {
  max-width: 650px;
  padding: 2rem 0 2.4rem;
}

.hero-kicker {
  margin: 0;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #e9d5c2;
}

.hero h1 {
  margin: 0.55rem 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 5.4vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
}

.hero-mantra {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-mantra li {
  font-family: "Caveat", cursive;
  font-size: clamp(1.4rem, 3vw, 2rem);
  padding: 0.06rem 0.78rem;
  border: 1px solid rgba(255, 240, 224, 0.42);
  border-radius: 999px;
}

.hero-intro {
  max-width: 33ch;
  font-size: clamp(1rem, 1.9vw, 1.25rem);
  margin: 1rem 0 0;
  color: #faefe5;
}

.button-primary {
  margin-top: 1.55rem;
  display: inline-block;
  background: #f8ede0;
  color: #322114;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.74rem;
  padding: 0.85rem 1.14rem;
  border-radius: 999px;
  border: 1px solid rgba(78, 56, 42, 0.32);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.section-eyebrow {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #6f5542;
}

h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.12;
  color: #261b14;
}

.about {
  position: relative;
  padding-bottom: clamp(2.3rem, 4.8vw, 4.2rem);
}

.about::before {
  content: "";
  position: absolute;
  top: 12%;
  left: 0;
  width: min(58vw, 540px);
  height: min(50vw, 420px);
  background: radial-gradient(circle, rgba(140, 78, 43, 0.1), transparent 72%);
  pointer-events: none;
}

.text-column {
  position: relative;
  max-width: 780px;
}

.about h2 {
  font-size: clamp(1.75rem, 4vw, 2.9rem);
  margin: 0.68rem 0 1.1rem;
}

.about-copy {
  display: grid;
  gap: 1.1rem;
}

.about-copy p {
  margin: 0;
  color: #372a21;
  font-size: clamp(0.98rem, 1.48vw, 1.08rem);
  white-space: pre-line;
}

.about-signoff {
  margin-top: 1.35rem;
  font-family: "Caveat", cursive;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: #4e3021;
}

.image-divider {
  position: relative;
  width: 100%;
  height: clamp(12rem, 32vw, 22rem);
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid rgba(116, 79, 52, 0.22);
  border-bottom: 1px solid rgba(116, 79, 52, 0.22);
}

.image-divider-media,
.image-divider-media img {
  width: 100%;
  height: 100%;
}

.image-divider-media img {
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(0.9) contrast(1.03) brightness(0.9);
  transform: scale(1.02);
}

.portfolio {
  padding-top: clamp(2.6rem, 5.2vw, 4.7rem);
  background: linear-gradient(180deg, rgba(246, 238, 226, 0.35), rgba(239, 229, 213, 0.85));
  border-top: 1px solid rgba(116, 79, 52, 0.15);
  border-bottom: 1px solid rgba(116, 79, 52, 0.15);
}

.portfolio h2 {
  margin: 0.64rem 0 0;
  font-size: clamp(1.75rem, 4vw, 2.85rem);
}

.section-intro {
  margin: 0.8rem 0 0;
  color: #4f3d31;
  max-width: 84ch;
}

.featured-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.feature-card {
  margin: 0;
  grid-column: span 4;
  border-radius: var(--radius-lg);
  overflow: visible;
  --flip-card-height: clamp(17.5rem, 33vw, 24rem);
}

.gallery-head {
  margin-top: 3.2rem;
}

.gallery-head h3 {
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  margin: 0;
}

.gallery-head p {
  margin: 0.58rem 0 0;
  color: #5f4c3f;
}

.gallery-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: visible;
  --flip-card-height: clamp(14rem, 29vw, 19rem);
}

.gallery-image-button {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: var(--flip-card-height);
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(102, 71, 47, 0.16);
  border-radius: inherit;
  background: var(--surface);
  text-align: left;
  color: inherit;
  box-shadow: 0 8px 18px rgba(50, 28, 15, 0.09);
  cursor: zoom-in;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.gallery-image-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(50, 28, 15, 0.14);
}

.gallery-image-button:focus-visible {
  outline: 3px solid #be6b3d;
  outline-offset: -3px;
}

.gallery-image-media {
  flex: 1;
  min-height: 0;
}

.gallery-image-media picture,
.gallery-image-media img {
  width: 100%;
  height: 100%;
}

.gallery-image-media img {
  object-fit: cover;
  object-position: center 28%;
}

.portfolio-flip {
  position: relative;
  display: block;
  width: 100%;
  height: var(--flip-card-height);
  min-height: var(--flip-card-height);
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
  perspective: 1200px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.portfolio-flip:focus-visible {
  outline: 3px solid #be6b3d;
  outline-offset: -3px;
}

.portfolio-flip-inner {
  position: relative;
  height: 100%;
  min-height: inherit;
  border-radius: inherit;
  transform: rotateY(0deg);
  transition:
    transform 760ms cubic-bezier(0.22, 0.72, 0.17, 1),
    box-shadow 240ms ease;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform;
}

.portfolio-flip-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: inherit;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-origin: center center;
  will-change: transform;
}

.portfolio-flip-front {
  background: var(--surface);
  transform: rotateY(0deg);
}

.feature-card .portfolio-flip-face {
  border: 1px solid rgba(112, 78, 49, 0.2);
  box-shadow: var(--shadow-card);
}

.gallery-card .portfolio-flip-face {
  border: 1px solid rgba(102, 71, 47, 0.16);
  box-shadow: 0 8px 18px rgba(50, 28, 15, 0.09);
}

.portfolio-flip-media {
  flex: 1;
  min-height: 0;
}

.portfolio-flip-media picture,
.portfolio-flip-media img {
  width: 100%;
  height: 100%;
  display: block;
}

.portfolio-flip-media img {
  object-fit: cover;
  object-position: center 28%;
}

.portfolio-front-caption {
  margin: 0;
  padding: 0.95rem 1rem 1.1rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1rem;
  color: #3d2b20;
}

.gallery-card .portfolio-front-caption {
  padding: 0.72rem 0.82rem 0.9rem;
  font-size: 0.84rem;
  color: #5a4638;
}

.portfolio-flip-back {
  transform: rotateY(180deg);
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem;
  background:
    linear-gradient(165deg, rgba(244, 234, 220, 0.98), rgba(232, 214, 192, 0.95)),
    radial-gradient(circle at 80% 18%, rgba(153, 90, 56, 0.14), transparent 55%);
}

@media (hover: hover) and (pointer: fine) {
  .featured-grid .portfolio-flip:not(.is-flipped):hover .portfolio-flip-inner {
    transform: rotateY(-16deg);
    box-shadow: 0 16px 28px rgba(50, 28, 15, 0.14);
  }
}

.portfolio-flip.is-flipped .portfolio-flip-inner {
  transform: rotateY(-180deg);
}

.portfolio-back-subtitle {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1rem;
  line-height: 1.2;
  color: #38251b;
}

.portfolio-back-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #4d392d;
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(0.8rem, 2.7vw, 2rem);
  background: rgba(17, 10, 6, 0.82);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.image-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox-frame {
  position: relative;
  width: auto;
  max-width: min(96vw, 1120px);
  margin: 0;
  display: grid;
  justify-items: center;
}

.image-lightbox-media {
  display: block;
  width: auto;
  max-width: min(96vw, 1120px);
}

.image-lightbox-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 1120px);
  max-height: min(84vh, 980px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 236, 217, 0.24);
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.45);
}

.image-lightbox-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 1;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(255, 244, 235, 0.55);
  border-radius: 999px;
  background: rgba(18, 10, 4, 0.68);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-close:hover {
  background: rgba(18, 10, 4, 0.88);
}

.bibliography {
  background: linear-gradient(180deg, rgba(247, 241, 231, 0.75), rgba(240, 229, 214, 0.6));
  border-top: 1px solid rgba(116, 79, 52, 0.12);
  border-bottom: 1px solid rgba(116, 79, 52, 0.12);
}

.bibliography-inner {
  max-width: 920px;
}

.bibliography h2 {
  margin: 0.7rem 0 0;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
}

.bibliography-list {
  margin: 1.2rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.9rem;
  color: #382a20;
}

.bibliography-list li {
  padding-left: 0.15rem;
}

.contact {
  position: relative;
}

.contact::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 10%;
  width: min(44vw, 370px);
  height: min(52vw, 330px);
  background: radial-gradient(circle, rgba(126, 70, 37, 0.18), transparent 74%);
  pointer-events: none;
}

.contact-inner {
  max-width: 740px;
}

.contact h2 {
  margin: 0.7rem 0 0.75rem;
  font-size: clamp(1.65rem, 4vw, 2.8rem);
}

.contact p {
  margin: 0;
}

.contact-link {
  display: inline-block;
  margin-top: 1.45rem;
  font-family: "Fraunces", Georgia, serif;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  font-size: clamp(1.2rem, 3vw, 1.85rem);
  color: #4f2613;
}

.contact-closing {
  margin-top: 1.15rem;
  font-family: "Caveat", cursive;
  font-size: clamp(1.38rem, 2.7vw, 1.8rem);
  color: #4a2b1b;
}

.site-footer {
  padding: 1.1rem 0;
  border-top: 1px solid rgba(124, 92, 67, 0.2);
  background: rgba(240, 228, 211, 0.72);
}

.footer-inner p {
  margin: 0;
  color: #594838;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 640ms ease, transform 640ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .feature-card {
    grid-column: span 6;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr auto auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 1.25rem;
    width: min(88vw, 340px);
    background: #fff9f0;
    border: 1px solid rgba(98, 67, 45, 0.24);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
  }

  .menu-open .site-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.85rem;
    gap: 0.38rem;
  }

  .site-nav a {
    width: 100%;
    padding: 0.56rem 0.7rem;
    border-radius: 8px;
  }

  .site-nav a[aria-current="true"] {
    background: rgba(149, 95, 60, 0.14);
  }

  .site-nav a::after {
    display: none;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    padding-bottom: 1.7rem;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(calc(100% - 1.45rem), var(--max-width));
  }

  .image-divider {
    height: clamp(10rem, 52vw, 15rem);
  }

  .lang-switch {
    margin-left: auto;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    grid-column: span 1;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    --flip-card-height: clamp(18rem, 72vw, 24rem);
  }

  .gallery-card {
    --flip-card-height: clamp(14.5rem, 70vw, 20rem);
  }

  .hero-mantra {
    gap: 0.45rem;
  }

  .hero-mantra li {
    font-size: 1.28rem;
    padding-inline: 0.58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .portfolio-flip-inner {
    transform: none !important;
  }

  .portfolio-flip-face {
    transform: none !important;
    backface-visibility: visible;
    opacity: 0;
  }

  .portfolio-flip-front {
    opacity: 1;
  }

  .portfolio-flip.is-flipped .portfolio-flip-front {
    opacity: 0;
  }

  .portfolio-flip.is-flipped .portfolio-flip-back {
    opacity: 1;
  }

  .gallery-image-button,
  .image-lightbox {
    transition: none;
  }
}
