/* =========================================================
   Арчабиль — стиль
   Палитра: песок предгорий, терракота, охра, можжевельник,
   ковровый красный. Орнамент — туркменский гёль.
   ========================================================= */

:root {
  --sand: #f3ead9;
  --sand-2: #e9dcc3;
  --paper: #fbf6ec;
  --ink: #1d2b2a;
  --ink-2: #44524f;
  --juniper: #2e4a40;
  --terra: #b5532d;
  --ochre: #d9a441;
  --carpet: #8c2f2a;
  --apricot: #e8a87c;

  /* небо (меняется по времени в Арчабиле) */
  --sky-top: #8fc3e0;
  --sky-bottom: #f6e3c2;
  --sun: #fff1c9;
  --m1: #b9a2a0;
  --m2: #9a7466;
  --m3: #6d4c3d;
  --m4: #2e3a34;
  --tree: #2b4038;
  --star-o: 0;
  --hero-ink: #1d2b2a;

  --serif: "Cormorant", "Georgia", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 18px;
  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 48px);
}

html[data-phase="dawn"] {
  --sky-top: #6f7fb2; --sky-bottom: #f5b38a; --sun: #ffcf9e;
  --m1: #a7899a; --m2: #7d5e6c; --m3: #553e46; --m4: #2b2a30; --tree: #2b2f30;
  --star-o: .25; --hero-ink: #1d1a22;
}
html[data-phase="dusk"] {
  --sky-top: #3c2c56; --sky-bottom: #e7825a; --sun: #ffb27a;
  --m1: #8b5a68; --m2: #6a3f4c; --m3: #472a35; --m4: #221a20; --tree: #1d181c;
  --star-o: .45; --hero-ink: #fbf0e2;
}
html[data-phase="night"] {
  --sky-top: #0d1430; --sky-bottom: #2a3560; --sun: #f4e7c3;
  --m1: #2f3a5e; --m2: #232c4a; --m3: #182037; --m4: #0e1322; --tree: #0b0f1b;
  --star-o: 1; --hero-ink: #f3ead9;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--sand); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; }

/* ---------- кнопки ---------- */
.btn {
  --b: var(--terra);
  display: inline-flex; align-items: center; gap: .5em;
  padding: .9em 1.6em;
  border: 2px solid var(--b); border-radius: 999px;
  background: var(--b); color: var(--paper);
  font: 600 .95rem/1 var(--sans); letter-spacing: .02em;
  text-decoration: none; cursor: pointer;
  transition: transform .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); background: var(--carpet); border-color: var(--carpet); }
.btn--ghost { background: transparent; color: currentColor; border-color: currentColor; }
.btn--ghost:hover { color: inherit; background: rgba(255,255,255,.15); border-color: currentColor; }
.btn--small { padding: .65em 1.15em; font-size: .85rem; }

