@font-face {
  font-family: "QESTERO";
  src: url("font/QESTERO-Italic.woff2") format("woff2"),
       url("font/QESTERO-Italic.woff") format("woff"),
       url("font/QESTERO-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "QESTERO";
  src: url("font/QESTERO-Regular.woff2") format("woff2"),
       url("font/QESTERO-Regular.woff") format("woff"),
       url("font/QESTERO-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Marianna";
  src: url("font/marianna.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Custodia Deco";
  src: url("font/Custodia Deco.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ginebra";
  src: url("font/ginebra.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Viaoda";
  src: url("font/ViaodaLibre-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --page-bg: #f5f2ee;
  --text-main: #191511;
  --text-soft: #5f5449;
  --accent: rgba(255, 248, 240, 0.72);
  --line: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(120, 99, 83, 0.16);
  --shadow: 0 24px 80px rgba(40, 27, 18, 0.12);
  --content-max: 1180px;
  --hero-max: 1400px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top, rgba(203, 189, 174, 0.22), transparent 42%),
    linear-gradient(180deg, #fbfaf8 0%, var(--page-bg) 48%, #efe8e0 100%);
  color: var(--text-main);
  font-family: "Viaoda", serif;
}

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

a {
  color: inherit;
}

.site-header {
  padding: 22px 24px 10px;
  max-width: calc(var(--hero-max) + 48px);
  margin: 0 auto;
}

.main-nav {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  align-items: baseline;
  justify-content: center;
  column-gap: clamp(0.75rem, 1vw, 1.5rem);
  width: 100%;
  margin: 0 auto;
}

.main-nav a {
  text-decoration: none;
  font-family: "Custodia Deco", "Ginebra", serif;
  font-size: clamp(1.5rem, 1.1rem + 1.35vw, 2.35rem);
  letter-spacing: 0.02em;
  line-height: 0.95;
}

.main-nav a:nth-child(1),
.main-nav a:nth-child(2) {
  justify-self: center;
}

.main-nav a:nth-child(3) {
  justify-self: center;
  margin: 0 clamp(0.35rem, 0.8vw, 1rem);
}

.main-nav a:nth-child(4),
.main-nav a:nth-child(5) {
  justify-self: center;
}

.main-nav .nav-script {
  font-family: "Marianna", cursive;
  font-size: clamp(1.6rem, 1.15rem + 1.45vw, 2.45rem);
  text-transform: none;
  letter-spacing: 0;
}

.hero {
  padding: 8px 24px 18px;
}

.hero-frame {
  position: relative;
  width: 100%;
  max-width: var(--hero-max);
  margin: 0 auto;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #d6c6b8;
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9.6;
  object-fit: cover;
}

.hero-title-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 46.5%;
  transform: translateY(-50%);
  padding: 10px 16px 8px;
  background: linear-gradient(
    90deg,
    rgba(255, 252, 247, 0.56) 0%,
    var(--accent) 15%,
    var(--accent) 85%,
    rgba(255, 252, 247, 0.56) 100%
  );
  border-top: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
  text-align: center;
}

.hero-title-panel h1 {
  margin: 0;
  font-family: "Custodia Deco", serif;
  font-size: clamp(5.6rem, 8vw, 8.7rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.86;
  transform: scaleY(1.08);
  transform-origin: center;
}

.hero-lines {
  position: absolute;
  top: 7.8%;
  right: 13.5%;
  display: grid;
  gap: 14px;
}

.hero-lines span {
  width: clamp(72px, 9vw, 132px);
  height: 2px;
  background: var(--line);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
}

#about,
#services,
#projects,
#pricing,
#contacts {
  padding: 80px 24px;
}

#about {
  padding-top: 18px;
}

.intro {
  max-width: var(--content-max);
  margin: 0 auto;
}

.top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  margin-bottom: 72px;
}

.slogan {
  font-family: "Marianna", cursive;
  font-size: clamp(2.6rem, 2rem + 2.1vw, 4.15rem);
  line-height: 0.78;
  color: #16110d;
  text-align: right;
  max-width: 36rem;
}

.intro-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 72px;
}

.intro-text {
  flex: 1 1 48%;
}

.intro-text h3 {
  margin: 0 0 4px 8px;
  font-family: "Marianna", cursive;
  font-size: clamp(2.4rem, 2rem + 1.7vw, 4rem);
  font-weight: 400;
  line-height: 0.8;
  color: #16110d;
}

.intro-text h2 {
  margin: 0 0 30px;
  font-family: "Custodia Deco", serif;
  font-size: clamp(2.35rem, 1.95rem + 1.75vw, 4rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.03em;
}

.intro-text p {
  margin: 0;
  max-width: 100%;
  font-family: "Viaoda", serif;
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.9rem);
  line-height: 1.34;
  letter-spacing: 0.03em;
  color: rgba(22, 17, 13, 0.95);
  text-wrap: pretty;
}

.intro-photo {
  flex: 0 1 440px;
}

.intro-photo img {
  width: 100%;
  aspect-ratio: 0.74;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  filter: grayscale(1);
}

#projects {
  padding-top: 36px;
  padding-bottom: 44px;
}

.projects-section {
  max-width: var(--content-max);
  margin: 0 auto;
}

.projects-section h2 {
  margin: 0 0 44px;
  text-align: center;
  font-family: "Custodia Deco", serif;
  font-size: clamp(2.8rem, 2.2rem + 2vw, 5rem);
  font-weight: 400;
  line-height: 1;
}

.pricing-section {
  max-width: var(--content-max);
  margin: 0 auto;
}

.pricing-section h2 {
  margin: 0 0 44px;
  text-align: center;
  font-family: "Custodia Deco", serif;
  font-size: clamp(2.8rem, 2.2rem + 2vw, 5rem);
  font-weight: 400;
  line-height: 1;
}

.pricing-list {
  display: grid;
  gap: 20px;
}

.pricing-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(25, 21, 17, 0.12);
}

