:root {
  --bg: #f6f2f8;
  --surface: #ffffff;
  --ink: #2b2433;
  --muted: #6e6478;
  --line: #e4dceb;
  --primary: #6a4c86;
  --primary-hover: #5b3f75;
  --deep: #3d2a52;
  --accent: #8b6aa8;
  --soft: #ede6f3;
  --radius: 10px;
  --header-h: 76px;
  --max: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font-family: "Capo_Sfogliato", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: "Capo_Sfogliato", Georgia, serif;
  font-weight: 500;
  color: var(--deep);
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--deep);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #fff;
}

.brand-name {
  font-family: "Capo_Sfogliato", Georgia, serif;
  font-size: 1.05rem;
  font-weight: bold;
  line-height: 1.2;
  color: var(--deep);
}

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

.nav a {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--deep);
  background: var(--soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-phone {
  color: var(--deep);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 4px auto;
  background: var(--deep);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
}

.btn:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--deep);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--soft);
}

.btn-light {
  background: #fff;
  color: var(--deep);
}

.btn-light:hover {
  background: var(--soft);
}

.hero {
  padding: 48px 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  margin-top: 16px;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.photo {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--soft);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 28px;
}

.section-head p {
  margin-top: 10px;
  color: var(--muted);
}

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

.gallery figure,
.works figure {
  margin: 0;
}

.gallery .photo {
  aspect-ratio: 3 / 4;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.cards-2,
.cards-3 {
  display: grid;
  gap: 14px;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card p {
  margin-top: 10px;
  color: var(--muted);
}

.why-item {
  padding: 20px 20px 22px;
  background: var(--surface);
  border-top: 2px solid var(--primary);
}

.why-item p {
  margin-top: 8px;
  color: var(--muted);
}

.works {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.works .photo {
  aspect-ratio: 3 / 5;
}

.contacts-grid {
  display: grid;
  gap: 32px;
  align-items: start;
  margin-bottom: 30px;
}

.contact-list {
  display: grid;
  gap: 18px;
  margin: 0;
}

.contact-list dt {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 0;
}

.contact-list a {
  color: var(--deep);
  text-decoration: none;
  font-weight: 600;
}

.contact-list a:hover {
  color: var(--primary);
}

.maps-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}

.maps {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.maps iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}

.map-frame {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--soft);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}

.map-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  font-size: 0.92rem;
}

.page-hero {
  padding: 48px 0 8px;
}

.page-hero p {
  margin-top: 12px;
  max-width: 40rem;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.split .photo {
  aspect-ratio: 3 / 4;
}

.site-footer {
  margin-top: auto;
  background: var(--deep);
  color: #e8ddf0;
  padding: 28px 0;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.6;
}

.site-footer p + p {
  margin-top: 6px;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

@media (max-width: 860px) {
  .hero-grid,
  .contacts-grid,
  .split,
  .cards-2,
  .cards-3,
  .gallery,
  .works {
    grid-template-columns: 1fr;
  }

  .nav,
  .header-phone {
    display: none;
  }

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

  .nav.is-open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 12px 20px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  
  .works .photo {
    aspect-ratio: 3 / 4;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(var(--max), calc(100% - 28px));
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .section {
    padding: 48px 0;
  }
}

.more summary {
  cursor: pointer;
  list-style: none;
  color: #0066cc;
  font-weight: 600;
}
.more summary::-webkit-details-marker { display: none; }

.content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
  overflow: hidden;
}

.content > div {
  overflow: hidden;
}

.more[open] .content {
  grid-template-rows: 1fr;
}