/* ---------- шапка ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gut);
  color: var(--hero-ink);
  transition: background .3s, color .3s, box-shadow .3s, padding .3s;
}
.top.is-solid {
  background: rgba(243, 234, 217, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(29,43,42,.08);
  padding-block: 10px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 34px; height: 34px; color: var(--carpet); --mark-in: var(--sand); }
.brand__name { font: 700 1.55rem/1 var(--serif); letter-spacing: .02em; }
.nav { display: flex; gap: clamp(14px, 2vw, 30px); }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; padding: 4px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--terra); transition: right .25s; }
.nav a:hover::after { right: 0; }
.top__right { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; border: 1.5px solid currentColor; border-radius: 999px; overflow: hidden; }
.lang button {
  background: none; border: 0; color: inherit; cursor: pointer;
  font: 600 .75rem/1 var(--sans); letter-spacing: .06em; padding: 7px 10px;
}
.lang button[aria-pressed="true"] { background: var(--terra); color: var(--paper); }
.burger { display: none; width: 42px; height: 42px; border: 0; background: none; color: inherit; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor; transition: transform .25s, top .25s; }
.burger span:first-child { top: 16px; } .burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .burger { display: block; }
  .top .btn--small { display: none; }
  .nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: center; gap: 26px;
    background: var(--ink); color: var(--sand);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav a { font: 600 2rem/1 var(--serif); }
  .nav.is-open { opacity: 1; visibility: visible; }
  body.menu-open .top { color: var(--sand); background: transparent; box-shadow: none; }
}
@media (max-width: 420px) {
  .brand__name { font-size: 1.3rem; }
  .lang button { padding: 7px 8px; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh; min-height: 100vh;
  display: grid; place-items: center;
  overflow: hidden; color: var(--hero-ink); isolation: isolate;
  background: var(--sky-bottom);
}
@supports (min-height: 100svh) { .hero { min-height: 100svh; } }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.sky .sky-top { stop-color: var(--sky-top); transition: stop-color 1.5s; }
.sky .sky-bottom { stop-color: var(--sky-bottom); transition: stop-color 1.5s; }
.sky .stars { fill: #fff; opacity: var(--star-o); transition: opacity 1.5s; }
.sky .stars circle { animation: twinkle 4s ease-in-out infinite; }
.sky .stars circle:nth-child(3n) { animation-delay: -1.3s; }
.sky .stars circle:nth-child(3n+1) { animation-delay: -2.6s; }
@keyframes twinkle { 50% { opacity: .35; } }
.sky .disc { fill: var(--sun); transition: fill 1.5s; }
.sky .m { transition: fill 1.5s; will-change: transform; }
.sky .m1 { fill: var(--m1); } .sky .m2 { fill: var(--m2); } .sky .m3 { fill: var(--m3); } .sky .m4 { fill: var(--m4); }
.sky .junipers { fill: var(--tree); transition: fill 1.5s; }
.sky [data-depth] { will-change: transform; }

.hero__inner {
  text-align: center; padding: 120px var(--gut) 180px; max-width: 980px;
}
.eyebrow {
  display: inline-block; font-weight: 600; font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  padding: 8px 16px; border: 1.5px solid currentColor; border-radius: 999px; margin-bottom: 26px;
}
.hero__title { margin: 0 0 .25em; font-size: clamp(4rem, 15vw, 12.5rem); line-height: .9; font-weight: 700; letter-spacing: -.03em; }
.hero__word { display: inline-block; }
.hero__word .ch { display: inline-block; opacity: 0; transform: translateY(.4em) rotate(4deg); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero__lead { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 640px; margin: 0 auto 32px; }
@media (max-width: 520px) { .eyebrow { letter-spacing: .12em; font-size: .7rem; padding: 7px 12px; } }
.hero__lead, .hero__title { text-shadow: 0 1px 18px color-mix(in srgb, var(--sky-bottom) 55%, transparent); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.now {
  position: absolute; left: var(--gut); bottom: 26px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(251,246,236,.88); color: var(--ink);
  font-size: .85rem; box-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.now__dot { width: 8px; height: 8px; border-radius: 50%; background: #3fae6b; box-shadow: 0 0 0 0 rgba(63,174,107,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(63,174,107,0); } 100% { box-shadow: 0 0 0 0 rgba(63,174,107,0); } }
.now__phase { color: var(--terra); font-weight: 600; }
.now__phase::before { content: "· "; color: var(--ink-2); }

/* ---------- орнаментальная полоса ---------- */
.band {
  height: 42px;
  background-color: var(--carpet);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='42' viewBox='0 0 84 42'%3E%3Cpath d='M28 3h28l13 13v10L56 39H28L15 26V16Z' fill='%23d9a441'/%3E%3Cpath d='M42 9l12 12-12 12-12-12Z' fill='%238c2f2a'/%3E%3Cpath d='M42 15l6 6-6 6-6-6Z' fill='%23f3ead9'/%3E%3Cpath d='M0 21l7-7 7 7-7 7ZM70 21l7-7 7 7-7 7Z' fill='%231d2b2a'/%3E%3C/svg%3E");
  background-size: 84px 42px; background-repeat: repeat-x; background-position: center;
  border-block: 4px solid var(--ink);
}
.band--thin { height: 24px; background-size: 48px 24px; border-width: 3px; }