.pricing-item p {
  margin: 0;
  font-family: "Viaoda", serif;
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.85rem);
  line-height: 1.28;
  color: rgba(22, 17, 13, 0.95);
}

.pricing-item span {
  white-space: nowrap;
  font-family: "Marianna", cursive;
  font-size: clamp(2rem, 1.65rem + 1vw, 3rem);
  line-height: 0.9;
  color: #1b140f;
}

.pricing-unit {
  font-family: "Viaoda", serif;
  font-size: 0.82em;
  font-weight: 400;
}

.pricing-unit-power,
.pricing-note-power {
  display: inline-block;
  font-size: 0.7em;
  line-height: 1;
  vertical-align: super;
  font-weight: 400;
}

.pricing-note {
  margin: -8px 0 4px;
  padding-left: clamp(0rem, 1vw, 0.5rem);
  font-family: "Viaoda", serif;
  font-size: clamp(1rem, 0.95rem + 0.28vw, 1.2rem);
  line-height: 1.35;
  color: rgba(95, 84, 73, 0.95);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: start;
}

.project-slot {
  min-height: 1px;
}

.project-card {
  display: block;
  text-decoration: none;
  scroll-margin-top: 28px;
  transition: transform 0.3s ease;
}

.project-card-media {
  position: relative;
  overflow: hidden;
  background: #e8dfd5;
  border: 1px solid rgba(46, 31, 20, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease, border-color 0.35s ease;
}

.project-card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0) 0%, rgba(46, 31, 20, 0.09) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.project-card img {
  width: 100%;
  aspect-ratio: 0.86;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.35s ease;
}

.project-card-title {
  margin: 20px 0 0;
  text-align: center;
  font-family: "Marianna", cursive;
  font-size: clamp(2.8rem, 2.1rem + 1.8vw, 4.6rem);
  line-height: 0.88;
  color: #1b140f;
  transition: transform 0.35s ease, color 0.35s ease;
}

.project-card-subtitle {
  margin: 8px 0 0;
  text-align: center;
  font-family: "Marianna", cursive;
  font-size: clamp(1.45rem, 1.1rem + 0.9vw, 2.1rem);
  line-height: 0.92;
  color: rgba(27, 20, 15, 0.82);
  transition: transform 0.35s ease, color 0.35s ease;
}

