@font-face {
  font-family: "Circe";
  src: url("assets/circe-Light.woff") format("woff");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Circe";
  src: url("assets/circe-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Circe";
  src: url("assets/circe-Bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  --corten: #B46441;
  --beige: #F0E6D2;
  --paper: #F4ECDC;
  --forest: #283C32;
  --line: rgba(240, 230, 210, .45);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: #39414a;
  color: var(--beige);
  font: 300 18px/1.5 "Circe", "Helvetica Neue", Arial, sans-serif;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

/* Кадр притиснутий догори і вписаний за висотою екрана, зайве обрізається з боків.
   Тому будова однакова всюди: небо займає щонайменше 40% висоти, у ньому лого, далі ті самі гори. */
.hero {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 46% 0;
  transform-origin: 50% 0;
  animation: drift 40s var(--ease) both;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(32, 40, 44, 0) 38%,
    rgba(32, 40, 44, .30) 54%,
    rgba(32, 40, 44, .32) 76%,
    rgba(24, 32, 30, .58) 100%);
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 51vh auto 1fr auto;
  grid-template-rows: 51svh auto 1fr auto;
  justify-items: center;
  padding: 0 clamp(20px, 4vw, 48px) clamp(22px, 3.4vh, 36px);
  text-align: center;
}

.brand {
  display: block;
  width: auto;
  height: 30vh;
  height: 30svh;
  min-height: 120px;
  margin-top: 5vh;
  margin-top: 5svh;
  opacity: .86;
  animation: rise 1.4s var(--ease) both;
}

/* Слоган стоїть трохи нижче центра екрана, решта під ним */
.copy {
  animation: rise 1.4s .2s var(--ease) both;
}

h1 {
  margin: 0 0 clamp(10px, 1.8vh, 18px);
  font-size: clamp(34px, 3.6vw, 56px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -.005em;
}

.copy p {
  margin: 0 0 clamp(28px, 6.5vh, 72px);
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 400;
  line-height: 1.5;
  opacity: .92;
}

.cta, .send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 52px;
  padding: 0 30px;
  border: 1px solid transparent;
  border-radius: 0;
  font: 400 16px/1 "Circe", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}

.cta svg, .send svg {
  width: 28px;
  height: 12px;
  flex: none;
  transition: transform .35s var(--ease);
}

.cta:hover svg, .send:hover svg { transform: translateX(5px); }

.cta {
  background: var(--beige);
  color: var(--forest);
}

.cta:hover {
  background: var(--corten);
  color: var(--paper);
}

.cta:focus-visible,
.links a:focus-visible {
  outline: 1px solid var(--beige);
  outline-offset: 4px;
}

.links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 18px);
  grid-row: 4;
  width: min(760px, 100%);
  padding-top: clamp(24px, 3.4vh, 40px);
  animation: rise 1.4s .4s var(--ease) both;
}

.rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.links a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--beige);
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

.links a:hover {
  background: var(--beige);
  color: var(--forest);
}

.links svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Вікна форми й подяки: аркуш у стилі альбому */
dialog {
  width: min(500px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  color: var(--forest);
  box-shadow: 0 30px 80px rgba(16, 24, 22, .35);
}

dialog[open] { animation: rise .55s var(--ease) both; }

dialog::backdrop {
  background: rgba(30, 42, 38, .5);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: fade .45s var(--ease) both;
}

.sheet {
  position: relative;
  padding: 42px 42px 26px;
}

.close {
  position: absolute;
  top: 14px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--forest);
  cursor: pointer;
  transition: color .3s var(--ease);
}

.close:hover { color: var(--corten); }

.close:focus-visible,
.send:focus-visible {
  outline: 1px solid var(--forest);
  outline-offset: 3px;
}

.close svg { width: 22px; height: 22px; }

h2 {
  margin: 0 28px 10px 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.sheet p {
  margin: 0 0 22px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.field { margin-bottom: 16px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .02em;
  opacity: .72;
}

input {
  width: 100%;
  height: 36px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(40, 60, 50, .35);
  border-radius: 0;
  background: transparent;
  color: var(--forest);
  font: 400 17px/1.3 "Circe", "Helvetica Neue", Arial, sans-serif;
  caret-color: var(--corten);
  outline: none;
  transition: border-color .25s var(--ease);
}

input:hover { border-bottom-color: rgba(40, 60, 50, .65); }

input:focus-visible { border-bottom-color: var(--forest); box-shadow: 0 1px 0 var(--forest); }

input[aria-invalid="true"] { border-bottom-color: var(--corten); box-shadow: 0 1px 0 var(--corten); }

/* Автозаповнення браузера не повинно фарбувати поле */
input:-webkit-autofill {
  -webkit-text-fill-color: var(--forest);
  box-shadow: 0 0 0 40px var(--paper) inset;
}

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sheet .status {
  min-height: 1.4em;
  margin: 0 0 8px;
  color: #96492A;
  font-size: 14px;
  line-height: 1.4;
}

.send {
  width: 100%;
  background: var(--forest);
  color: var(--paper);
}

.send:hover { background: var(--corten); }

.send[disabled] { opacity: .6; cursor: progress; }

.send.ghost {
  border-color: rgba(40, 60, 50, .4);
  background: transparent;
  color: var(--forest);
}

.send.ghost:hover {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--paper);
}

.sheet .consent {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  opacity: .7;
}

.done { outline: none; }

.sheet .note { color: #96492A; font-size: 13px; }

.sheet-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.sheet-foot img { width: 76px; height: auto; margin-left: -9px; }

.sheet-foot span { flex: 1; height: 1px; background: rgba(40, 60, 50, .35); }

@keyframes drift {
  from { transform: scale(1.05); }
  to { transform: scale(1); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}

@keyframes fade {
  from { opacity: 0; }
}

@media (max-width: 760px) {
  .cta { width: 100%; max-width: 340px; }

  .links { width: 100%; }

  .sheet { padding: 34px 24px 20px; }

  .close { top: 10px; right: 8px; }
}

@media (max-width: 400px) {
  .wide { display: none; }
}

/* Квадратний кадр уже центрований на долині */
@media (max-aspect-ratio: 1/1) {
  .hero img { object-position: 50% 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, dialog::backdrop {
    animation: none !important;
    transition: none !important;
  }
}