/* ---------- секции ---------- */
.section { padding: clamp(72px, 11vw, 150px) var(--gut); }
.section > * { max-width: var(--wrap); margin-inline: auto; }
.kicker, .section .kicker {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700; font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; color: var(--terra);
}
.kicker::before { content: ""; width: 14px; height: 14px; background: currentColor; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.section__head { margin-bottom: clamp(36px, 6vw, 64px); }
.section__lead { font-size: 1.15rem; color: var(--ink-2); max-width: 620px; }

/* about */
.about { background: var(--paper); }
.about__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.about__text p { font-size: 1.1rem; color: var(--ink-2); }
.about__text p:first-of-type::first-letter {
  float: left; font: 700 4.6em/.8 var(--serif); color: var(--carpet); margin: .06em .1em 0 0;
}
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--sand-2); border-radius: var(--radius); overflow: hidden; }
.facts li { background: var(--paper); padding: 26px 22px; display: flex; flex-direction: column; gap: 6px; }
.facts b { font: 700 3rem/1 var(--serif); color: var(--juniper); }
.facts span { font-size: .92rem; color: var(--ink-2); }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; } }

/* rooms — арочные окна */
.arches { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2.4vw, 30px); }
.arch { display: flex; flex-direction: column; }
.arch__window {
  position: relative; aspect-ratio: 300 / 380;
  border-radius: 999px 999px 10px 10px;
  overflow: hidden;
  border: 10px solid var(--tone);
  box-shadow: inset 0 0 0 3px var(--paper), 0 20px 40px -24px rgba(29,43,42,.6);
  background: var(--tone);
}
.arch__window svg { width: 100%; height: 100%; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.arch:hover .arch__window svg { transform: scale(1.07); }
.arch__window::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(transparent 49.5%, rgba(251,246,236,.55) 49.5%, rgba(251,246,236,.55) 50.5%, transparent 50.5%),
              linear-gradient(90deg, transparent 49.3%, rgba(251,246,236,.55) 49.3%, rgba(251,246,236,.55) 50.7%, transparent 50.7%);
}
.arch__body { padding: 22px 4px 0; }
.arch__body p { color: var(--ink-2); font-size: .98rem; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: .78rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--paper); border: 1px solid var(--sand-2); }
.note { margin-top: 40px; text-align: center; color: var(--ink-2); font-style: italic; font-family: var(--serif); font-size: 1.3rem; }
@media (max-width: 1080px) { .arches { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .arches { grid-template-columns: 1fr; } .arch__window { max-width: 340px; width: 100%; margin-inline: auto; } }

/* days — таймлайн на тёмном */
.days { background: var(--ink); color: var(--sand); position: relative; overflow: hidden; }
.days::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 480px; height: 480px; opacity: .07;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M16 2h16l14 14v16L32 46H16L2 32V16Z' fill='%23f3ead9'/%3E%3Cpath d='M24 9l15 15-15 15L9 24Z' fill='%231d2b2a'/%3E%3Cpath d='M24 16l8 8-8 8-8-8Z' fill='%23f3ead9'/%3E%3C/svg%3E") center/contain no-repeat;
}
.section__head--light .kicker { color: var(--ochre); }
.timeline { list-style: none; padding: 0; margin: 0 auto; position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 130px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--apricot), var(--ochre), #6f7fb2); }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 60px; padding: 22px 0; position: relative; opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.timeline li.is-in { opacity: 1; transform: none; }
.timeline li::before { content: ""; position: absolute; left: 123px; top: 32px; width: 16px; height: 16px; background: var(--ochre); transform: rotate(45deg); box-shadow: 0 0 0 5px var(--ink); }
.timeline time { font: 600 1.6rem/1.2 var(--serif); color: var(--apricot); text-align: right; padding-right: 8px; padding-top: 4px; }
.timeline h3 { color: var(--paper); margin-bottom: .3em; }
.timeline p { color: #c9c3b4; margin: 0; max-width: 560px; }
@media (max-width: 600px) {
  .timeline::before { left: 7px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; padding-left: 36px; }
  .timeline li::before { left: 0; top: 30px; }
  .timeline time { text-align: left; font-size: 1.3rem; }
}

/* table — кухня */
.table { background: var(--sand); }
.table__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.table__grid > div p { color: var(--ink-2); font-size: 1.1rem; }
.dishes { list-style: none; margin: 0; padding: clamp(24px, 4vw, 44px); background: var(--paper); border-radius: var(--radius); border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--ochre); }
.dishes li { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--sand-2); }
.dishes li:last-child { border-bottom: 0; }
.dish__name { font: 600 1.6rem/1.1 var(--serif); color: var(--carpet); white-space: nowrap; }
.dish__dots { flex: 1; border-bottom: 2px dotted var(--ink-2); opacity: .35; transform: translateY(-4px); min-width: 20px; }
.dish__desc { color: var(--ink-2); font-size: .95rem; text-align: right; max-width: 55%; }
@media (max-width: 860px) { .table__grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .dishes li { flex-wrap: wrap; } .dish__dots { display: none; } .dish__desc { text-align: left; max-width: none; width: 100%; } }

