/* Arkitekt — сайт Олександри Ужеліної. Apple-подобная сетка, тёплая палитра «пісок» */

:root {
  --bg: #fbf8f3;
  --alt: #f3ede4;
  --tile: #f0e9de;
  --ink: #2b2520;
  --ink-soft: #4d453d;
  --muted: #8a7f72;
  --line: #ddd3c5;
  --accent: #a4532b;
  --accent-hover: #b45d32;
  --on-accent: #ffffff;
  --header: rgba(251, 248, 243, .82);
  --contact: #2b2520;
  --contact-ink: #f3ede4;
}

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.47 var(--font);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; line-height: 1.07; margin: 0; letter-spacing: -0.028em; }
h1 { font-size: clamp(40px, 7vw, 80px); letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 5vw, 56px); }
h3 { font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
.center { text-align: center; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Header: тонкая полупрозрачная полоса */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 52px; }
.brand { text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.nav { display: flex; gap: clamp(18px, 3vw, 32px); }
.nav a { text-decoration: none; font-size: 13px; color: var(--ink-soft); opacity: .85; transition: opacity .2s, color .2s; }
.nav a:hover, .nav a.is-active { opacity: 1; color: var(--ink); }

/* Buttons: «пилюли» и синие ссылки со стрелкой */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  background: var(--accent); color: var(--on-accent);
  border: 1px solid var(--accent); border-radius: 980px;
  font: 500 17px/1 var(--font); letter-spacing: -0.01em; text-decoration: none;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent); color: var(--on-accent); }
.link-arrow { color: var(--accent); text-decoration: none; font-size: 17px; }
.link-arrow:hover { text-decoration: underline; }

/* Hero: текст по центру, большой снимок со скруглением */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(48px, 7vw, 88px); text-align: center; }
.eyebrow { display: block; line-height: 1.3; font-size: 17px; font-weight: 600; color: var(--accent); margin-bottom: 12px; letter-spacing: -0.01em; }
.hero h1 { max-width: 12em; margin: 0 auto 20px; }
.lead { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.35; color: var(--muted); max-width: 32em; margin: 0 auto 32px; letter-spacing: -0.015em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: center; align-items: center; }
.hero-media { display: block; margin-top: clamp(40px, 6vw, 72px); text-decoration: none; position: relative; }
.hero-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); background: var(--tile); }
.hero-caption { display: block; margin-top: 14px; font-size: 14px; color: var(--muted); }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding-top: 0; }
.section-alt { background: var(--alt); }
.section-head { text-align: center; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--muted); font-size: clamp(19px, 2vw, 21px); max-width: 30em; margin: 14px auto 0; }

.page-head { text-align: center; padding-bottom: clamp(32px, 5vw, 56px); }
.page-head h1 { font-size: clamp(36px, 6vw, 64px); max-width: 14em; margin: 0 auto; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.crumbs a { text-decoration: none; color: var(--accent); }
.crumbs a:hover { text-decoration: underline; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.h1-place { display: block; margin-top: 10px; font-size: .45em; font-weight: 500; letter-spacing: -0.015em; color: var(--muted); }
.page-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin: 16px 0 0; color: var(--muted); font-size: 19px; }
.page-meta span + span::before { content: "·"; margin-right: 10px; }
.intro { margin: 18px auto 0; max-width: 32em; font-size: 21px; color: var(--muted); }
.page-head p:has(.btn) { margin-top: 28px; }

/* Плитки проектов на главной */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 40px; }
.tile {
  display: flex; flex-direction: column; text-decoration: none; text-align: center;
  background: var(--tile); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.tile:hover { transform: translateY(-4px); }
.tile-text { display: block; padding: 40px 28px 26px; }
.tile-name { display: block; margin: 0; font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; }
.tile-meta { display: block; margin-top: 6px; color: var(--muted); font-size: 17px; }
.tile-link { display: inline-block; margin-top: 12px; color: var(--accent); font-size: 17px; }
.tile:hover .tile-link { text-decoration: underline; }
.tile-img { display: block; margin: auto 28px 0; border-radius: var(--r-sm) var(--r-sm) 0 0; overflow: hidden; }
.tile-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.tile.is-private { opacity: .55; }

/* Карточки на /portfolio */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 20px; }
.card { text-decoration: none; display: block; }
.card-img { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--tile); border-radius: var(--r-md); margin-bottom: 14px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-img img { transform: scale(1.04); }
.card-name { display: block; margin: 0; font-size: 21px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.card:hover .card-name { color: var(--accent); }
.card-meta { display: block; margin-top: 4px; font-size: 15px; color: var(--muted); }
.card.is-private { opacity: .55; }
.card-name em { font-size: 14px; font-style: normal; font-weight: 400; color: var(--muted); }

/* Про мене */
.about { text-align: center; max-width: 820px; margin: 0 auto clamp(48px, 7vw, 80px); }
.statement { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; font-weight: 600; letter-spacing: -0.022em; color: var(--ink); }
.statement p:last-child { margin-bottom: 0; }
.statement p + p { color: var(--muted); }
.prose { font-size: 17px; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--accent); }
.prose h2, .prose h3 { color: var(--ink); margin: 1.4em 0 .5em; }
.prose.narrow { max-width: 42em; }
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.services li { background: var(--bg); border-radius: var(--r-md); padding: 32px 28px; }
.services-num { display: block; font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 18px; }
.services h3 { margin-bottom: 10px; }
.services p { margin: 0; color: var(--muted); font-size: 16px; }

