/* ============================================================
   СНІДАВКА — портал села. Родина Жива / Смерічник / Лада.
   Спільна мова: тепла крейдяна «папір»-основа, ніч кольору
   смерекової кори, мідь і сонячна охра, гуцульська геометрія,
   велика дисплейна типографіка. Снідавка — «сонячний» голос
   родини: більше світла й повітря, ніж у садибному Смерічнику.
   ============================================================ */

/* ---------- 1. Токени (родинні) ---------- */
:root {
  --paper:        #F7EBE6;
  --paper-warm:   #F0DFD7;
  --paper-deep:   #E7D2C7;
  --ink:          #33291F;
  --ink-soft:     #6B5A4B;
  --ink-faint:    #9A8878;
  --night:        #3B2E24;
  --night-deep:   #2A2018;
  --copper:       #B8794A;
  --copper-lit:   #D3A377;
  --sun:          #E9A13B;
  --forest:       #4E5C42;

  --line:         rgba(51, 41, 31, .16);
  --line-strong:  rgba(51, 41, 31, .32);
  --line-night:   rgba(226, 205, 187, .22);
  --cream:        #F5EFDF;

  --display: "Unbounded", "Trebuchet MS", sans-serif;
  --body:    "Onest", "Helvetica Neue", Arial, sans-serif;
  --serif:   "Cormorant Garamond", Georgia, serif;

  --pad-x:   clamp(1.15rem, 5vw, 5rem);
  --sect-y:  clamp(3rem, 8vw, 6.5rem);
  --measure: 46rem;
  --radius:  2px;
  --ease:    cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. База ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: clamp(1rem, .96rem + .3vw, 1.125rem);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.18;
  color: var(--night);
  text-wrap: balance;
}
h1 { font-size: clamp(1.55rem, 1.1rem + 2.3vw, 2.6rem); margin: 0 0 .6em; }
h2 { font-size: clamp(1.15rem, 1rem + .9vw, 1.5rem); margin: 2.2em 0 .7em; }
h3 { font-size: 1.05rem; margin: 0 0 .4em; }

/* гуцульський зигзаг-розділювач під h2 */
.place h2::after, .article h2::after, .weather h2::after {
  content: "";
  display: block;
  width: 4.5rem; height: 7px; margin-top: .45rem;
  background:
    repeating-linear-gradient(135deg,
      var(--copper) 0 5px, transparent 5px 10px),
    repeating-linear-gradient(45deg,
      var(--copper) 0 5px, transparent 5px 10px);
  background-size: 100% 4px, 100% 4px;
  background-position: 0 0, 0 3px;
  background-repeat: repeat-x;
  opacity: .75;
}

p { margin: 0 0 1em; max-width: var(--measure); }
a { color: var(--copper); text-underline-offset: .18em; }
a:hover { color: var(--night); }
ul { padding-left: 1.2em; }
img { max-width: 100%; height: auto; display: block; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--night); color: var(--cream); padding: .5em 1em;
}
.skip:focus { left: 0; z-index: 10; }

/* ---------- 3. Шапка (ніч, як у Лади) ---------- */
.hdr {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: .8rem var(--pad-x);
  background: var(--night);
  border-bottom: 3px solid var(--copper);
}
.brand img { width: 82px; height: 60px; object-fit: contain; }
.nav { display: flex; gap: 1.15rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--cream);
  font-size: .92rem; letter-spacing: .04em;
  padding: .2em 0; border-bottom: 2px solid transparent;
  opacity: .85;
  transition: opacity .2s var(--ease), border-color .2s var(--ease);
}
.nav a:hover { opacity: 1; color: var(--copper-lit); }
.nav a[aria-current="page"] { opacity: 1; border-color: var(--sun); }

main { padding: var(--sect-y) var(--pad-x); }

.ftr {
  margin-top: var(--sect-y);
  padding: 2rem var(--pad-x) 2.5rem;
  background: var(--night);
  color: rgba(245, 239, 223, .75); font-size: .9rem;
}
.ftr p { margin: 0 0 .3em; }
.ftr a { color: var(--copper-lit); }

/* ---------- 4. Головна ---------- */
.hero {
  position: relative;
  margin: calc(-1 * var(--sect-y)) calc(-1 * var(--pad-x)) var(--sect-y);
  min-height: clamp(24rem, 60vh, 38rem);
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--night);
}
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .82;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(42, 32, 24, .25) 0%,
    rgba(42, 32, 24, .05) 40%,
    rgba(42, 32, 24, .78) 100%);
}
.hero__inner {
  position: relative; z-index: 1;
  padding: 2.5rem var(--pad-x) 2.75rem;
  max-width: 52rem;
}
.hero h1 { color: var(--cream); text-shadow: 0 1px 14px rgba(42, 32, 24, .6); }
.hero .lead {
  color: rgba(245, 239, 223, .92);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1rem + .6vw, 1.35rem);
  font-style: italic;
}
.hero__promise {
  color: var(--sun); font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; font-size: .8rem;
  font-family: var(--body);
}
.more { font-weight: 500; }

