/* ─── Варіант 3 · «Темний преміум» ─── */
:root {
  --bg: #2B1F1D;
  --panel: #241A18;
  --panel-2: #382825;
  --text: #F5EADD;
  --muted: #C2A992;
  --accent: #D2A068;
  --line: rgba(245, 234, 221, .13);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", -apple-system, sans-serif;
}
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.65; font-size: 16px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; }
h2 { font-size: clamp(34px, 4.6vw, 54px); letter-spacing: .01em; }
h2 em, h1 em { font-style: italic; color: var(--accent); }
.label { font-size: 11.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--accent);
         font-weight: 600; margin-bottom: 20px; }
.sub { color: var(--muted); max-width: 540px; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }

/* Header */
.header { position: fixed; inset: 0 0 auto; z-index: 100; padding: 20px 0; transition: .3s; }
.header.scrolled { background: rgba(43, 31, 29, .88); -webkit-backdrop-filter: blur(14px);
                   backdrop-filter: blur(14px);
                   border-bottom: 1px solid var(--line); padding: 14px 0; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.brand div { line-height: 1.25; }
.brand b { font-family: var(--serif); font-size: 19px; letter-spacing: .14em; font-weight: 600; display: block; }
.brand span { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
         color: var(--muted); font-weight: 500; transition: .2s; }
.nav a:hover { color: var(--text); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 30px;
       border: 1px solid var(--accent); color: var(--accent); border-radius: 2px; text-decoration: none;
       font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; transition: .3s; }
.btn:hover { background: var(--accent); color: var(--bg); }
.btn.solid { background: var(--accent); color: var(--bg); }
.btn.solid:hover { background: var(--text); border-color: var(--text); }
.nav .btn { padding: 11px 22px; }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
        justify-content: center; text-align: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0;
  background: url("../assets/img/hero.webp") center / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(43, 31, 29, .55) 0%, rgba(43, 31, 29, .82) 100%); }
.hero-content { position: relative; z-index: 1; padding: 140px 24px 100px; max-width: 820px; }
.hero-content .label { margin-bottom: 26px; }
.hero-content h1 { font-size: clamp(42px, 6.6vw, 84px); margin-bottom: 24px; }
.hero-content p { color: rgba(245, 234, 221, .8); font-size: 17.5px; max-width: 480px; margin: 0 auto 38px; }
.hero-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; font-size: 12px;
             letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 42px; }
.hero-tags span:not(:last-child)::after { content: "—"; margin-left: 26px; color: var(--accent); }

/* Переваги */
.feats { border-bottom: 1px solid var(--line); }
.feats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.feat { padding: 44px 34px; border-left: 1px solid var(--line); }
.feat:first-child { border-left: none; }
.feat .n { font-family: var(--serif); font-size: 15px; color: var(--accent); display: block; margin-bottom: 16px; }
.feat h3 { font-size: 21px; margin-bottom: 10px; }
.feat p { font-size: 14px; color: var(--muted); }

/* About */
.about { padding: 130px 0; }
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: center; }
.about-photo { position: relative; }
.about-photo::before { content: ""; position: absolute; inset: 22px -22px -22px 22px;
                       border: 1px solid var(--accent); z-index: 0; opacity: .5; }
.about-photo img { position: relative; z-index: 1; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.about-text h2 { margin-bottom: 26px; }
.about-text p { color: var(--muted); margin-bottom: 16px; }
.about-text p.lead { color: var(--text); font-size: 19px; font-family: var(--serif); font-style: italic; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 90px;
         padding-top: 54px; border-top: 1px solid var(--line); text-align: center; }
.stat { padding: 8px 24px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-size: clamp(44px, 4.6vw, 66px); color: var(--accent);
          font-weight: 500; line-height: 1; margin-bottom: 10px; }
.stat span { font-size: 14px; color: var(--muted); }
.contract { margin-top: 80px; border: 1px solid var(--line); padding: 36px 44px; display: flex;
            align-items: center; gap: 30px; flex-wrap: wrap; background: var(--panel); }
.contract svg { color: var(--accent); flex: none; }
.contract .grow { flex: 1 1 300px; }
.contract h3 { font-size: 24px; margin-bottom: 6px; }
.contract p { font-size: 14.5px; color: var(--muted); }
.alink { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--accent);
         text-decoration: none; border-bottom: 1px solid rgba(210, 160, 104, .4); padding-bottom: 4px;
         transition: .2s; white-space: nowrap; }
.alink:hover { border-color: var(--accent); }

/* Services */
.services { padding: 130px 0; background: var(--panel); border-block: 1px solid var(--line); }
.services-head { margin-bottom: 64px; }
.serv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
             border: 1px solid var(--line); }