/* road */
.road { background: var(--paper); }
.route { background: var(--sand); border-radius: var(--radius); padding: clamp(18px, 3vw, 36px); margin-bottom: 30px; }
.route__map { width: 100%; height: auto; }
.route__hills { fill: var(--sand-2); }
.route__line { fill: none; stroke: var(--terra); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 12; }
.route__line.draw { animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.route__pt circle { fill: var(--ink); } .route__pt .in { fill: var(--sand); }
.route__pt--end circle { fill: var(--carpet); }
.route__labels { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 10px; }
.route__labels div { display: flex; flex-direction: column; }
.route__labels b { font: 600 1.5rem/1.1 var(--serif); }
.route__labels span { font-size: .88rem; color: var(--ink-2); }
.route__mid { text-align: center; } .route__labels div:last-child { text-align: right; }
.road__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { padding: 28px; border-radius: var(--radius); background: var(--sand); border-top: 6px solid var(--juniper); }
.card:nth-child(2) { border-color: var(--terra); } .card:nth-child(3) { border-color: var(--ochre); }
.card p { color: var(--ink-2); margin: 0; }
@media (max-width: 860px) { .road__cards { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .route__labels { grid-template-columns: 1fr; }
  .route__mid, .route__labels div:last-child { text-align: left; }
}

/* book */
.book { background: var(--juniper); color: var(--sand); }
.book .kicker { color: var(--ochre); }
.book__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.book__intro > p { color: #cfd8d2; font-size: 1.08rem; }
.contacts { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.contacts li { display: flex; flex-direction: column; padding-bottom: 14px; border-bottom: 1px solid rgba(243,234,217,.18); }
.contacts span { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ochre); }
.contacts a, .contacts b { font: 600 1.35rem/1.3 var(--serif); text-decoration: none; }
.contacts a:hover { color: var(--ochre); }

.form { background: var(--paper); color: var(--ink); padding: clamp(22px, 4vw, 40px); border-radius: var(--radius); display: grid; gap: 16px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.form input, .form select, .form textarea {
  width: 100%; font: 500 1rem/1.4 var(--sans); color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--sand-2); border-radius: 10px; background: #fff;
  text-transform: none; letter-spacing: 0;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--terra); outline: none; box-shadow: 0 0 0 3px rgba(181,83,45,.18); }
.form textarea { resize: vertical; }
.form__error { color: var(--carpet); font-weight: 600; margin: 0; }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form .btn--ghost { color: var(--juniper); }
@media (max-width: 860px) { .book__grid { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .form__row { grid-template-columns: 1fr; } }

/* footer */
.foot { background: var(--ink); color: var(--sand); }
.foot__inner { max-width: var(--wrap); margin: 0 auto; padding: 44px var(--gut); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot__inner p { margin: 0; color: #b9b3a5; }
.brand--foot .brand__mark { --mark-in: var(--ink); color: var(--ochre); }

/* появление при прокрутке */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .timeline li, .hero__word .ch { opacity: 1 !important; transform: none !important; }
}