/* Галерея проекта: ряды одинаковой высоты, ширина плитки пропорциональна кадру (--r = ширина / высота) */
.project-body > p { max-width: 36em; margin: 0 auto 40px; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.4; color: var(--muted); text-align: center; }
.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.gallery::after { content: ""; flex-grow: 999999; }
.gallery-item {
  flex: calc(var(--r) * 1000) 1 calc(var(--r) * 210px);
  display: block; overflow: hidden; background: var(--tile); border-radius: var(--r-sm); cursor: zoom-in;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .2s; }
.gallery-item:hover img { transform: scale(1.03); }

/* Соседние проекты */
.pager-in { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pager-link { display: flex; align-items: center; gap: 18px; text-decoration: none; background: var(--tile); border-radius: var(--r-md); padding: 14px; }
.pager-next { flex-direction: row-reverse; text-align: right; }
.pager-link img { width: 112px; aspect-ratio: 4 / 3; object-fit: cover; flex: none; border-radius: var(--r-sm); }
.pager-link small { display: block; font-size: 14px; color: var(--accent); margin-bottom: 4px; }
.pager-link strong { font-weight: 600; font-size: 19px; line-height: 1.2; letter-spacing: -0.02em; }

/* Контакти і футер */
.contact { background: var(--contact); color: var(--contact-ink); padding: clamp(72px, 10vw, 128px) 0; text-align: center; }
.contact h2 { margin-bottom: 18px; }
.contact p { max-width: 32em; margin: 0 auto; font-size: clamp(19px, 2vw, 21px); opacity: .7; }
.contact .contact-action { opacity: 1; margin-top: 32px; }
.contact .contact-mail { margin-top: 16px; font-size: 15px; opacity: .6; }
.site-footer { background: var(--contact); color: var(--muted); font-size: 12px; }
.footer-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; border-top: 1px solid var(--line); }
.site-footer { color: var(--contact-ink); opacity: .9; }
.footer-in { border-top-color: rgba(255,255,255,.12); }
.contact .btn { background: var(--contact-ink); border-color: var(--contact-ink); color: var(--contact); }

/* GLightbox */
.goverlay { background: rgba(0, 0, 0, .92); }

/* Responsive */
@media (max-width: 900px) {
  .tiles { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-in { gap: 12px; }
  .brand { font-size: 15px; white-space: nowrap; }
  .nav { gap: 14px; }
  .nav a { white-space: nowrap; }
  .nav a { font-size: 12px; }
  .hero-media img { aspect-ratio: 4 / 3; border-radius: var(--r-md); }
  .tile { border-radius: var(--r-md); }
  .tile-text { padding: 28px 20px 20px; }
  .tile-img { margin: auto 16px 0; }
  .grid { grid-template-columns: 1fr; }
  .pager-in { grid-template-columns: 1fr; }
  .pager-next { flex-direction: row; text-align: left; }
  .pager-link img { width: 88px; }
  .gallery { gap: 6px; }
  .gallery-item { flex-basis: calc(var(--r) * 105px); border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