.project-card:hover .project-card-media,
.project-card:focus-visible .project-card-media {
  transform: translateY(-10px);
  border-color: rgba(46, 31, 20, 0.18);
  box-shadow: 0 30px 56px rgba(43, 28, 16, 0.22);
}

.project-card:hover .project-card-media::before,
.project-card:focus-visible .project-card-media::before {
  opacity: 1;
}

.project-card:hover img,
.project-card:focus-visible img {
  transform: scale(1.05);
  filter: saturate(1.08) brightness(1.06);
}

.project-card:hover .project-card-title,
.project-card:hover .project-card-subtitle,
.project-card:focus-visible .project-card-title,
.project-card:focus-visible .project-card-subtitle {
  transform: translateY(-4px);
}

.project-card:focus-visible {
  outline: none;
}

.project-page {
  min-height: 100vh;
  padding: 28px 24px 40px;
  background: #ecd7bf;
}

.project-page-shell {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-page-title {
  width: 100%;
  margin: 0 0 18px;
  text-align: center;
  font-family: "Marianna", cursive;
  font-size: clamp(4rem, 3rem + 3.2vw, 6.6rem);
  font-weight: 400;
  line-height: 0.9;
  color: #17110d;
}

.project-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.82fr);
  gap: 44px;
  align-items: start;
}

.project-plan-viewer {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.project-plan-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.project-plan-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 620px;
}

.project-plan-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  margin: 0 auto;
}

.project-plan-placeholder {
  display: grid;
  place-items: center;
  width: min(100%, 720px);
  min-height: 420px;
  padding: 32px;
  margin: 0 auto;
  border: 1px solid rgba(46, 31, 20, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.6), rgba(225, 210, 193, 0.55)),
    repeating-linear-gradient(
      -45deg,
      rgba(140, 116, 96, 0.08) 0,
      rgba(140, 116, 96, 0.08) 16px,
      rgba(255, 252, 247, 0.08) 16px,
      rgba(255, 252, 247, 0.08) 32px
    );
  box-shadow: 0 18px 36px rgba(43, 28, 16, 0.08);
  text-align: center;
}

.project-plan-placeholder p {
  margin: 0;
  max-width: 18rem;
  font-family: "Viaoda", serif;
  font-size: clamp(1.2rem, 1.05rem + 0.45vw, 1.6rem);
  line-height: 1.35;
  color: rgba(46, 31, 20, 0.8);
}

.project-plan-button {
  width: 64px;
  height: 64px;
  border: none;
  background: transparent;
  color: #c9331d;
  font-size: 5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: transform 0.25s ease, color 0.25s ease;
}

.project-plan-button:hover,
.project-plan-button:focus-visible {
  background: transparent;
  color: #a82614;
  transform: translateY(-1px);
}

.project-info {
  padding-top: 48px;
  min-width: 0;
}

.project-info h2 {
  display: inline-block;
  margin: 0 0 18px;
  padding: 0;
  background: transparent;
  font-family: "Custodia Deco", serif;
  font-size: clamp(2rem, 1.6rem + 1vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
}

.project-info-list {
  padding-top: 16px;
  border-top: 1px solid rgba(46, 31, 20, 0.45);
}

.project-info-list p {
  margin: 0 0 12px;
  font-family: "Viaoda", serif;
  font-size: clamp(1.18rem, 1.02rem + 0.3vw, 1.55rem);
  line-height: 1.38;
}

.project-info-list span {
  font-family: "Marianna", cursive;
  font-size: 1.45em;
  line-height: 0.9;
}

.project-info-list p:nth-child(4) {
  white-space: nowrap;
}

.project-floor-label {
  margin: 10px 0 0;
  font-family: "Custodia Deco", serif;
  font-size: clamp(1.35rem, 1.15rem + 0.4vw, 1.8rem);
  text-align: center;
}

.project-plan-meta p {
  margin: 0;
  font-family: "Viaoda", serif;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.45rem);
}