/* ---------- 5. Картки ---------- */
.cards {
  list-style: none; padding: 0; margin: 1.25rem 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  background: rgba(255, 255, 255, .55);
  transition: border-color .2s var(--ease), transform .2s var(--ease),
              box-shadow .25s var(--ease);
}
.card:hover {
  border-color: var(--copper);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -18px rgba(51, 41, 31, .45);
}
.card h2, .card h3 { margin-top: 0; }
.card h2 a, .card h3 a { text-decoration: none; color: var(--night); }
.card h2 a:hover, .card h3 a:hover { color: var(--copper); }
.card p { font-size: .95rem; color: var(--ink-soft); margin: 0; }
.card__note {
  margin-top: .55rem !important;
  font-size: .78rem !important; color: var(--copper) !important;
  font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
}

/* ---------- 6. Сторінка пам'ятки ---------- */
.place .lead, .article .lead, .weather .lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem);
  color: var(--ink-soft);
}

.place__hero { margin: 1.75rem 0; max-width: var(--measure); }
.place__hero img {
  width: 100%; max-height: 30rem; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 18px 44px -28px rgba(42, 32, 24, .55);
}

.facts {
  display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.4rem;
  margin: 1.6rem 0; padding: 1.1rem 1.35rem;
  background: var(--paper-warm);
  border-left: 3px solid var(--sun);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: var(--measure);
}
.facts dt {
  font-weight: 500; color: var(--night);
  font-size: .85rem; letter-spacing: .05em; text-transform: uppercase;
  align-self: baseline; padding-top: .15em;
}
.facts dd { margin: 0; }

.unver {
  font-size: .74em; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 999px;
  padding: .06em .65em; white-space: nowrap; vertical-align: middle;
}

.external {
  margin: 1.6rem 0; padding: 1.1rem 1.3rem;
  border: 1px solid var(--copper);
  border-radius: var(--radius);
  background: rgba(184, 121, 74, .07);
  max-width: var(--measure);
}
.external a { font-weight: 500; }

.nearby ul { list-style: none; padding: 0; max-width: var(--measure); }
.nearby li { padding: .5em 0; border-bottom: 1px solid var(--line); }
.nearby li:last-child { border-bottom: 0; }
.nearby a { color: var(--night); font-weight: 500; }
.nearby a:hover { color: var(--copper); }

/* ---------- 7. Погода (нічний блок) ---------- */
.wx {
  margin: 1.4rem 0; padding: 1.2rem 1.35rem;
  background: var(--night-deep); color: var(--cream);
  border-radius: var(--radius);
  border-bottom: 3px solid var(--copper);
  max-width: var(--measure);
}
.wx .now { display: flex; align-items: baseline; gap: .75rem; margin: 0 0 .85rem; }
.wx .now strong { font-family: var(--display); font-size: 2rem; font-weight: 400; }
.wx .now .wind { color: rgba(245, 239, 223, .65); font-size: .9rem; }
.wx .days {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem;
  text-align: center; font-size: .82rem;
}
.wx .days .wd { display: block; color: rgba(245, 239, 223, .55); }
.wx .days .t { display: block; }
.wx-proxy {
  font-size: .88rem; color: var(--ink-faint);
  border-left: 3px solid var(--line-strong);
  padding-left: .9em; max-width: var(--measure);
}

/* ---------- 8. Відео ---------- */
.videos { max-width: var(--measure); }
.video { margin: 0 0 1.6rem; }
.video iframe {
  width: 100%; aspect-ratio: 16 / 9; border: 0;
  border-radius: var(--radius); background: var(--night-deep);
}
.video figcaption {
  font-size: .85rem; color: var(--ink-faint); margin-top: .4rem;
  font-family: var(--serif); font-style: italic;
}

/* ---------- 9. Адаптив ---------- */
@media (max-width: 620px) {
  .hdr { gap: .6rem; }
  .brand img { width: 66px; height: 48px; }
  .nav { gap: .75rem; }
  .nav a { font-size: .85rem; }
  .facts { grid-template-columns: 1fr; gap: .15rem; }
  .facts dt { margin-top: .55rem; }
  .wx .days { grid-template-columns: repeat(4, 1fr); }
  .wx .days li:nth-child(n+5) { display: none; }
  .hero { min-height: 68vh; }
}

@media (max-width: 400px) {
  :root { --pad-x: 1rem; }
  .cards { grid-template-columns: 1fr; }
}
