/*
 * OnlyWood editorial direction
 * Loaded after the legacy stylesheet so the visual system stays isolated and reversible.
 */

:root {
  --bg: #0c0d0b;
  --surface: #121310;
  --surface-soft: #1a1a16;
  --surface-elevated: rgba(255, 255, 255, 0.025);
  --paper: #e9e2d7;
  --paper-soft: #f2ede5;
  --ink: #191915;
  --text: #f2ede5;
  --muted: #bdb2a2;
  --line: rgba(242, 237, 229, 0.14);
  --line-dark: rgba(25, 25, 21, 0.18);
  --accent: #b98a55;
  --accent-strong: #d0a36d;
  --accent-soft: rgba(185, 138, 85, 0.14);
  --max-width: 1320px;
  --radius: 5px;
  --radius-sm: 2px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
  --page-color-blend: clamp(210px, 28vw, 380px);
  --display-font: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --body-font: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

html {
  background: var(--bg);
}

body {
  font-family: var(--body-font);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(185, 138, 85, 0.055), transparent 28rem),
    linear-gradient(180deg, #0c0d0b 0%, #11120f 100%);
  background-attachment: fixed;
  letter-spacing: 0.005em;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

.container {
  width: min(calc(100% - 5rem), var(--max-width));
}

.section {
  padding: clamp(6rem, 9vw, 9rem) 0;
}

.section-tight {
  padding: clamp(4rem, 6vw, 6rem) 0;
}

.section-heading {
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

.section-heading h1,
.section-heading h2,
.premium-title,
.editorial-title,
.hero h1,
.hero-about__title,
.project-intro__title,
.contact-hero h1,
.legal-block h3,
.premium-portfolio-title,
.portfolio-slide__title {
  font-family: var(--display-font);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.eyebrow {
  gap: 1rem;
  margin-bottom: 1.4rem;
  color: var(--accent-strong);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.25em;
}

.eyebrow::before {
  width: 38px;
  background: var(--accent);
}

.text-accent,
.editorial-title .text-accent,
.premium-title .text-accent {
  color: var(--accent-strong);
  font-style: italic;
  font-weight: 400;
}

/* Header: thin architectural frame instead of floating pills. */
.header {
  padding: 1.1rem 0;
}

.header-layout {
  align-items: center;
}

.brand__logo {
  width: 132px;
  transform: none;
}

.nav-wrapper {
  padding: 0.28rem 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(11, 12, 10, 0.64);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(115%);
  transition: transform 260ms ease, background-color 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.header.is-scrolled .nav-wrapper,
.header.is-scrolled .nav-wrapper:hover {
  opacity: 1;
  filter: none;
  transform: translateY(-2px) scale(0.985);
  background: rgba(11, 12, 10, 0.92);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.3);
}

.nav__list {
  gap: 0;
  padding: 0;
}

.nav__link {
  padding: 0.72rem 1.05rem;
  border-radius: 999px;
  color: rgba(242, 237, 229, 0.78);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav__link.is-active,
.nav__link:hover,
.nav__link:focus-visible {
  color: var(--text);
  background: rgba(185, 138, 85, 0.14);
}

.nav__link::after {
  left: 1.05rem;
  right: 1.05rem;
  bottom: 0.5rem;
  background: var(--accent);
}

.nav__preview {
  width: 260px;
  padding: 8px;
  border-radius: var(--radius);
  background: rgba(11, 12, 10, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.nav__preview-img {
  margin-bottom: 9px;
  border-radius: 2px;
  filter: saturate(0.82) contrast(1.04);
}

.nav__preview-title {
  padding: 0.25rem 0 0.45rem;
  font-family: var(--body-font);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.header-cta__btn {
  min-height: 44px;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Buttons and controls: quieter, more precise. */
.button {
  min-height: 50px;
  padding: 0.9rem 1.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.button--primary {
  background: var(--accent-strong);
  color: var(--ink);
  box-shadow: none;
}

.button--primary:hover,
.button--primary:focus-visible {
  background: #dfb783;
  box-shadow: none;
}

.button--secondary,
.button--ghost {
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: none;
}

/* Home hero: asymmetrical editorial composition. */
.hero::before {
  background:
    linear-gradient(90deg, rgba(9, 10, 8, 0.84) 0%, rgba(9, 10, 8, 0.46) 46%, rgba(9, 10, 8, 0.14) 74%),
    linear-gradient(180deg, rgba(9, 10, 8, 0.18) 0%, rgba(9, 10, 8, 0.08) 58%, #0c0d0b 100%),
    url("../img/hero.jpg") center / cover no-repeat;
  animation: none;
  transform: none;
}

.hero__grid {
  justify-items: start;
}

.hero__content {
  width: min(780px, 70vw);
  justify-items: start;
  text-align: left;
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 1.7rem;
  font-size: clamp(4rem, 7.1vw, 7.3rem);
  font-weight: 400;
  line-height: 0.84;
}

.hero p {
  max-width: 590px !important;
  margin: 0 0 2.4rem !important;
  color: rgba(242, 237, 229, 0.8) !important;
  font-size: 1.08rem !important;
  line-height: 1.7;
}

.hero .actions {
  justify-content: flex-start !important;
}

.scroll-indicator {
  bottom: 2.5rem;
}

/* Editorial surfaces and image direction. */
.section--paper {
  background: var(--paper);
  color: var(--ink);
}

.section--paper-soft {
  background: var(--paper-soft);
  color: var(--ink);
}

.section--paper .eyebrow,
.section--paper-soft .eyebrow {
  color: #805b34;
}

.section--paper .editorial-title,
.section--paper .premium-title,
.section--paper-soft .editorial-title,
.section--paper-soft .premium-title,
.section--paper .premium-feature h3,
.section--paper-soft .premium-feature h3 {
  color: var(--ink);
}

.section--paper .editorial-p,
.section--paper .premium-p,
.section--paper .list-clean li,
.section--paper-soft .editorial-p,
.section--paper-soft .premium-p,
.section--paper-soft .list-clean li,
.section--paper .premium-feature p,
.section--paper-soft .premium-feature p {
  color: rgba(25, 25, 21, 0.72) !important;
}

.section--paper .button--ghost,
.section--paper-soft .button--ghost {
  border-color: rgba(25, 25, 21, 0.38);
  color: var(--ink);
}

.editorial-grid {
  gap: clamp(3.5rem, 7vw, 8rem);
}

.editorial-title {
  font-size: clamp(3rem, 5vw, 5.4rem);
  line-height: 0.98;
}

.editorial-p {
  max-width: 620px;
  color: rgba(242, 237, 229, 0.74);
  font-size: 1.04rem;
  line-height: 1.85;
}

.editorial-image-wrapper,
.premium-image-lg,
.premium-portfolio-card,
.project-detail__cover,
.project-gallery__item,
.media-panel {
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.editorial-image,
.premium-image-lg img,
.premium-portfolio-img,
.project-gallery__item img,
.project-detail__cover img {
  filter: saturate(0.82) contrast(1.035) sepia(0.025);
}

.editorial-image-wrapper::after,
.premium-image-lg::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.section--paper .editorial-image-wrapper::after,
.section--paper-soft .editorial-image-wrapper::after {
  border-color: rgba(25, 25, 21, 0.18);
}

.premium-feature {
  position: relative;
  padding: 2rem 1.6rem 2.2rem 0;
  border-top: 1px solid var(--line);
}

.premium-feature::before {
  display: block;
  margin-bottom: 2rem;
  color: var(--accent-strong);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

.premium-feature:nth-child(1)::before { content: "01"; }
.premium-feature:nth-child(2)::before { content: "02"; }
.premium-feature:nth-child(3)::before { content: "03"; }
.premium-feature:nth-child(4)::before { content: "04"; }

.premium-feature:hover {
  background: transparent;
  transform: translateY(-3px);
}

.premium-cta-banner {
  display: grid;
  min-height: clamp(460px, 60vw, 650px);
  place-content: center;
  padding: clamp(4rem, 8vw, 8rem) clamp(2rem, 7vw, 7rem);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(90deg, rgba(10, 11, 9, 0.93), rgba(10, 11, 9, 0.48)),
    url("../img/projects/residential-villa-ierv/Sala%20uno.webp?v=20260726f") center 52% / cover no-repeat;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.mobile-final-cta {
  display: flex;
  min-height: 560px;
  align-items: flex-end;
  padding: 4rem 1.5rem;
  background:
    linear-gradient(180deg, rgba(10, 11, 9, 0.18), rgba(10, 11, 9, 0.94)),
    url("../img/projects/residential-villa-ierv/Sala%20uno.webp?v=20260726f") center / cover no-repeat;
  color: var(--text);
}

.mobile-final-cta__content {
  max-width: 340px;
}

.mobile-final-cta h2 {
  margin: 0.8rem 0 1rem;
  color: var(--text);
  font-family: var(--display-font);
  font-size: clamp(2.7rem, 13vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.mobile-final-cta p {
  margin: 0 0 1.6rem;
  color: rgba(242, 237, 229, 0.76);
  line-height: 1.6;
}

/* Portfolio: full-bleed case-study framing with visible facts. */
.portfolio-carousel {
  height: min(78vh, 820px);
  border-radius: 0;
}

.portfolio-slide__overlay {
  background: linear-gradient(90deg, rgba(8, 9, 7, 0.9), rgba(8, 9, 7, 0.18) 68%);
}

.portfolio-slide__content {
  max-width: 640px;
}

.portfolio-slide__title {
  font-size: clamp(3rem, 6vw, 6.2rem);
  line-height: 0.9;
}

.portfolio-slide__desc {
  max-width: 560px;
  font-size: 1.02rem;
  line-height: 1.7;
}

.badge,
.premium-portfolio-meta {
  border-radius: 0;
  background: transparent;
  color: var(--accent-strong);
  border: 0;
  border-left: 1px solid var(--accent);
  letter-spacing: 0.18em;
}

.portfolio-carousel__indicators {
  right: max(2rem, calc((100vw - var(--max-width)) / 2));
  bottom: 3rem;
  left: auto;
}

.portfolio-carousel__indicators .indicator {
  width: 56px;
}

.premium-portfolio-wrapper {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.premium-portfolio-card {
  aspect-ratio: 3 / 4.2;
  background: var(--surface);
}

.premium-portfolio-overlay {
  padding: 2rem;
  background: linear-gradient(180deg, transparent 38%, rgba(8, 9, 7, 0.94) 100%);
}

.premium-portfolio-desc {
  opacity: 1;
}

.portfolio-mobile-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.portfolio-mobile-card__media {
  position: relative;
  overflow: hidden;
}

.portfolio-mobile-card__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04);
}

.portfolio-mobile-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 9, 7, 0.55));
}

.portfolio-mobile-card__tag {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 1;
  padding-left: 0.8rem;
  border-left: 1px solid var(--accent);
  color: var(--accent-strong);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.portfolio-mobile-card__content {
  padding: 1.5rem 1.25rem 1.75rem;
}

.portfolio-mobile-card__content h2 {
  margin: 0 0 0.65rem;
  font-family: var(--display-font);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.portfolio-mobile-card__content p {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.portfolio-mobile-card__link {
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portfolio-archive-section {
  background: var(--paper);
  color: var(--ink);
}

.portfolio-archive__heading {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1rem 5rem;
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

.portfolio-archive__heading .eyebrow {
  grid-column: 1 / -1;
  color: #805b34;
}

.portfolio-archive__heading h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(3rem, 5vw, 5.3rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.portfolio-archive__heading p {
  align-self: end;
  max-width: 480px;
  margin: 0;
  color: rgba(25, 25, 21, 0.65);
  line-height: 1.75;
}

.portfolio-archive {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1px;
  background: var(--line-dark);
}

.portfolio-archive__item {
  position: relative;
  min-height: 680px;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

.portfolio-archive__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.05);
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portfolio-archive__item:nth-child(2) img {
  object-position: 52% center;
}

.portfolio-archive__item:hover img {
  transform: scale(1.025);
}

.portfolio-archive__item figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 0.4rem;
  padding: 4rem 2rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(8, 9, 7, 0.86));
  color: var(--text);
}

.portfolio-archive__item figcaption span {
  color: var(--accent-strong);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.portfolio-archive__item figcaption strong {
  font-family: var(--display-font);
  font-size: 1.7rem;
  font-weight: 400;
}

/* Project detail pages. */
.project-facts {
  padding: clamp(2rem, 4vw, 4rem) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  background: transparent !important;
}

.project-facts__item {
  grid-template-columns: minmax(110px, 0.35fr) 1fr;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--line) !important;
}

.project-facts__item:last-child {
  border-bottom: 0 !important;
}

.project-facts__label {
  color: var(--accent-strong) !important;
  font-size: 0.66rem !important;
}

.project-facts__value {
  color: var(--text) !important;
  font-family: var(--display-font) !important;
  font-size: 1.15rem !important;
}

.project-gallery {
  gap: 2px;
}

.project-gallery__item {
  min-height: 420px;
  border: 0;
}

.project-gallery__item--video {
  z-index: 1;
  transform-origin: center;
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 420ms ease;
}

.project-gallery__item--video video {
  transition:
    filter 320ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .project-gallery__item--video:hover,
  .project-gallery__item--video:focus-within {
    z-index: 4;
    transform: scale(1.045);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.38);
  }

  .project-gallery__item--video:hover video,
  .project-gallery__item--video:focus-within video {
    filter: brightness(1.04);
    transform: scale(1.018);
  }

  .project-gallery__item--video:hover::after,
  .project-gallery__item--video:focus-within::after {
    background: rgba(0, 0, 0, 0.06);
  }
}

.project-gallery__item::after {
  background: linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.22));
}

.lightbox__media img,
.lightbox__media video {
  border-radius: var(--radius-sm);
}

.lightbox__nav,
.lightbox__close {
  border-radius: var(--radius-sm);
  background: rgba(12, 13, 11, 0.82);
}

/* About page: the story image is treated as an architectural work, not a portrait. */
.hero-about__bg::after {
  background: linear-gradient(90deg, rgba(9, 10, 8, 0.85), rgba(9, 10, 8, 0.18) 72%),
    linear-gradient(180deg, transparent 48%, var(--bg) 100%);
}

.hero-about__bg img {
  animation: none;
  transform: none;
  filter: saturate(0.82) contrast(1.04);
}

.hero-about__title {
  font-size: clamp(4rem, 7vw, 7.2rem);
  line-height: 0.88;
}

.hero-about .scroll-indicator {
  display: none;
}

.section-about-founder {
  background: var(--paper);
  color: var(--ink);
}

.section-about-founder .editorial-grid {
  grid-template-columns: minmax(380px, 0.8fr) 1.2fr;
  gap: clamp(3.5rem, 7vw, 8rem);
}

.section-about-founder .editorial-image-wrapper {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.section-about-founder .editorial-title {
  color: var(--ink);
}

.section-about-founder .editorial-p {
  color: rgba(25, 25, 21, 0.72) !important;
}

.mobile-story-section {
  background: var(--paper);
  color: var(--ink);
}

.mobile-story-section .editorial-title,
.mobile-story-section .editorial-p {
  color: var(--ink) !important;
}

.mobile-story-section img {
  border-radius: var(--radius-sm) !important;
  filter: saturate(0.82) contrast(1.04);
}

/* Contact page: light introduction, dark contact surface and ruled form. */
.contact-hero {
  padding-top: 10rem;
  padding-bottom: 4rem !important;
  background: var(--paper);
  color: var(--ink);
}

.contact-hero .hero-overlay {
  display: none;
}

.contact-hero h1 {
  color: var(--ink) !important;
}

.contact-hero p {
  color: rgba(25, 25, 21, 0.68) !important;
}

.contact-hero .eyebrow,
.contact-mobile-intro .eyebrow {
  color: #805b34;
}

.contact-mobile-intro {
  background: var(--paper);
  color: var(--ink);
}

.contact-mobile-intro h1 {
  color: var(--ink) !important;
}

.contact-mobile-intro p {
  color: rgba(25, 25, 21, 0.68) !important;
}

.contact-mobile-intro .button--secondary {
  border-color: var(--line-dark);
  color: var(--ink);
}

.section--contact-mesh {
  padding: 5rem 0 8rem !important;
  background: var(--bg);
  color: var(--text);
}

.section--contact-mesh .contact-layout {
  gap: 0;
  align-items: stretch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-info-panel,
.contact-form-panel {
  padding: clamp(2.5rem, 5vw, 5rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.contact-form-panel {
  border-left: 1px solid var(--line);
}

.section--contact-mesh h2,
.section--contact-mesh .contact-text strong,
.section--contact-mesh .contact-text a,
.section--contact-mesh .contact-text span {
  color: var(--text);
}

.section--contact-mesh .contact-info-desc,
.section--contact-mesh .form-segment-wrapper legend,
.section--contact-mesh .privacy-note {
  color: var(--muted);
}

.contact-icon,
.social-btn {
  border-radius: var(--radius-sm);
  background: transparent;
  border-color: var(--line);
  color: var(--accent-strong);
}

.social-links-premium {
  border-color: var(--line);
}

.segment-control {
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
}

.segment-label {
  height: 100%;
  padding: 1rem 0.7rem;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.segment-option:last-child .segment-label {
  border-right: 0;
}

.segment-option input:checked + .segment-label {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: var(--ink);
  box-shadow: none;
}

.luxury-field input,
.luxury-field textarea {
  padding: 1.25rem 0.1rem 0.75rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 0;
  background: transparent;
  color: var(--text);
}

.luxury-field label {
  left: 0.1rem;
  color: var(--muted);
}

.optional-note {
  right: 0.1rem;
  color: rgba(242, 237, 229, 0.42);
}

.luxury-field input:focus,
.luxury-field textarea:focus,
.luxury-field input:not(:placeholder-shown),
.luxury-field textarea:not(:placeholder-shown) {
  border-color: var(--accent-strong);
  background: transparent;
}

.luxury-field input:focus ~ label,
.luxury-field textarea:focus ~ label,
.luxury-field input:not(:placeholder-shown) ~ label,
.luxury-field textarea:not(:placeholder-shown) ~ label,
.luxury-field textarea:not([placeholder=" "]) ~ label {
  left: 0;
  color: var(--accent-strong);
  background: var(--bg);
}

.field-bg {
  display: none;
}

/*
 * Shared color bridges.
 * The dedicated transition layers avoid the cold grey strip produced by a
 * direct black-to-paper gradient and keep copy on a fully settled surface.
 */
:is(
  .section--paper,
  .section--paper-soft,
  .section-about-founder,
  .portfolio-archive-section,
  .contact-hero,
  .contact-mobile-intro,
  .mobile-story-section
) {
  --page-light-surface: var(--paper);
  position: relative;
  isolation: isolate;
  background: var(--page-light-surface);
}

.section--paper-soft {
  --page-light-surface: var(--paper-soft);
}

:is(
  .section--paper,
  .section--paper-soft,
  .section-about-founder,
  .portfolio-archive-section,
  .contact-hero,
  .contact-mobile-intro,
  .mobile-story-section
)::before,
:is(
  .section--paper,
  .section--paper-soft,
  .section-about-founder,
  .portfolio-archive-section,
  .contact-hero,
  .contact-mobile-intro,
  .mobile-story-section
)::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  z-index: 0;
  height: calc(var(--page-color-blend) + 1px);
  pointer-events: none;
}

:is(
  .section--paper,
  .section--paper-soft,
  .section-about-founder,
  .portfolio-archive-section,
  .contact-hero,
  .contact-mobile-intro,
  .mobile-story-section
)::before {
  top: 0;
  background:
    radial-gradient(ellipse 58% 44% at 80% 52%, rgba(185, 138, 85, 0.14), transparent 100%),
    radial-gradient(ellipse 52% 38% at 12% 62%, rgba(139, 94, 52, 0.1), transparent 100%),
    linear-gradient(
      180deg,
      var(--bg) 0%,
      #15130f 10%,
      #211b15 22%,
      #34271c 34%,
      #513a28 46%,
      #71543c 58%,
      #96785d 70%,
      #b8a088 81%,
      #d1c2af 91%,
      var(--page-light-surface) 100%
    );
}

:is(
  .section--paper,
  .section--paper-soft,
  .section-about-founder,
  .portfolio-archive-section,
  .contact-hero,
  .contact-mobile-intro,
  .mobile-story-section
)::after {
  bottom: 0;
  background:
    radial-gradient(ellipse 58% 44% at 20% 48%, rgba(185, 138, 85, 0.14), transparent 100%),
    radial-gradient(ellipse 52% 38% at 88% 38%, rgba(139, 94, 52, 0.1), transparent 100%),
    linear-gradient(
      180deg,
      var(--page-light-surface) 0%,
      #d1c2af 9%,
      #b8a088 19%,
      #96785d 30%,
      #71543c 42%,
      #513a28 54%,
      #34271c 66%,
      #211b15 78%,
      #15130f 90%,
      var(--bg) 100%
    );
}

:is(
  .section--paper,
  .section--paper-soft,
  .section-about-founder,
  .portfolio-archive-section,
  .contact-hero,
  .contact-mobile-intro,
  .mobile-story-section
) > * {
  position: relative;
  z-index: 1;
}

:is(
  .section--paper,
  .section--paper-soft,
  .section-about-founder,
  .portfolio-archive-section
) {
  padding-top: calc(var(--page-color-blend) + clamp(2rem, 4vw, 4rem));
  padding-bottom: calc(var(--page-color-blend) + clamp(2rem, 4vw, 4rem));
}

.contact-hero {
  padding-top: calc(var(--page-color-blend) + clamp(3.5rem, 6vw, 6rem));
  padding-bottom: calc(var(--page-color-blend) + clamp(2rem, 4vw, 4rem)) !important;
}

/* Privacy reads like a printed specification sheet. */
.legal-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 5rem;
}

.legal-block {
  max-width: none;
  margin-bottom: 0;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.legal-block h3 {
  font-size: 2.1rem;
}

/* Footer. */
.premium-footer {
  padding: 0;
  background: #090a08;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-footer .container {
  width: min(calc(100% - 5rem), var(--max-width));
  max-width: var(--max-width);
  padding: 0;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(240px, 1.15fr) minmax(180px, 0.7fr) minmax(280px, 1fr);
}

.premium-footer > .footer-desktop-content:first-child {
  padding-top: 2.8rem;
  padding-bottom: 2rem;
}

.premium-footer .footer-left::after {
  content: "Materia, precisione, visione.";
  display: block;
  margin-top: 0.9rem;
  color: rgba(242, 237, 229, 0.48);
  font-family: var(--display-font);
  font-size: 1.05rem;
  font-style: italic;
}

.premium-footer h3 {
  margin: 0.25rem 0 0.85rem;
  font-family: var(--body-font);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.premium-footer__nav {
  gap: 0.42rem 1.5rem;
}

.premium-footer__contact-list {
  gap: 0.42rem;
}

.premium-footer__nav a,
.premium-footer__contact-list,
.premium-footer__bottom-bar {
  font-size: 0.82rem;
}

.premium-footer__bottom-bar {
  margin-top: 0;
  padding: 1rem 0 1.15rem;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.premium-footer__legal {
  gap: 1.2rem;
}

/* Mobile and tablet. */
@media (max-width: 992px) {
  .container {
    width: min(calc(100% - 2.5rem), var(--max-width));
  }

  .header {
    padding: 1rem 0;
    transition: padding 220ms ease, background-color 220ms ease, border-color 220ms ease;
  }

  .header.is-scrolled {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 11, 9, 0.9);
    backdrop-filter: blur(18px);
  }

  .brand__logo {
    width: 102px;
  }

  .mobile-toolbar {
    display: none !important;
  }

  .mobile-menu-fab {
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 11, 9, 0.94) !important;
    box-shadow: none;
  }

  .mobile-menu-fab line {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 240ms ease, opacity 180ms ease;
  }

  body.nav-open .mobile-menu-fab line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }

  body.nav-open .mobile-menu-fab line:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .mobile-menu-fab line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }

  .nav {
    align-items: flex-start !important;
    padding: 0 1.5rem !important;
    background: rgba(9, 10, 8, 0.94) !important;
    backdrop-filter: blur(24px) !important;
  }

  .nav::before {
    top: 1.55rem;
    left: 1.5rem;
    transform: none;
    color: var(--accent-strong);
    font-family: var(--body-font);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.24em !important;
  }

  .nav__list {
    counter-reset: nav-item;
    width: 100% !important;
    gap: 1.35rem !important;
    align-items: flex-start !important;
  }

  .nav__item {
    counter-increment: nav-item;
    width: 100% !important;
    text-align: left !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav__link {
    display: flex !important;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    padding: 0 0 0.85rem !important;
    font-family: var(--display-font) !important;
    font-size: clamp(2.3rem, 8vw, 4rem) !important;
    font-weight: 400 !important;
    letter-spacing: -0.035em !important;
    text-transform: none !important;
  }

  .nav__link.is-active,
  .nav__link:focus-visible {
    border-radius: 0 !important;
  }

  .nav__link:focus-visible {
    outline: 1px solid var(--accent-strong);
    outline-offset: 4px;
  }

  .nav__link::before {
    content: "0" counter(nav-item);
    order: 2;
    color: var(--accent-strong);
    font-family: var(--body-font);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
  }

  .section-about-founder .editorial-grid,
  .editorial-grid,
  .editorial-grid--reverse {
    grid-template-columns: 1fr;
  }

  .section--contact-mesh .contact-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-content: stretch !important;
  }

  .contact-form-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .legal-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .section {
    padding: 5rem 0;
  }

  .hero-mobile {
    isolation: isolate;
    height: 100svh;
    min-height: 680px;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 7.5rem 1.25rem 3.5rem;
  }

  .hero-mobile__bg {
    z-index: 0 !important;
    filter: none;
    background-position: 58% center;
  }

  .hero-mobile__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 9, 7, 0.2) 20%, rgba(8, 9, 7, 0.22) 46%, rgba(8, 9, 7, 0.92) 100%);
  }

  .hero-mobile__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    text-align: left;
  }

  .hero-mobile__content .eyebrow {
    justify-content: flex-start !important;
  }

  .hero-mobile h1 {
    max-width: 360px;
    margin-bottom: 1.25rem;
    font-family: var(--display-font);
    font-size: clamp(3.35rem, 14vw, 5rem);
    font-weight: 400;
    letter-spacing: -0.055em;
    line-height: 0.88;
  }

  .hero-mobile p {
    max-width: 330px;
    color: rgba(242, 237, 229, 0.76);
    line-height: 1.65;
  }

  .hero-mobile .actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: flex-start !important;
    width: 100%;
  }

  .hero-mobile .button {
    width: 100%;
    min-height: 46px;
    padding: 0.8rem 0.65rem;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .carousel-section {
    padding: 0;
  }

  .carousel-container {
    height: 72svh;
    min-height: 520px;
    margin: 0;
    border-radius: 0;
  }

  .carousel-slide img {
    filter: saturate(0.82) contrast(1.04);
  }

  .carousel-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(8, 9, 7, 0.72));
  }

  .carousel-meta {
    right: 1.25rem;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 1;
    padding: 1rem 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-family: var(--display-font);
    font-size: 1.8rem;
    text-align: left !important;
  }

  .carousel-actions {
    margin: 0;
    padding: 9rem 1.25rem 1.75rem;
    background:
      linear-gradient(
        180deg,
        var(--bg) 0%,
        #18140f 10%,
        #2b2118 22%,
        #493324 36%,
        #6d4e37 50%,
        #927158 64%,
        #b89c82 78%,
        #d5c5b1 89%,
        var(--paper) 100%
      );
  }

  .carousel-actions .button--ghost {
    width: 100%;
    border-color: var(--line-dark);
    color: var(--ink);
  }

  .maestria-section {
    padding: 5.5rem 0 !important;
    background: var(--paper);
    color: var(--ink);
    text-align: left;
  }

  .maestria-section .editorial-title,
  .maestria-section p {
    color: var(--ink) !important;
    text-align: left !important;
  }

  .maestria-section .maestria-image-small img {
    height: 360px !important;
    border-radius: 0 !important;
    filter: saturate(0.82) contrast(1.04);
  }

  .maestria-section .actions {
    justify-content: flex-start !important;
  }

  .maestria-section .button--ghost {
    border-color: var(--line-dark);
    color: var(--ink);
  }

  .mobile-story-section {
    padding-top: calc(var(--page-color-blend) + 1.5rem) !important;
    padding-bottom: calc(var(--page-color-blend) + 1.5rem) !important;
  }

  .contact-mobile-intro {
    padding-top: calc(var(--page-color-blend) + 1.5rem) !important;
    padding-bottom: calc(var(--page-color-blend) + 1.5rem) !important;
  }

  .home-page .mobile-final-cta {
    background:
      linear-gradient(
        180deg,
        var(--paper) 0,
        rgba(233, 226, 215, 0.96) 3rem,
        rgba(205, 196, 183, 0.78) 6.5rem,
        rgba(158, 148, 134, 0.52) 10rem,
        rgba(89, 83, 74, 0.24) 13rem,
        rgba(12, 13, 11, 0) 16rem
      ),
      linear-gradient(180deg, rgba(10, 11, 9, 0.12), rgba(10, 11, 9, 0.94)),
      url("../img/projects/residential-villa-ierv/Sala%20uno.webp?v=20260726f") center / cover no-repeat;
  }

  .premium-title,
  .editorial-title,
  .section-heading h1,
  .section-heading h2 {
    font-size: clamp(2.6rem, 12vw, 4rem);
    line-height: 0.98;
  }

  .premium-feature {
    margin-bottom: 0 !important;
    padding: 2rem 0 2.3rem;
  }

  .premium-portfolio-wrapper {
    display: grid;
    grid-template-columns: 1fr;
  }

  .portfolio-archive__heading,
  .portfolio-archive {
    grid-template-columns: 1fr;
  }

  .portfolio-archive__item {
    min-height: 72svh;
  }

  .premium-portfolio-card {
    aspect-ratio: 4 / 5;
  }

  .project-gallery__item {
    min-height: 0;
  }

  .project-facts__item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .section--contact-mesh {
    padding: 1rem 0 5rem !important;
  }

  .contact-info-panel,
  .contact-form-panel {
    padding: 2.5rem 0;
  }

  .section--contact-mesh .contact-layout {
    border-top: 0;
  }

  .segment-control {
    grid-template-columns: 1fr;
  }

  .segment-label {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .segment-option:last-child .segment-label {
    border-bottom: 0;
  }

  .mobile-info-card {
    border-radius: var(--radius-sm);
    box-shadow: none;
  }

  .footer-mobile-content {
    align-items: flex-start !important;
    padding: 2.15rem 1.25rem 1.35rem !important;
    text-align: left !important;
  }

  .premium-footer .footer-mobile-brand {
    margin-bottom: 0.75rem;
  }

  .premium-footer .footer-mobile-rights,
  .premium-footer .footer-mobile-policy {
    margin-top: 0.25rem;
  }
}

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

  .actions {
    gap: 0.65rem;
  }

  .form-grid {
    gap: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .editorial-image,
  .premium-image-lg img,
  .premium-portfolio-img,
  .portfolio-slide__img {
    transform: none !important;
  }
}

/* Direct section color changes: no transition gradients between dark and paper surfaces. */
:root {
  --page-color-blend: 0px;
}

:is(
  .section--paper,
  .section--paper-soft,
  .section-about-founder,
  .portfolio-archive-section,
  .contact-hero,
  .contact-mobile-intro,
  .mobile-story-section
)::before,
:is(
  .section--paper,
  .section--paper-soft,
  .section-about-founder,
  .portfolio-archive-section,
  .contact-hero,
  .contact-mobile-intro,
  .mobile-story-section
)::after {
  content: none !important;
  display: none !important;
}

:is(
  .section--paper,
  .section--paper-soft,
  .section-about-founder,
  .portfolio-archive-section
) {
  padding-top: clamp(4.5rem, 8vw, 8rem);
  padding-bottom: clamp(4.5rem, 8vw, 8rem);
}

.contact-hero {
  padding-top: clamp(6rem, 10vw, 9rem);
  padding-bottom: clamp(4rem, 7vw, 7rem) !important;
}

/* Shared structure for the new project detail pages. */
.project-detail-hero {
  padding-top: clamp(8rem, 12vw, 11rem);
  padding-bottom: 0;
}

.project-detail-title {
  max-width: 15ch;
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
}

.project-detail-cover-wrap {
  max-width: 1400px;
}

.project-detail__cover {
  height: min(76vh, 860px);
  overflow: hidden;
  border: 1px solid var(--line);
}

.project-detail__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .project-detail__cover:hover img {
    transform: scale(1.018);
  }
}

.project-detail-story {
  padding-top: clamp(4rem, 7vw, 7rem);
  padding-bottom: clamp(4.5rem, 8vw, 8rem);
}

.project-detail-story .project-facts {
  align-self: start;
}

.project-detail-story .project-facts > .eyebrow {
  margin-bottom: 1.5rem;
}

.project-detail-story .project-facts__item {
  display: grid;
}

.project-detail-story .editorial-text {
  padding-left: clamp(0rem, 2vw, 2rem);
}

.project-detail-story .editorial-title {
  margin-bottom: 2rem;
}

.project-detail-actions {
  margin-top: 3rem;
}

.project-detail-gallery-section {
  padding-top: clamp(3.5rem, 6vw, 6rem);
  padding-bottom: clamp(5rem, 9vw, 9rem);
  border-top: 1px solid var(--line);
}

.project-detail-gallery-section > .container > .premium-title {
  margin-bottom: 1rem;
}

.project-detail-gallery-intro {
  max-width: 620px;
  margin: 0 auto 4rem;
  color: var(--muted);
  text-align: center;
}

/* Reserved home module for the project that will be selected later. */
.featured-project-section {
  background: #0c0d0b;
  color: var(--text);
}

.featured-project-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}

.featured-project-intro {
  position: sticky;
  top: 9rem;
  padding-top: 0.75rem;
}

.featured-project-intro h2 {
  max-width: 10ch;
  margin: 1.25rem 0 1.5rem;
  font-family: var(--display-font);
  font-size: clamp(3.2rem, 6vw, 6.5rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.featured-project-intro p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.featured-project-status {
  display: inline-flex;
  margin-top: 2rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--accent);
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.featured-project-rail {
  max-height: 72vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scrollbar-color: var(--accent) #151612;
  scrollbar-width: thin;
}

.featured-project-placeholder {
  min-height: 64vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: #151612;
  scroll-snap-align: start;
}

.featured-project-placeholder:nth-child(2) {
  background: #1c1914;
}

.featured-project-placeholder:nth-child(3) {
  background: #121310;
}

.featured-project-placeholder:last-child {
  border-bottom: 0;
}

.featured-project-placeholder span {
  color: var(--accent-strong);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.featured-project-placeholder strong {
  max-width: 10ch;
  font-family: var(--display-font);
  font-size: clamp(2.2rem, 4vw, 4.8rem);
  font-weight: 400;
  line-height: 0.98;
}

.featured-project-section--mobile {
  padding: 4.5rem 1.5rem;
}

@media (max-width: 900px) {
  .project-detail__cover {
    height: min(66vh, 720px);
  }

  .project-detail-story .editorial-text {
    padding-left: 0;
  }

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

  .featured-project-intro {
    position: static;
  }

  .featured-project-intro h2 {
    max-width: 12ch;
    font-size: clamp(2.8rem, 10vw, 4.5rem);
  }
}

@media (max-width: 700px) {
  .mobile-story-section,
  .contact-mobile-intro {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  .home-page .mobile-final-cta {
    background:
      linear-gradient(180deg, rgba(10, 11, 9, 0.18), rgba(10, 11, 9, 0.94)),
      url("../img/projects/residential-villa-ierv/Sala%20uno.webp?v=20260726f") center / cover no-repeat;
  }

  .project-detail-hero {
    padding-top: 7rem;
  }

  .project-detail-title {
    margin-bottom: 2rem;
  }

  .project-detail__cover {
    height: 62svh;
  }

  .project-detail-story {
    padding: 3.5rem 0 4.5rem;
  }

  .project-detail-story .project-facts {
    padding: 1.5rem !important;
  }

  .project-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .project-detail-actions .button {
    width: 100%;
  }

  .project-detail-gallery-section {
    padding: 4rem 0 6rem;
  }

  .project-detail-gallery-intro {
    margin-bottom: 2.5rem;
  }

  .featured-project-section--mobile .featured-project-shell {
    gap: 2.25rem;
  }

  .featured-project-rail {
    max-height: 58svh;
  }

  .featured-project-placeholder {
    min-height: 52svh;
  }
}

/* Curated portfolio archive: three balanced projects per row on desktop. */
.portfolio-catalog-page {
  background: var(--bg);
}

.portfolio-catalog-hero {
  display: flex;
  min-height: min(68svh, 760px);
  align-items: flex-end;
  padding: clamp(10rem, 16vw, 15rem) 0 clamp(4.5rem, 8vw, 7.5rem);
  background: #0c0d0b;
}

.portfolio-catalog-hero .container {
  width: 100%;
}

.portfolio-catalog-hero .premium-title {
  max-width: 14ch;
  margin: 0.8rem 0 1.5rem;
  font-size: clamp(3.5rem, 7vw, 7.6rem);
  line-height: 0.92;
}

.portfolio-catalog-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.75;
}

.portfolio-catalog-section {
  padding: clamp(4.5rem, 8vw, 8rem) 0;
  background: var(--paper);
  color: var(--ink);
}

.project-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 2vw, 2rem);
}

.project-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(17, 18, 15, 0.16);
  background: #10110f;
  color: #f4efe7;
  text-decoration: none;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease,
    border-color 0.45s ease;
}

.project-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 0.94;
  background: #171815;
}

.project-card__media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(7, 8, 6, 0.62) 100%);
  content: "";
  pointer-events: none;
}

.project-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card__tag,
.project-card__state {
  position: absolute;
  z-index: 1;
  top: 1rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid rgba(236, 216, 191, 0.35);
  background: rgba(12, 13, 11, 0.72);
  color: #e2bc82;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.project-card__tag {
  left: 1rem;
}

.project-card__state {
  right: 1rem;
  color: #f4efe7;
}

.project-card__content {
  display: flex;
  min-height: 235px;
  flex: 1;
  flex-direction: column;
  padding: clamp(1.25rem, 2.2vw, 2rem);
}

.project-card__content h2 {
  margin: 0 0 0.75rem;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 2.4vw, 2.55rem);
  font-weight: 400;
  line-height: 1.04;
}

.project-card__content p {
  margin: 0 0 1.35rem;
  color: #bdb7ae;
  font-size: 0.97rem;
  line-height: 1.65;
}

.project-card__link {
  margin-top: auto;
  color: #d9b379;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover,
  .project-card:focus-visible {
    border-color: rgba(169, 124, 80, 0.62);
    box-shadow: 0 24px 60px rgba(16, 17, 15, 0.2);
    transform: translateY(-7px);
  }

  .project-card:hover .project-card__media img,
  .project-card:focus-visible .project-card__media img {
    transform: scale(1.045);
  }
}

.portfolio-catalog-cta {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: #0c0d0b;
  text-align: center;
}

.portfolio-catalog-cta .eyebrow {
  justify-content: center;
}

.portfolio-catalog-cta .premium-title {
  margin: 1rem auto 2rem;
  font-size: clamp(3rem, 6vw, 6rem);
}

/* Work-in-progress project page. */
.project-wip {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: flex-end;
  overflow: hidden;
  padding: clamp(10rem, 18vw, 15rem) 0 clamp(4rem, 8vw, 7rem);
}

.project-wip__background,
.project-wip__overlay {
  position: absolute;
  inset: 0;
}

.project-wip__background {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-wip__overlay {
  background:
    linear-gradient(90deg, rgba(8, 9, 7, 0.92), rgba(8, 9, 7, 0.34) 70%),
    linear-gradient(180deg, rgba(8, 9, 7, 0.22), rgba(8, 9, 7, 0.88));
}

.project-wip__content {
  position: relative;
  z-index: 1;
}

.project-wip__content .premium-title {
  max-width: 10ch;
  margin: 0.8rem 0 1.2rem;
  font-size: clamp(4rem, 9vw, 9rem);
}

.project-wip__content p {
  max-width: 650px;
  color: #d1cbc2;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  line-height: 1.75;
}

@media (max-width: 1050px) {
  .project-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .portfolio-catalog-hero {
    min-height: 72svh;
    padding: 9rem 0 4rem;
  }

  .portfolio-catalog-hero .premium-title {
    font-size: clamp(3.3rem, 14vw, 5rem);
  }

  .portfolio-catalog-section {
    padding: 2rem 0 4.5rem;
  }

  .project-catalog-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .project-card__media {
    aspect-ratio: 1 / 0.9;
  }

  .project-card__content {
    min-height: 205px;
    padding: 1.35rem;
  }

  .project-card__content h2 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .project-wip {
    align-items: center;
    padding: 8rem 0 7rem;
  }

  .project-wip__content .premium-title {
    font-size: clamp(3.8rem, 17vw, 6rem);
  }
}
