/* Fundamental Property — сайт-визитка
   Концепция: визитка в луче света на графитовом фоне. Один объект на экране, всё остальное — тишина. */
:root {
  --bone: #efebe1;
  --eggshell: #f6f3eb;
  --linen: #e4ded1;
  --impression: #d3ccbc;
  --ink: #23211d;
  --ink-muted: #5c574e;
  --oxblood: #7a1f1f;
  --table: #141310;
  --on-table: #d9cfbd;
  --display: "Cormorant SC", "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --text: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --deboss: 0 1px 0 rgba(255, 255, 255, .75), 0 -1px 0 rgba(35, 33, 29, .14);
  --paper-shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 18px 40px rgba(0, 0, 0, .45), 0 4px 10px rgba(0, 0, 0, .25);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  padding-block: 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background-color: var(--table);
  background-image: radial-gradient(ellipse 75% 65% at 50% 42%, rgba(255, 238, 214, .085), transparent 72%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* блоки страницы не сжимаются под высоту экрана (иначе на телефоне визитка наезжает на кейсы) */
body > * { flex-shrink: 0; }

/* ---------- стопка визиток ---------- */
.stack {
  position: relative;
  width: min(880px, 100%);
}
.stack::before, .stack::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--linen);
  border-radius: 3px;
  box-shadow: var(--paper-shadow);
}
.stack::before { transform: translate(6px, 9px) rotate(.6deg); }
.stack::after  { transform: translate(3px, 4px) rotate(.25deg); }

.flip {
  position: relative;
  z-index: 1;
  perspective: 2200px;
}
.flip__inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }

.card {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 5;
  border-radius: 3px;
  background-color: var(--eggshell);
  /* бумажное зерно */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .40  0 0 0 0 .34  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  box-shadow: var(--paper-shadow), inset 0 0 0 1px rgba(211, 204, 188, .9);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.card--back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}

/* ---------- набор: высокая печать ---------- */
.press {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  text-shadow: var(--deboss);
  letter-spacing: .05em;
  margin: 0;
}
.press a { color: inherit; text-decoration: none; }
.c-tl a { border-bottom: 1px solid transparent; }
.c-tl a:hover { border-bottom-color: currentColor; text-decoration: none; }
.press a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }

.c-tl, .c-tr, .c-center, .c-bottom { position: absolute; }
.c-tl { top: 6.4cqw; left: 6.6cqw; font-size: clamp(12px, 2.25cqw, 21px); }
.c-tr { top: 5.9cqw; right: 6.6cqw; text-align: right; }
.c-tr .firm { display: block; font-size: clamp(13px, 2.45cqw, 22px); line-height: 1.12; }
.c-tr .dept { display: block; font-size: clamp(10px, 1.6cqw, 14.5px); line-height: 1.3; letter-spacing: .07em; }
.c-center { left: 0; right: 0; top: 41%; text-align: center; }
.c-center h1 { font-size: clamp(18px, 3.35cqw, 30px); line-height: 1.15; letter-spacing: .06em; margin: 0; font-weight: 600; }
.c-center .role { display: block; margin-top: .9cqw; font-size: clamp(13px, 2.1cqw, 18.5px); letter-spacing: .09em; }
.c-bottom { left: 5cqw; right: 5cqw; bottom: 6.2cqw; text-align: center; font-size: clamp(10.5px, 1.72cqw, 15.5px); letter-spacing: .06em; word-spacing: .1em; }
.c-bottom .gap { display: inline-block; width: 1.4em; }

/* ---------- оборот: форма ---------- */
.back-body {
  position: absolute;
  left: 6.6cqw; right: 6.6cqw; top: 15cqw; bottom: 5.4cqw;
  display: flex;
  flex-direction: column;
  gap: 2.2cqw;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 4cqw; }
