:root {
  color-scheme: dark;
  --bg: #09070b;
  --surface: #141018;
  --surface-2: #1d1722;
  --text: #fff6fb;
  --muted: #d4bccb;
  --line: rgba(255, 255, 255, 0.1);
  --teal: #ff4da6;
  --teal-strong: #ff1f86;
  --sky: #ff90c7;
  --rose: #ffd0e6;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(255, 77, 166, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 77, 166, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, #140d16 0%, #09070b 55%, #0f0b12 100%);
  background-size: 34px 34px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 77, 166, 0.08), rgba(9, 7, 11, 0.72) 58%, rgba(9, 7, 11, 1) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 96px;
}

.toolbar {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  justify-content: center;
  margin: 0;
  transform: translateX(-50%);
}

.lang-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(255, 77, 166, 0.2);
  border-radius: 999px;
  background: rgba(20, 16, 24, 0.84);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.lang-btn {
  min-width: 56px;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #d7c1d0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.lang-btn.is-active {
  background: linear-gradient(135deg, #ff74bc, #ff2f90);
  color: #160810;
  box-shadow: 0 10px 22px rgba(255, 77, 166, 0.24);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  column-gap: 40px;
  row-gap: 24px;
  align-items: center;
}

.intro {
  min-width: 0;
}

.eyebrow {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 720px);
  margin: 0;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.2rem;
  line-height: 0.95;
  letter-spacing: 0;
  color: #fff8fd;
  text-shadow: 0 0 24px rgba(255, 77, 166, 0.12);
}

.lead {
  max-width: 30rem;
  margin: 18px 0 0;
  color: #d9c5d3;
  font-size: 1.08rem;
  display: grid;
  gap: 8px;
}

.lead-heading {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead-copy {
  line-height: 1.45;
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 520px);
  margin-top: 28px;
}

.card-actions {
  width: 100%;
  gap: 10px;
  margin-top: 16px;
}

.card-actions .action {
  min-height: 46px;
  padding: 0 10px;
  font-size: 0.84rem;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(20, 16, 24, 0.88);
  color: var(--text);
  font-size: clamp(0.88rem, 1.5vw, 0.98rem);
  font-weight: 650;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.action:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 77, 166, 0.42);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
}

.action:focus-visible,
.lang-btn:focus-visible,
.portrait-frame:focus-visible,
.card a:focus-visible,
.card button:focus-visible {
  outline: 3px solid rgba(255, 77, 166, 0.24);
  outline-offset: 2px;
}

.action.primary {
  background: linear-gradient(135deg, #ff5bb0, #ff2f90);
  color: #160810;
  border-color: rgba(255, 77, 166, 0.48);
  box-shadow: 0 16px 30px rgba(255, 77, 166, 0.2);
}

.action.primary:hover {
  background: linear-gradient(135deg, #ff74bc, #ff4ba4);
  border-color: rgba(255, 132, 191, 0.58);
}

.action .icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.action > span:last-child {
  min-width: 0;
}

.action .icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview {
  min-width: 0;
}

.device {
  width: min(100%, 460px);
  margin-left: auto;
}

.device-top {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}

.device-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.portrait-frame {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  aspect-ratio: 5 / 6;
  border: 0;
  border-radius: 12px 12px 0 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  perspective: 1200px;
}

.flip-card-inner {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  transition: transform 560ms cubic-bezier(0.2, 0.75, 0.22, 1);
}

.portrait-frame.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.portrait-face {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 77, 166, 0.18);
  border-radius: 12px 12px 0 0;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255, 77, 166, 0.16), rgba(20, 16, 24, 0.98));
  backface-visibility: hidden;
}

.portrait-front {
  transform: rotateY(0deg);
}

.portrait-back {
  display: grid;
  place-items: center;
  padding: 0;
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 77, 166, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(255, 208, 230, 0.08), rgba(12, 8, 14, 0.98));
}

.portrait-front > img,
.portrait-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portrait-front > img {
  display: block;
  object-fit: cover;
  object-position: center top;
}

.portrait-frame.is-fallback .portrait-front > img {
  opacity: 0;
}

.portrait-fallback {
  display: grid;
  place-items: center;
  gap: 18px;
  padding: 26px;
  color: #ffd7ea;
  background:
    linear-gradient(180deg, rgba(255, 77, 166, 0.12), rgba(20, 16, 24, 0.94)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 77, 166, 0.08));
  transition: opacity 180ms ease;
}

.portrait-frame:not(.is-fallback) .portrait-fallback {
  opacity: 0;
}

.portrait-qr-card {
  display: grid;
  justify-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.portrait-qr-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portrait-qr-card span {
  display: none;
}

.portrait-mark {
  display: grid;
  place-items: center;
  width: min(38vw, 128px);
  aspect-ratio: 1;
  border-radius: 28px;
  border: 1px solid rgba(255, 77, 166, 0.18);
  background: linear-gradient(135deg, rgba(255, 77, 166, 0.28), rgba(20, 16, 24, 0.24));
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0;
  color: #fff5fa;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.portrait-lines {
  display: grid;
  gap: 10px;
  width: min(56%, 220px);
}

.portrait-lines span {
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 77, 166, 0.3), rgba(255, 255, 255, 0.05));
}

.portrait-lines span:nth-child(2) {
  width: 82%;
}

.portrait-lines span:nth-child(3) {
  width: 64%;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255, 77, 166, 0.18);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, rgba(18, 14, 22, 0.98), rgba(11, 8, 14, 0.98));
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #ff4da6, #ff8fc7, #ffd0e6, #ff4da6);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.logo-field {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 77, 166, 0.18), rgba(255, 255, 255, 0.03));
  color: #ffd9ea;
  border: 1px solid rgba(255, 77, 166, 0.18);
  overflow: hidden;
}

.logo-field img {
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
}

.logo-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.name-line {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  font-weight: 800;
  color: #fff8fd;
}

.role-line {
  margin: 2px 0 0;
  color: #d7a9c4;
  font-size: 0.94rem;
  font-weight: 600;
}

.contact-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
}

.contact-list li {
  display: grid;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-list span {
  color: #f09cc5;
  font-size: 0.82rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-list strong {
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.36;
  color: #fff8fd;
  word-break: break-word;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: #ffd9ea;
  font-size: 0.82rem;
  font-weight: 650;
}

.map-link .icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
}

.map-link .icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-link:hover {
  color: #fff7fc;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

@media (max-width: 900px) {
  .page {
    width: min(100% - 28px, 1180px);
    padding-top: 22px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .device {
    margin-left: 0;
    width: min(100%, 520px);
  }

  h1 {
    font-size: 2.8rem;
  }

}

@media (max-width: 620px) {
  .toolbar {
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  h1 {
    font-size: 2.4rem;
  }

  .lead {
    font-size: 1rem;
  }

  .actions {
    gap: 10px;
  }

  .action {
    min-height: 54px;
    padding: 0 10px;
  }

  .portrait-back {
    padding: 0;
  }

  .card {
    padding: 18px;
  }

  .card-head {
    gap: 12px;
  }

  .logo-field {
    width: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }

  .action,
  .flip-card-inner {
    transition: none;
  }
}