.serv-card { background: var(--panel); padding: 38px 30px; display: flex; flex-direction: column; transition: .3s; }
.serv-card:hover { background: var(--panel-2); }
.serv-card .n { font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--accent);
                display: block; margin-bottom: 22px; }
.serv-card h3 { font-size: 24px; margin-bottom: 12px; }
.serv-card p { font-size: 14px; color: var(--muted); flex: 1; margin-bottom: 26px; }
.serv-price { font-family: var(--serif); font-size: 26px; color: var(--text); margin-bottom: 18px; }
.serv-price small { font-family: var(--sans); font-size: 13px; color: var(--muted); }
/* Process */
.process { padding: 130px 0; }
.process-head { margin-bottom: 70px; }
.wave { position: relative; }
.wave-svg { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 170px;
            color: var(--accent); }
.wave-grid { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); gap: 0 12px; }
.wstep { text-align: center; }
.wstep .num { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--accent);
              background: var(--bg); display: grid; place-items: center; margin: 0 auto 18px;
              font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--accent);
              position: relative; z-index: 1; transition: .3s; }
.wstep:hover .num { background: var(--accent); color: var(--bg); }
.wstep:nth-child(odd) { padding-top: 22px; }
.wstep:nth-child(even) { padding-top: 92px; }
.wstep h3 { font-size: 15px; margin-bottom: 8px; }
.wstep p { font-size: 12px; color: var(--muted); line-height: 1.5; }
.process-cta { text-align: center; margin-top: 70px; }

/* Кроки процесу проявляються по черзі, а пунктир малюється слідом за ними.
   Клас .in вішає initProcessPath() у js/site.js — коли доріжка входить у кадр,
   і знімає, коли виходить, тому каскад повторюється при кожному скролі до блоку. */
.wave .wstep { opacity: 0; transform: translateY(18px);
               transition: opacity .55s ease, transform .55s ease; }
.wave.in .wstep { opacity: 1; transform: none; }
@media (min-width: 1025px) {
  .wave .wstep:nth-child(1) { transition-delay: .10s; }
  .wave .wstep:nth-child(2) { transition-delay: .30s; }
  .wave .wstep:nth-child(3) { transition-delay: .50s; }
  .wave .wstep:nth-child(4) { transition-delay: .70s; }
  .wave .wstep:nth-child(5) { transition-delay: .90s; }
  .wave .wstep:nth-child(6) { transition-delay: 1.10s; }
  .wave .wstep:nth-child(7) { transition-delay: 1.30s; }
  .wave .wstep:nth-child(8) { transition-delay: 1.50s; }
}
.wave-svg { clip-path: inset(0 100% 0 0); }
.wave.in .wave-svg { animation: wave-draw 1.6s linear .2s forwards; }
@keyframes wave-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  .wave .wstep { opacity: 1; transform: none; transition: none; }
  .wave-svg, .wave.in .wave-svg { clip-path: none; animation: none; }
}
.result { margin-top: 90px; position: relative; overflow: hidden; }
.result img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.result::before { content: ""; position: absolute; inset: 0;
                  background: linear-gradient(95deg, rgba(43, 31, 29, .93) 30%, rgba(43, 31, 29, .55)); z-index: 1; }
.result-in { position: relative; z-index: 2; padding: 80px 70px; max-width: 620px; }
.result-in h2 { margin-bottom: 30px; }
.result-in li { list-style: none; display: flex; gap: 16px; margin-bottom: 16px; font-size: 16px;
                color: rgba(245, 234, 221, .88); }
.result-in li::before { content: "—"; color: var(--accent); }
.result-quote { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line);
                font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.5;
                color: var(--text); }

/* Projects */
.projects { padding: 130px 0; background: var(--panel); border-block: 1px solid var(--line); }
.projects-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 56px; }
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.proj-card { position: relative; cursor: pointer; overflow: hidden; }
.proj-thumb { aspect-ratio: 16 / 10.5; overflow: hidden; position: relative; }
.proj-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.proj-thumb::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(32, 22, 20, .85) 0%, rgba(32, 22, 20, .05) 45%); }
.proj-card:hover .proj-thumb img, .proj-card:focus-visible .proj-thumb img { transform: scale(1.06); }
.proj-open { position: absolute; top: 18px; right: 18px; z-index: 2; border: 1px solid rgba(245, 234, 221, .5);
             color: var(--text); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
             padding: 10px 18px; opacity: 0; transition: .3s; background: rgba(43, 31, 29, .5);
             -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.proj-card:hover .proj-open, .proj-card:focus-visible .proj-open { opacity: 1; }
.proj-info { position: absolute; left: 26px; right: 26px; bottom: 20px; z-index: 2; display: flex;
             align-items: baseline; justify-content: space-between; gap: 16px; }
.proj-info h3 { font-size: 26px; font-weight: 500; }
.proj-meta { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
             white-space: nowrap; }
.proj-card:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

/* Contact */
.contact { padding: 0 0 130px; }
.contact-panel { border: 1px solid var(--line); background: var(--panel); display: grid;
                 grid-template-columns: 1fr 1fr; }
.contact-info { padding: 64px 60px; border-right: 1px solid var(--line); }
.contact-info h2 { margin-bottom: 20px; }
.contact-info > p { color: var(--muted); margin-bottom: 44px; max-width: 400px; }
.contact-list { list-style: none; display: grid; gap: 2px; }
.contact-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px;
                  padding: 18px 2px; border-bottom: 1px solid var(--line); text-decoration: none;
                  color: var(--text); font-size: 16.5px; transition: .2s; }