.field { display: flex; flex-direction: column; gap: .4cqw; min-width: 0; }
.field label {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(11px, 1.55cqw, 14px);
  letter-spacing: .1em;
  color: var(--ink-muted);
}
.field input, .field textarea {
  font: inherit;
  font-family: var(--text);
  font-size: clamp(15px, 2cqw, 18px);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--impression);
  border-radius: 0;
  padding: .5cqw 0 .6cqw;
  outline: none;
  resize: none;
  width: 100%;
}
.field textarea { height: clamp(46px, 7.4cqw, 66px); line-height: 1.35; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: #9a9488; font-style: italic; }

.actions { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; margin-top: auto; }
.consent { display: flex; align-items: flex-start; gap: 8px; font-size: clamp(11.5px, 1.5cqw, 13.5px); line-height: 1.35; color: var(--ink-muted); max-width: 58%; }
.consent input { margin: .15em 0 0; accent-color: var(--ink); width: 14px; height: 14px; flex: none; }
.consent a { color: inherit; }

.btn {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(13px, 1.8cqw, 16px);
  letter-spacing: .12em;
  color: var(--oxblood);
  background: transparent;
  border: 1px solid var(--oxblood);
  border-radius: 0;
  padding: .85em 1.6em;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.btn:hover:not(:disabled) { background: var(--oxblood); color: var(--eggshell); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn:focus-visible, .link:focus-visible, .field input:focus-visible, .field textarea:focus-visible, .consent input:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}

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

.status {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6cqw;
  text-align: center;
  padding: 0 10cqw;
  background: inherit;
}
.status[hidden] { display: none; }
.status .press { font-size: clamp(18px, 3.2cqw, 28px); }
.status p { margin: 0; font-size: clamp(14px, 1.9cqw, 17px); color: var(--ink-muted); max-width: 46ch; }
.status--error .press { color: var(--oxblood); }

.form-error { min-height: 1.2em; margin: 0; font-size: clamp(12px, 1.5cqw, 14px); color: var(--oxblood); }

/* ---------- подписи на столе ---------- */
.table-nav {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.link {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .16em;
  color: var(--on-table);
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(217, 207, 189, .35);
  padding: 4px 0;
  cursor: pointer;
  text-decoration: none;
}
.link:hover { color: #fff; border-bottom-color: #fff; }
.fine {
  font-size: 12.5px;
  color: rgba(217, 207, 189, .6);
  text-align: center;
  margin: 0;
}
.fine a { color: inherit; }

/* ---------- первый экран ---------- */
.hero {
  width: 100%;
  min-height: calc(100svh - 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

/* ---------- кейсы: результаты на визитках ---------- */
.cases {
  width: min(1120px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding-top: 56px;
}
.cases__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: .08em;
  color: var(--on-table);
  text-align: center;
  text-wrap: balance;
}
.cases__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 34px 30px;
}
.mini { min-width: 0; }
.mini:nth-child(6n+1) { transform: rotate(-1.1deg); }
.mini:nth-child(6n+2) { transform: rotate(.7deg) translateY(6px); }
.mini:nth-child(6n+3) { transform: rotate(-.4deg); }
.mini:nth-child(6n+4) { transform: rotate(.9deg); }
.mini:nth-child(6n+5) { transform: rotate(-.8deg) translateY(4px); }
.mini:nth-child(6n+6) { transform: rotate(.5deg); }
.mini__flip {
  container-type: inline-size;
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  perspective: 1600px;
  cursor: pointer;
  border-radius: 3px;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
  -webkit-tap-highlight-color: transparent;
}
.mini__flip:hover { transform: translateY(-6px); }
.mini__flip:focus-visible { outline: 2px solid var(--on-table); outline-offset: 6px; }
.mini__card {
  container-type: inline-size;
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background-color: var(--eggshell);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .40  0 0 0 0 .34  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  box-shadow: var(--paper-shadow), inset 0 0 0 1px rgba(211, 204, 188, .9);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
  overflow: hidden;
}
.mini__back { transform: rotateY(-180deg); }
.mini__flip.is-flipped .mini__front { transform: rotateY(180deg); }
.mini__flip.is-flipped .mini__back { transform: rotateY(0deg); }
.m-tl, .m-tr, .m-bottom { position: absolute; margin: 0; }
.m-tl { top: 6.5cqw; left: 7cqw; font-size: clamp(11px, 4cqw, 15px); }
.m-tr { top: 6.5cqw; right: 7cqw; font-size: clamp(10px, 3.6cqw, 13.5px); letter-spacing: .07em; text-align: right; max-width: 62%; }
.m-center { position: absolute; left: 6cqw; right: 6cqw; top: 50%; transform: translateY(-50%); text-align: center; }
.m-fig {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 13cqw, 52px);
  line-height: 1;
  letter-spacing: .02em;
  color: var(--oxblood);
}
.m-unit {
  margin: 2cqw 0 0;
  font-family: var(--text);
  font-style: italic;
  font-size: clamp(14px, 4.6cqw, 18px);
  color: var(--ink-muted);
}
.m-cap { margin: 7cqw auto 0; max-width: 80%; font-size: clamp(12px, 4.3cqw, 16.5px); line-height: 1.25; letter-spacing: .05em; }
.m-bottom {
  left: 7cqw; right: 7cqw; bottom: 6cqw;
  text-align: center;
  font-family: var(--text);
  font-style: italic;
  font-size: clamp(11px, 3.7cqw, 14px);
  color: var(--ink-muted);
  border-top: 1px solid var(--impression);
  padding-top: 2.4cqw;
}
.m-turn { display: inline-block; margin-left: .3em; font-style: normal; color: var(--oxblood); transition: transform .5s; }
.mini__flip:hover .m-turn { transform: rotate(180deg); }

/* оборот кейса: тёмная визитка, деньги — бордовым, часы — латунью */
.mini__back {
  background-color: #1e1c17;
  box-shadow: var(--paper-shadow), inset 0 0 0 1px rgba(236, 230, 217, .12);
  color: #ece6d9;
  padding: 6cqw 6.5cqw 5.5cqw;
  display: flex;
  flex-direction: column;
  gap: 3cqw;
}
.b-head {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(14px, 4.8cqw, 18px);
  line-height: 1.15;
  letter-spacing: .05em;
  padding-bottom: 2.6cqw;
  border-bottom: 1px solid rgba(236, 230, 217, .16);
}
.b-head span { color: #c6a56c; margin-right: .6em; }
.b-sec { display: grid; grid-template-columns: 4.7em 1fr; column-gap: .5em; }
.b-lbl { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(11px, 3.5cqw, 13.5px); letter-spacing: .08em; color: #a49d8f; padding-top: .12em; }
.b-lbl--gold { color: #c6a56c; }
.b-txt { margin: 0; font-size: clamp(12.5px, 4cqw, 15px); line-height: 1.32; }
.b-txt--was { color: #b9b2a4; }
.b-did { margin: 0; padding: 0; list-style: none; font-size: clamp(12.5px, 4cqw, 15px); line-height: 1.3; }
.b-did li { position: relative; padding-left: 1.3em; margin-bottom: .28em; }
.b-did li:last-child { margin-bottom: 0; }
.b-did li::before { content: "→"; position: absolute; left: 0; color: #c6a56c; font-size: .85em; top: .08em; }
.b-mets { list-style: none; margin: auto 0 0; padding: 3cqw 0 0; border-top: 1px solid rgba(236, 230, 217, .12); display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5cqw; }
.met b { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(16px, 6cqw, 23px); line-height: 1.05; letter-spacing: .01em; white-space: nowrap; }
.met span { display: block; margin-top: .3em; font-style: italic; font-size: clamp(10.5px, 3.3cqw, 12.5px); line-height: 1.2; color: #a49d8f; }
.met--rub b { color: #e07f6f; }
.met--hrs b { color: #d4b47a; }
.met--x b { color: #ece6d9; }
.b-fit { margin: 0; font-style: italic; font-size: clamp(11.5px, 3.6cqw, 13.5px); line-height: 1.3; color: #c6a56c; }
.cases__lead { margin: -18px 0 0; font-size: 16px; color: rgba(217, 207, 189, .75); text-align: center; text-wrap: balance; }

.cases__note { margin: 0; font-size: 13px; color: rgba(217, 207, 189, .6); text-align: center; max-width: 60ch; }
.cases__cta { font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  .mini__card, .mini__flip { transition: none; }
}

/* ---------- телефон: вертикальная визитка, форма отдельной карточкой ---------- */
@media (max-width: 640px) {
  .mini__flip { aspect-ratio: 5 / 7; }
  .mini__back { gap: 3.4cqw; }
  body { justify-content: flex-start; padding-block: 28px 40px; }
  .hero { min-height: 0; }
  .cases { padding-top: 32px; gap: 28px; }
  .cases__grid { gap: 26px; }
  .card { aspect-ratio: 5 / 7; }
  .c-tl { top: 8cqw; left: 8cqw; font-size: 13px; }
  .c-tr { top: 7.4cqw; right: 8cqw; }
  .c-tr .firm { font-size: 14px; }
  .c-tr .dept { font-size: 10.5px; max-width: 34cqw; margin-left: auto; }
  .c-center { top: 42%; padding: 0 6cqw; }
  .c-center h1 { font-size: 21px; }
  .c-center h1 .surname { display: block; }
  .c-center .role { font-size: 14px; margin-top: 8px; }
  .c-bottom { bottom: 8cqw; left: 8cqw; right: 8cqw; font-size: 11.5px; line-height: 1.7; }
  .c-bottom .gap { display: block; height: 0; }

  .stack::before, .stack::after { display: none; }
  .flip { perspective: none; }
  .flip__inner { transform: none !important; transition: none; }
  .card--back {
    position: relative;
    inset: auto;
    transform: none;
    aspect-ratio: auto;
    margin-top: 22px;
    display: none;
  }
  .flip.is-flipped .card--back { display: block; }
  .back-body { position: static; padding: 30cqw 8cqw 8cqw; gap: 18px; }
  .row { grid-template-columns: 1fr; gap: 18px; }
  .field label { font-size: 12px; }
  .field textarea { height: 96px; }
  .actions { flex-direction: column; align-items: stretch; gap: 16px; }
  .consent { max-width: none; font-size: 12.5px; }
  .btn { padding: 14px; }
  .c-tl.back-tl { top: 8cqw; }
  .status { padding: 0 8cqw; }
}

@media (prefers-reduced-motion: reduce) {
  .flip__inner { transition: none; }
}