.project-page-back {
  display: inline-block;
  margin-top: 34px;
  padding: 12px 22px;
  text-decoration: none;
  border: 1px solid rgba(46, 31, 20, 0.7);
  font-family: "Custodia Deco", serif;
  font-size: 1rem;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.project-page-back:hover,
.project-page-back:focus-visible {
  background: #2e1f14;
  color: #fffaf6;
  transform: translateY(-1px);
}

.project-gallery {
  width: 100%;
  margin-top: 44px;
}

.project-gallery-section + .project-gallery-section {
  margin-top: 54px;
}

.project-gallery-section h2 {
  margin: 0 0 22px;
  text-align: center;
  font-family: "Custodia Deco", serif;
  font-size: clamp(2.1rem, 1.8rem + 1vw, 3.2rem);
  font-weight: 400;
}

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project-gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(255, 252, 247, 0.5);
  box-shadow: 0 14px 28px rgba(43, 28, 16, 0.08);
}

#services {
  max-width: 1120px;
  margin: 0 auto;
}

#services h2 {
  margin: 0 0 36px;
  text-align: center;
  font-family: "Viaoda", serif;
  font-size: clamp(2.6rem, 2.15rem + 1.7vw, 4.1rem);
  font-weight: 400;
}

.services-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.services-list li {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 20px 0;
  font-size: 1.2rem;
  line-height: 1.4;
  text-align: center;
}

.services-list li > span:first-child {
  width: min(100%, 760px);
  text-align: left;
}

.decor-letter {
  font-family: "Marianna", cursive;
  font-size: 1.85em;
  line-height: 0.7;
}

.circle {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(25, 21, 17, 0.78);
  border-radius: 50%;
}

footer {
  padding: 28px 24px 40px;
  text-align: center;
  color: rgba(25, 21, 17, 0.65);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .site-header {
    padding-top: 18px;
  }

  .main-nav {
    column-gap: 12px;
  }

  .hero {
    padding-bottom: 48px;
  }

  .hero-frame {
    border-radius: 28px;
  }

  .hero-title-panel {
    padding: 8px 12px 6px;
  }

  .hero-lines {
    right: 10%;
    gap: 10px;
  }

  .top-bar,
  .intro-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .slogan {
    font-size: clamp(2.5rem, 2rem + 2vw, 3.6rem);
    text-align: left;
    max-width: 100%;
  }

  .intro-photo {
    width: min(100%, 520px);
  }

  .intro-text h3,
  .intro-text h2 {
    font-size: clamp(2.4rem, 1.9rem + 2vw, 3.6rem);
  }

  .intro-text p {
    font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-slot {
    display: none;
  }

  .project-plan-viewer {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
  }

  .project-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .project-page-title {
    text-align: center;
  }

  .project-info {
    padding-top: 0;
  }

  .project-plan-stage {
    min-height: auto;
  }

  .project-plan-button {
    width: 52px;
    height: 52px;
    font-size: 4rem;
  }

  .project-info-list p:nth-child(4) {
    white-space: normal;
  }

  .project-gallery-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 620px) {
  .site-header,
  #about,
  #services,
  #projects,
  #pricing,
  #contacts,
  footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .main-nav {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
    transform: none;
  }

  .main-nav a:nth-child(1),
  .main-nav a:nth-child(2),
  .main-nav a:nth-child(3),
  .main-nav a:nth-child(4),
  .main-nav a:nth-child(5) {
    justify-self: center;
    margin: 0;
  }

  .main-nav a {
    font-size: 1.2rem;
    letter-spacing: 0.02em;
  }

  .main-nav .nav-script {
    font-size: 1.3rem;
  }

  .hero-frame {
    border-radius: 22px;
  }

  .hero-image {
    aspect-ratio: 0.84;
  }

  .hero-title-panel {
    top: auto;
    bottom: 22px;
    transform: none;
    left: 12px;
    right: 12px;
    padding: 6px 10px 5px;
    border: 1px solid var(--panel-border);
  }

  .hero-title-panel h1 {
    font-size: clamp(3.3rem, 11vw, 5rem);
    line-height: 0.9;
    transform: scaleY(1.04);
  }

  .hero-lines {
    top: 18px;
    right: 18px;
    gap: 8px;
  }

  .services-list li {
    align-items: flex-start;
  }

  .pricing-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 16px;
  }

  .pricing-item span {
    white-space: normal;
  }

  .pricing-note {
    margin-top: -2px;
    padding-left: 0;
  }
}
