/* XIV Foundation — site styles (concept VIII · Салон).
   Layout: a full-bleed photograph opens the page, a thin high-contrast serif speaks quietly, everything else is air.
   Fonts: Noto Serif Display + Manrope — both cover the full Kazakh Cyrillic alphabet (ә ғ қ ң ө ұ ү һ і). */
:root {
  --stone: #EFEAE4; --stone-2: #E6DFD7; --ink: #1F1A19; --mute: #675E5B; --line: rgba(31,26,25,.16);
  --wine: #803C44; --night: #171312; --light: #F4EEE8;
  --serif: "Noto Serif Display", "Times New Roman", Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4.4vw, 64px); --wrapw: 1312px; --hdr: 72px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--stone); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, blockquote, ol, ul { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }
.serif { font-family: var(--serif); font-weight: 300; }
.cap { font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.wrap { max-width: var(--wrapw); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: var(--light); padding: 10px 16px; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }

/* ---------- header ---------- */
.hdr { position: fixed; left: 0; right: 0; top: 0; z-index: 60; color: var(--light); padding-top: env(safe-area-inset-top, 0px); transition: background .5s ease, color .5s ease, box-shadow .5s ease; }
.hdr__in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px; min-height: var(--hdr); }
.hdr__home { display: inline-flex; align-items: center; min-height: 44px; position: relative; justify-self: start; }
.hdr__home img { width: 86px; height: auto; transition: opacity .5s ease; }
.hdr__home .dk { position: absolute; left: 0; top: 50%; transform: translateY(-50%); opacity: 0; }
.hdr__nav { display: flex; gap: clamp(18px, 2.4vw, 36px); }
.hdr__nav a { position: relative; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.hdr__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 11px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.hdr__nav a:hover::after { transform: scaleX(1); }
.hdr__right { justify-self: end; display: flex; align-items: center; gap: clamp(10px, 1.4vw, 20px); }
.lang { display: flex; align-items: center; gap: 2px; }
.lang a { text-decoration: none; min-height: 44px; min-width: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; opacity: .6; transition: opacity .3s; }
.lang a:hover, .lang a[aria-current="true"] { opacity: 1; }
.lang a[aria-current="true"] { text-decoration: underline; text-underline-offset: 6px; }
.hdr__cta { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border: 1px solid currentColor; text-decoration: none; background: transparent; color: inherit; cursor: pointer; transition: background .4s, color .4s; }
.hdr__cta:hover { background: var(--light); color: var(--ink); }
.burger { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.hdr.is-solid { background: rgba(239,234,228,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.hdr.is-solid .hdr__home .lt { opacity: 0; }
.hdr.is-solid .hdr__home .dk { opacity: 1; }
.hdr.is-solid .hdr__cta:hover { background: var(--ink); color: var(--stone); }

/* ---------- mobile menu ---------- */
.menu { position: fixed; inset: 0; z-index: 200; background: var(--stone); color: var(--ink); display: flex; flex-direction: column; gap: 24px; padding: calc(16px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
.menu[hidden] { display: none; }
.menu__top { display: flex; justify-content: space-between; align-items: center; }
.menu__top img { width: 80px; }
.menu nav { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.menu nav a { font-family: var(--serif); font-weight: 300; font-size: clamp(32px, 9vw, 52px); line-height: 1.2; text-decoration: none; }
.menu .lang { justify-content: flex-start; }
.x { width: 44px; height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 30px; border: 1px solid currentColor; background: transparent; color: inherit; text-decoration: none; cursor: pointer; transition: background .45s, color .45s, border-color .45s; }
.btn--solid { background: var(--ink); color: var(--stone); border-color: var(--ink); }
.btn--solid:hover { background: var(--wine); border-color: var(--wine); }
.btn--ghost:hover { background: var(--ink); color: var(--stone); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: clamp(520px, 100vh, 980px); display: grid; place-items: center; text-align: center; color: var(--light); overflow: hidden; background: var(--night); }
.hero__img { position: absolute; inset: 0; background: radial-gradient(80% 70% at 62% 38%, #5A3A36 0%, #2A1D1B 55%, #120E0D 100%); background-size: cover; background-position: center; }
.hero__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 58%, rgba(0,0,0,.5) 100%); }
.hero__in { position: relative; z-index: 1; padding: calc(var(--hdr) + 40px) var(--gutter) 90px; display: flex; flex-direction: column; align-items: center; }
.hero .cap { color: rgba(244,238,232,.82); margin-bottom: clamp(18px, 3vh, 28px); }
.hero h1 { font-size: clamp(40px, min(6vw, 10.5vh), 104px); line-height: 1.04; letter-spacing: -.01em; max-width: 13ch; text-wrap: balance; }
.hero .btn { margin-top: clamp(28px, 4.5vh, 44px); }
.hero .btn:hover { background: var(--light); color: var(--ink); }
.ph { position: absolute; left: var(--gutter); right: 45%; bottom: 22px; text-align: left; color: rgba(244,238,232,.6); }
@media (prefers-reduced-motion: no-preference) {
  .hero__img { animation: zoom 14s ease-out both; }
  .hero__in > * { animation: rise 1.2s cubic-bezier(.2,.7,.2,1) both; }
  .hero__in > :nth-child(2) { animation-delay: .15s; }
  .hero__in > :nth-child(3) { animation-delay: .3s; }
  @keyframes zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

/* ---------- sections ---------- */
.sec { padding-block: clamp(80px, 11vw, 160px); }
.k { color: var(--wine); }
.about { text-align: center; }
.about h2 { margin: clamp(20px, 3vw, 32px) auto 0; font-size: clamp(26px, 2.9vw, 44px); line-height: 1.3; max-width: 30ch; text-wrap: balance; }
.about h2 em { font-style: normal; color: var(--wine); }
.rule { width: 1px; height: clamp(40px, 6vw, 72px); background: var(--line); margin: clamp(32px, 5vw, 56px) auto; }
.about .mis { max-width: 54ch; margin: 0 auto; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.8; color: var(--mute); }

.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: clamp(28px, 4vw, 48px); flex-wrap: wrap; }
.head h2 { font-size: clamp(30px, 3.4vw, 54px); line-height: 1.05; }
.head .cap { color: var(--mute); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px); }
.tile { position: relative; overflow: hidden; aspect-ratio: 3 / 2; color: var(--light); isolation: isolate; }
.tile__img { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.tile:nth-child(1) .tile__img { background-color: #4A302D; background-image: linear-gradient(160deg, #6E4A45, #2C1E1C); }
.tile:nth-child(2) .tile__img { background-color: #6B5F57; background-image: linear-gradient(200deg, #9A8B80, #4A403B); }
.tile:nth-child(3) .tile__img { background-color: #2B2220; background-image: linear-gradient(160deg, #3B2E2B, #161110); }
.tile:nth-child(4) .tile__img { background-color: #857668; background-image: linear-gradient(200deg, #B3A496, #5E534C); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.6) 100%); }
.tile__body { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(18px, 2.4vw, 36px); display: flex; flex-direction: column; gap: 8px; }
.tile__n { color: rgba(244,238,232,.78); }
.tile h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 2.2vw, 36px); line-height: 1.1; }
.tile p { font-size: 15px; line-height: 1.6; max-width: 38ch; color: rgba(244,238,232,.9); max-height: 0; opacity: 0; overflow: hidden; transform: translateY(8px); transition: max-height .8s ease, opacity .6s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.tile__ph { position: absolute; top: 16px; left: 18px; color: rgba(244,238,232,.5); }
.tile:hover .tile__img, .tile:focus-within .tile__img { transform: scale(1.05); }
.tile:hover p, .tile:focus-within p { max-height: 8em; opacity: 1; transform: none; }
@media (hover: none) { .tile p { max-height: none; opacity: 1; transform: none; } }

/* talents band */
.band { background: var(--stone-2); }
.band__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(32px, 5vw, 96px); align-items: end; padding-block: clamp(56px, 7vw, 104px); }
.band h2 { margin-top: 18px; font-size: clamp(28px, 3.2vw, 50px); line-height: 1.12; max-width: 20ch; text-wrap: balance; }
.band__side { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.band__side p { color: var(--mute); max-width: 40ch; }

/* opening */
.open__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
.open__media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); }
.shot { position: relative; margin: 0; overflow: hidden; background-color: #3B2E2B; background-size: cover; background-position: center; color: rgba(244,238,232,.6); display: flex; align-items: flex-end; padding: 14px; }
.shot--a { grid-column: 1 / -1; aspect-ratio: 4 / 3; background-image: linear-gradient(160deg, #5A3A36, #1E1513); }
.shot--b { aspect-ratio: 1 / 1; background-image: linear-gradient(200deg, #8E7F74, #4A403B); }
.shot--c { aspect-ratio: 1 / 1; background-image: linear-gradient(160deg, #2E2422, #120E0D); }
.open__text { position: sticky; top: calc(var(--hdr) + 32px); }
.open__text h2 { margin-top: 18px; font-size: clamp(32px, 3.8vw, 60px); line-height: 1.05; }
.open__lead { margin-top: 18px; color: var(--mute); max-width: 44ch; font-size: clamp(15px, 1.15vw, 18px); }
.rows { margin-top: clamp(28px, 4vw, 44px); list-style: none; padding: 0; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows .cap { color: var(--mute); font-size: 10.5px; }
.rows span:last-child { font-size: 15.5px; }
.rows span.big { font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 2vw, 30px); line-height: 1.15; }

/* quote */
.quote { position: relative; min-height: clamp(380px, 60vh, 640px); display: grid; place-items: center; text-align: center; color: var(--light); overflow: hidden; background-color: #1C1513; background-image: linear-gradient(180deg, #2A1F1D, #120E0D); background-size: cover; background-position: center; }
.quote blockquote { position: relative; padding: 64px var(--gutter); font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 3.2vw, 50px); line-height: 1.25; max-width: 26ch; text-wrap: balance; }

[data-has-img] { background-size: cover; background-position: center; }
.quote[data-has-img]::before { content: ""; position: absolute; inset: 0; background: rgba(15,10,9,.55); }
.shot[data-has-img] figcaption, .tile[data-has-img] .tile__ph { display: none; }

/* contacts */
.contacts { text-align: center; }
.contacts h2 { margin-top: clamp(16px, 2.4vw, 28px); font-size: clamp(32px, 4vw, 64px); line-height: 1.05; }
.contacts .sub { margin: 16px auto 0; max-width: 40ch; color: var(--mute); }
.clist { margin: clamp(36px, 5vw, 60px) auto 0; max-width: 980px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 28px; }
.clist div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.clist .cap { color: var(--mute); font-size: 10px; }
.clist a { font-family: var(--serif); font-weight: 300; font-size: clamp(17px, 1.5vw, 21px); text-decoration: none; overflow-wrap: anywhere; }
.clist a:hover { color: var(--wine); }
.ctas { margin-top: clamp(32px, 4vw, 48px); display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; }

.ftr__in { display: flex; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding-block: 22px calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--mute); }

/* ---------- forms (modals) ---------- */
dialog.pd { width: min(calc(100vw - 32px), clamp(720px, 64vw, 1180px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 0; border: 1px solid var(--line); background: var(--stone); color: var(--ink); box-shadow: 0 40px 100px -30px rgba(0,0,0,.55); }
dialog.pd::backdrop { background: rgba(10,6,7,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog.pd[open] { animation: pdIn .45s cubic-bezier(.2,.7,.2,1); }
@keyframes pdIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.pd__in { position: relative; padding: clamp(20px, min(3.2vw, 5vh), 56px); }
.pd__in:focus { outline: none; }
.pd__in > .x { position: absolute; top: clamp(6px, 1.2vh, 14px); right: clamp(6px, 1.2vw, 14px); }
.pd__wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto 1fr; column-gap: clamp(28px, 4vw, 72px); align-items: start; }
.pd__wrap[hidden] { display: none; }
.pd__k { grid-column: 1; grid-row: 1; color: var(--wine); }
.pd__h { grid-column: 1; grid-row: 2; margin-top: clamp(10px, 2vh, 20px); font-family: var(--serif); font-weight: 300; font-size: clamp(28px, min(3.3vw, 7vh), 58px); line-height: 1.06; }
.pd__sub { grid-column: 1; grid-row: 3; margin-top: clamp(10px, 2vh, 20px); font-size: clamp(14px, min(1.1vw, 2.2vh), 17px); color: var(--mute); }
.pd form { grid-column: 2; grid-row: 1 / 4; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(10px, 2vh, 20px) clamp(16px, 2vw, 28px); }
.pd .full { grid-column: 1 / -1; }
.pd fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pd legend { padding: 0; margin-bottom: clamp(4px, 1vh, 8px); font-size: 12px; color: var(--mute); }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: clamp(34px, 5.2vh, 44px); padding: 0 clamp(12px, 1.2vw, 18px); border: 1px solid var(--line); font-size: clamp(13px, min(1vw, 2vh), 15px); }
.chip input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--stone); }
.chip input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: 2px; }
.fld { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fld label { font-size: 12px; color: var(--mute); }
.fld input, .fld textarea { font: 16px/1.5 var(--sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid rgba(31,26,25,.3); border-radius: 0; padding: clamp(4px, 1vh, 10px) 0; width: 100%; }
.fld input:focus, .fld textarea:focus { outline: none; border-bottom-color: var(--ink); }
.fld textarea { height: clamp(44px, 9vh, 110px); resize: none; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--mute); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.err { font-size: 13px; color: var(--wine); }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pd .btn { min-height: clamp(42px, 6.2vh, 56px); }
.pd .btn[disabled] { opacity: .6; cursor: progress; }
.pd__done { min-height: clamp(200px, 40vh, 380px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; }
.pd__done[hidden] { display: none; }
.pd__done .pd__h, .pd__done .pd__k { margin: 0; }
.pd__done p { color: var(--mute); }

/* ---------- responsive ---------- */
@media (max-height: 560px) and (min-width: 761px) {
  .pd__in { padding: 18px 22px; }
  .pd form { gap: 8px 20px; }
  .fld textarea { height: 38px; }
  .chip span { min-height: 32px; }
}
@media (max-width: 1040px) {
  .hdr__nav { display: none; }
  .hdr__in { grid-template-columns: auto minmax(0, 1fr); }
  .burger { display: inline-flex; }
}
@media (max-width: 860px) {
  .open__grid, .band__in { grid-template-columns: minmax(0, 1fr); }
  .open__text { position: static; }
}
@media (max-width: 760px) {
  .pd__wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .pd__wrap > * { grid-column: 1 !important; grid-row: auto !important; }
  .pd form { margin-top: clamp(16px, 3vh, 28px); grid-template-columns: minmax(0, 1fr); }
  .pd__h { font-size: clamp(26px, 7vw, 36px); }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile { aspect-ratio: 4 / 3; }
  .hdr__right .hdr__cta, .hdr__right .lang { display: none; }
  .rows li { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) and (max-height: 760px) {
  .pd__in { padding: 16px 18px; }
  .pd__h { font-size: 24px; margin-top: 6px; padding-right: 40px; }
  .pd__sub { display: none; }
  .pd form { margin-top: 12px; gap: 8px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pd form > .fld:not(.full) { grid-column: auto; }
  .fld textarea { height: 40px; }
  .chip span { min-height: 34px; padding: 0 10px; font-size: 13px; }
  .consent { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile__img, .tile p, .hdr, .hdr__home img { transition: none; }
}