.contact-list a:hover { color: var(--accent); }
.contact-list span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.form { padding: 64px 60px; display: grid; gap: 16px; align-content: start; }
.form input, .form select, .form textarea { background: var(--bg); border: 1px solid var(--line);
  padding: 15px 18px; color: var(--text); width: 100%; border-radius: 2px; transition: .2s; }
.form ::placeholder { color: rgba(194, 169, 146, .7); }
.form select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B59C89' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; }
.form select option { color: var(--text); background: var(--bg); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form textarea { min-height: 110px; resize: vertical; }
.form-ok { display: none; font-size: 14.5px; color: #E7C79B; }
.form-ok.show { display: block; }
/* Помилка відправки — тепла теракота, щоб не випадати з палітри */
.form-err { display: none; font-size: 14.5px; color: #E39A86; }
.form-err.show { display: block; }
.form.sending { opacity: .65; pointer-events: none; }

/* Пастка для ботів. Не display:none — частина ботів такі поля пропускає. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Було інлайн у index.html; винесено, щоб CSP обійшлась без 'unsafe-inline' */
.process-head .sub { margin: 16px auto 0; }
.process-cta .sub { margin: 0 auto 26px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 54px 0; text-align: center; }
.footer img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 22px; }
.footer-nav { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; margin-bottom: 22px; }
.footer-nav a { text-decoration: none; font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
                color: var(--muted); transition: .2s; }
.footer-nav a:hover { color: var(--text); }
.footer small { color: var(--muted); font-size: 12.5px; }

/* ─── Адаптивність ───
   Пороги: ≤1200 — ущільнене повне меню (при ~990px воно перестає вміщатись);
   ≤1024 — планшет: бургер-оверлей, 1 колонка процесу/про мене; ≤860 — великий телефон;
   ≤620 — телефон; окремо — дотикові екрани (hover: none) і низькі альбомні. */
@media (max-width: 1200px) {
  .nav { gap: 20px; }
  .nav .btn { padding: 11px 16px; }
}

/* Планшети */
@media (max-width: 1024px) {
  .about, .services, .process, .projects { padding: 100px 0; }
  .contact { padding: 0 0 100px; }

  .feats-grid { grid-template-columns: repeat(2, 1fr); }
  .feat:nth-child(3) { border-left: none; }
  .feat { border-top: 1px solid var(--line); }
  .feat:nth-child(-n+2) { border-top: none; }
  .serv-grid { grid-template-columns: repeat(2, 1fr); }

  .wave-svg { display: none; }
  .wave-grid { grid-template-columns: 1fr; gap: 34px; max-width: 460px; margin-inline: auto; }
  .wstep { position: relative; }
  .wstep:nth-child(odd), .wstep:nth-child(even) { padding-top: 0; }
  /* На вузькому екрані кроки читаються з руки, а не оком по сітці —
     15/12px там дрібні. Піднято до рівня основного тексту сайту. */
  .wstep h3 { font-size: 19px; margin-bottom: 6px; }
  .wstep p { font-size: 14.5px; line-height: 1.55; }
  .wstep:not(:last-child)::after { content: ""; position: absolute; left: 50%; top: 100%; height: 34px;
                                   border-left: 1px dashed var(--accent); opacity: .55; }

  .about-grid { grid-template-columns: 1fr; gap: 56px; }
  /* рамка-обвід виступає на 22px правіше за фото — резервуємо місце, інакше горизонтальний скрол */
  .about-photo { max-width: 420px; margin-right: 22px; }
  .contact-panel { grid-template-columns: 1fr; }
  .contact-info { border-right: none; border-bottom: 1px solid var(--line); }

  .nav { position: fixed; inset: 0; background: var(--bg); flex-direction: column; justify-content: center;
         gap: 28px; transform: translateX(100%); transition: transform .35s ease; z-index: 50; }
  .nav.open { transform: none; }
  .nav a { font-size: 17px; color: var(--text); }
  .nav .btn { padding: 15px 30px; color: var(--accent); margin-top: 12px; }
  .burger { display: flex; color: var(--text); }
}

/* Великі телефони / вузькі планшети */
@media (max-width: 860px) {
  .proj-grid { grid-template-columns: 1fr; }
  .projects-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 40px; }
  .result-in { padding: 60px 36px; max-width: none; }
  /* текст тут займає всю ширину кадру — скрим має тримати контраст по всій площі */
  .result::before { background: linear-gradient(180deg, rgba(43, 31, 29, .9), rgba(43, 31, 29, .68)); }
}

/* Телефони */
@media (max-width: 620px) {
  h2 { font-size: clamp(29px, 6vw, 34px); }
  .about, .services, .process, .projects { padding: 76px 0; }
  .contact { padding: 0 0 76px; }
  .services-head, .process-head { margin-bottom: 44px; }

  .hero-content { padding: 120px 20px 84px; }
  .hero-content .label { font-size: 11px; letter-spacing: .22em; }
  .hero-content h1 { font-size: clamp(36px, 11vw, 46px); }
  .hero-content p { font-size: 16px; margin-bottom: 30px; }
  .hero-tags { display: none; }

  .serv-grid, .feats-grid { grid-template-columns: 1fr; }
  /* переваги — «журнальний зміст» (обраний варіант 3 з mobile-options.html):
     великий курсивний номер збоку, компактні рядки */
  .feat { display: grid; grid-template-columns: 52px 1fr; column-gap: 18px; align-items: baseline;
          border-left: none; border-top: 1px solid var(--line); padding: 19px 24px; }
  .feat:first-child { border-top: none; }
  .feat:nth-child(2) { border-top: 1px solid var(--line); }
  .feat .n { grid-row: 1 / 3; font-style: italic; font-weight: 500; font-size: 30px; line-height: 1;
             text-align: right; margin-bottom: 0; }
  .feat h3 { font-size: 19px; margin-bottom: 5px; }
  .feat p { font-size: 14.5px; line-height: 1.5; }
  .serv-card { padding: 30px 24px; }
  .serv-card p { font-size: 15px; }

  /* «Про мене»: менше фото зліва, лейбл і заголовок поряд із ним,
     абзаци продовжуються під фото на всю ширину */
  .about-grid { display: block; }
  .about-photo { float: left; width: 45%; max-width: 210px; margin: 4px 24px 18px 0; }
  .about-photo::before { inset: 10px -10px -10px 10px; }
  .about-text::after { content: ""; display: block; clear: both; }
  /* заголовок трохи менший, щоб слова вміщались у колонку біля фото і на 320px */
  .about-text h2 { font-size: clamp(22px, 6.5vw, 29px); }
  /* цифри — «три в ряд» (обраний варіант 1 з mobile-options.html): колонки лишаються
     з базових стилів, лише менші цифри й підписи */
  .stats { margin-top: 56px; padding-top: 24px; }
  .stat { padding: 0 8px; }
  .stat b { font-size: 30px; margin-bottom: 8px; }
  .stat span { font-size: 12px; line-height: 1.35; }
  /* договір — «компактна панель» (обраний варіант 1 з mobile-options.html):
     іконка і заголовок в один рядок, текст менший */
  .contract { display: block; padding: 20px 22px 18px; margin-top: 48px; }
  .contract svg { width: 24px; height: 24px; float: left; margin: 1px 12px 0 0; }
  .contract h3 { font-size: 19px; margin-bottom: 8px; }
  .contract p { font-size: 14.5px; margin-bottom: 14px; }

  .process-cta { margin-top: 48px; }
  .result { margin-top: 60px; }
  .result-in { padding: 48px 26px; }
  .result-quote { font-size: 19px; margin-top: 30px; padding-top: 24px; }

  .proj-info { flex-direction: column; align-items: flex-start; gap: 4px; left: 18px; right: 18px; bottom: 16px; }
  .proj-info h3 { font-size: 21px; }
  .proj-meta { white-space: normal; }

  .contact-info, .form { padding: 40px 26px; }
  .contact-list a { flex-wrap: wrap; gap: 4px 16px; }

  .brand img { width: 38px; height: 38px; }
  .brand b { font-size: 16px; }
  .brand span { font-size: 9px; }
  .footer { padding: 44px 0; }
}

/* Дотикові екрани: hover немає, тож підказка на картці видима одразу */
@media (hover: none) {
  .proj-open { opacity: 1; }
}

/* Низькі альбомні екрани телефонів */
@media (max-height: 520px) and (orientation: landscape) {
  .hero-content { padding: 100px 24px 64px; }
  .hero-content h1 { font-size: clamp(32px, 5.6vw, 44px); }
}
