:root {
  --bg: #040605;
  --bg-deep: #060908;
  --bg-edge: #020302;
  --panel: rgba(8, 11, 10, 0.82);
  --panel-hover: rgba(10, 14, 13, 0.9);
  --line: rgba(185, 211, 198, 0.16);
  --line-strong: rgba(196, 222, 210, 0.26);
  --line-fine: rgba(228, 238, 233, 0.05);
  --text: #e4e9e7;
  --text-soft: rgba(228, 233, 231, 0.86);
  --text-dim: rgba(228, 233, 231, 0.54);
  --shadow: 0 30px 84px rgba(0, 0, 0, 0.54);
  --hero-shift: -7vh;
  --reveal-duration: 1450ms;
  --card-duration: 920ms;
  --ambient-duration: 20s;
  --spot-size: clamp(170px, 18vw, 250px);
  --spot-soft: clamp(250px, 28vw, 400px);
  --mx: 50vw;
  --my: 50vh;
  --beam-angle: 0deg;
  --ease-out: cubic-bezier(0.16, 0.84, 0.2, 1);
  --ease-mass: cubic-bezier(0.2, 0.7, 0.16, 1);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  block-size: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-block-size: 100%;
  overflow: hidden;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(88rem 32rem at 50% 11%, rgba(12, 28, 22, 0.2) 0%, rgba(8, 11, 10, 0) 52%),
    radial-gradient(78rem 28rem at 50% 112%, rgba(10, 18, 15, 0.9) 0%, rgba(5, 7, 6, 0) 66%),
    linear-gradient(180deg, #060908 0%, #030504 58%, #020302 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.intro-active {
  cursor: none;
}

body.is-touch.intro-active {
  cursor: auto;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-atmosphere {
  background:
    radial-gradient(52rem 22rem at 50% 18%, rgba(96, 136, 115, 0.055), transparent 72%),
    radial-gradient(24rem 12rem at 50% 28%, rgba(58, 82, 69, 0.05), transparent 76%),
    linear-gradient(90deg, rgba(84, 120, 101, 0) 0%, rgba(84, 120, 101, 0.03) 50%, rgba(84, 120, 101, 0) 100%);
  filter: blur(16px);
  opacity: 0.7;
  animation: atmosphereDrift var(--ambient-duration) ease-in-out infinite alternate;
}

.bg-grid {
  background:
    linear-gradient(rgba(188, 213, 200, 0.008) 1px, transparent 1px),
    linear-gradient(90deg, rgba(188, 213, 200, 0.006) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px;
  mask-image: radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.76) 26%, transparent 76%);
  opacity: 0.12;
}

.bg-noise {
  opacity: 0.024;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.42) 0.48px, transparent 0.48px),
    radial-gradient(rgba(255, 255, 255, 0.24) 0.32px, transparent 0.32px);
  background-size: 21px 21px, 28px 28px;
  background-position: 0 0, 11px 9px;
  mix-blend-mode: soft-light;
}

.bg-vignette {
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.12) 44%, rgba(0, 0, 0, 0.46) 76%, rgba(0, 0, 0, 0.78) 100%);
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: auto;
  background:
    radial-gradient(72rem 28rem at 50% 30%, rgba(10, 18, 14, 0.12) 0%, rgba(4, 5, 5, 0) 58%),
    linear-gradient(180deg, rgba(2, 3, 3, 0.96) 0%, rgba(2, 3, 3, 0.98) 100%);
  opacity: 1;
  visibility: visible;
  transition:
    opacity 900ms var(--ease-out),
    visibility 0ms linear 900ms;
}

.intro::before,
.intro::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro::before {
  background:
    radial-gradient(circle at 50% 48%, rgba(78, 112, 94, 0.06) 0%, rgba(78, 112, 94, 0.02) 28%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(90deg, rgba(180, 209, 195, 0.018) 0%, rgba(180, 209, 195, 0) 15%, rgba(180, 209, 195, 0) 85%, rgba(180, 209, 195, 0.018) 100%);
}

.intro::after {
  background:
    radial-gradient(circle at 50% 46%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.14) 46%, rgba(0, 0, 0, 0.42) 82%, rgba(0, 0, 0, 0.78) 100%);
}

body.intro-complete .intro {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.intro-brand-image {
  width: min(1000px, 86vw);
  max-width: 1000px;
  height: auto;
  object-fit: contain;
  user-select: none;
}

.intro-layer--base .intro-brand-image {
  opacity: 0.03;
  filter: brightness(0.34) contrast(1.08) saturate(0.88);
}

.intro-layer--glow,
.intro-layer--reveal {
  -webkit-mask-image: radial-gradient(circle var(--spot-soft) at var(--mx) var(--my), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.98) 18%, rgba(0, 0, 0, 0.84) 38%, rgba(0, 0, 0, 0.18) 58%, transparent 74%);
  mask-image: radial-gradient(circle var(--spot-soft) at var(--mx) var(--my), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.98) 18%, rgba(0, 0, 0, 0.84) 38%, rgba(0, 0, 0, 0.18) 58%, transparent 74%);
}

.intro-layer--glow .intro-brand-image {
  opacity: 0.55;
  filter: blur(16px) brightness(1.04) contrast(1.1) saturate(1.02);
}

.intro-layer--reveal {
  -webkit-mask-image: radial-gradient(circle var(--spot-size) at var(--mx) var(--my), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.98) 22%, rgba(0, 0, 0, 0.88) 42%, rgba(0, 0, 0, 0.18) 62%, transparent 74%);
  mask-image: radial-gradient(circle var(--spot-size) at var(--mx) var(--my), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.98) 22%, rgba(0, 0, 0, 0.88) 42%, rgba(0, 0, 0, 0.18) 62%, transparent 74%);
}

.intro-layer--reveal .intro-brand-image {
  opacity: 0.98;
  filter: brightness(1.08) contrast(1.1) saturate(1.02) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.34));
}

.intro-light {
  position: fixed;
  left: var(--mx);
  top: var(--my);
  width: var(--spot-size);
  height: var(--spot-size);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

.intro-light::before,
.intro-light::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.intro-light::before {
  width: calc(var(--spot-size) * 1.92);
  height: calc(var(--spot-size) * 1.44);
  background: radial-gradient(ellipse at 50% 50%, rgba(173, 197, 185, 0.12) 0%, rgba(104, 130, 115, 0.06) 36%, rgba(56, 73, 65, 0.02) 56%, transparent 78%);
  filter: blur(18px);
  transform: translate(-50%, -50%) rotate(var(--beam-angle));
}

.intro-light::after {
  width: calc(var(--spot-size) * 0.92);
  height: calc(var(--spot-size) * 0.92);
  background: radial-gradient(circle at 50% 50%, rgba(245, 249, 247, 0.12) 0%, rgba(194, 213, 203, 0.08) 18%, rgba(131, 156, 142, 0.05) 34%, rgba(0, 0, 0, 0) 72%);
  box-shadow: 0 0 0 1px rgba(217, 229, 223, 0.04) inset;
  filter: blur(1px);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 56px);
}

.hero-shell {
  position: relative;
  inline-size: min(1120px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 2.4vh, 26px);
  transform: translateY(var(--hero-shift));
}

.hero-shell::before,
.hero-shell::after {
  content: "";
  position: absolute;
  inset-block-start: clamp(152px, 15vw, 194px);
  block-size: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(188, 213, 201, 0.12) 44%, transparent 100%);
  opacity: 0.6;
}

.hero-shell::before {
  inset-inline-start: clamp(0px, 5vw, 24px);
  inline-size: min(120px, 10vw);
}

.hero-shell::after {
  inset-inline-end: clamp(0px, 5vw, 24px);
  inline-size: min(120px, 10vw);
}

.brand-stage {
  position: relative;
  inline-size: min(1040px, 92vw);
  min-block-size: clamp(166px, 18vw, 224px);
  display: grid;
  place-items: center;
  isolation: isolate;
}

.brand-stage::before {
  content: "";
  position: absolute;
  inset: -14% -8%;
  background:
    radial-gradient(38% 38% at 50% 48%, rgba(98, 138, 116, 0.07), transparent 72%),
    radial-gradient(74% 52% at 50% 36%, rgba(20, 32, 28, 0.42), transparent 76%);
  filter: blur(20px);
  opacity: 0.7;
  z-index: 0;
}

.brand-stage::after {
  content: "";
  position: absolute;
  inset-inline: 10%;
  inset-block-end: 10px;
  block-size: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(193, 220, 207, 0.04) 10%, rgba(193, 220, 207, 0.12) 50%, rgba(193, 220, 207, 0.04) 90%, transparent 100%);
  opacity: 0.86;
  z-index: 0;
}

.brand-image,
.brand-fallback {
  grid-area: 1 / 1;
}

.brand-image {
  position: relative;
  z-index: 1;
  max-inline-size: 100%;
  max-block-size: clamp(168px, 19vw, 236px);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  filter: blur(30px) brightness(0.42) contrast(1.12) saturate(0.78);
  transform: translateY(22px) scale(1.045);
  transition:
    opacity var(--reveal-duration) var(--ease-out),
    filter var(--reveal-duration) var(--ease-out),
    transform var(--reveal-duration) var(--ease-out);
  will-change: opacity, filter, transform;
}

.brand-fallback {
  position: relative;
  z-index: 1;
  display: none;
  font-size: clamp(3rem, 8vw, 5.8rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  color: rgba(228, 233, 231, 0.88);
  text-transform: uppercase;
  opacity: 0;
  filter: blur(26px) brightness(0.5);
  transform: translateY(22px) scale(1.04);
  transition:
    opacity var(--reveal-duration) var(--ease-out),
    filter var(--reveal-duration) var(--ease-out),
    transform var(--reveal-duration) var(--ease-out);
  user-select: none;
}

.brand-stage.is-fallback .brand-image {
  display: none;
}

.brand-stage.is-fallback .brand-fallback {
  display: block;
}

body.is-ready .brand-image,
body.is-ready .brand-stage.is-fallback .brand-fallback {
  opacity: 1;
  filter: blur(0) brightness(1.12) contrast(1.08) saturate(0.96) drop-shadow(0 18px 32px rgba(0, 0, 0, 0.34));
  transform: translateY(0) scale(1);
}

.flip-card {
  position: relative;
  inline-size: min(700px, 72vw);
  min-block-size: clamp(100px, 9vw, 118px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  appearance: none;
  perspective: 1400px;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 940ms var(--ease-out) 260ms,
    transform 940ms var(--ease-out) 260ms;
}

body.is-ready .flip-card {
  opacity: 1;
  transform: translateY(0);
}

.flip-card__inner {
  position: relative;
  display: block;
  inline-size: 100%;
  min-block-size: inherit;
  border-radius: inherit;
  transform-style: preserve-3d;
  transition: transform var(--card-duration) var(--ease-mass);
  box-shadow: var(--shadow);
}

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

.flip-card__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.44em;
  padding: clamp(22px, 3vw, 28px) clamp(22px, 4vw, 38px);
  border-radius: inherit;
  backface-visibility: hidden;
  background: linear-gradient(180deg, rgba(10, 14, 13, 0.72) 0%, rgba(7, 10, 9, 0.84) 100%);
  border: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(12px) saturate(104%);
  -webkit-backdrop-filter: blur(12px) saturate(104%);
}

.flip-card__face::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 26%),
    linear-gradient(90deg, rgba(100, 148, 121, 0.028), transparent 24%, transparent 76%, rgba(100, 148, 121, 0.02));
  pointer-events: none;
}

.flip-card__face::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(14px - 1px);
  border: 1px solid var(--line-fine);
  pointer-events: none;
}

.flip-card__face--front {
  z-index: 2;
}

.flip-card__face--front > span,
.flip-card__face--back > span {
  position: relative;
  z-index: 1;
  display: block;
  max-inline-size: 100%;
  font-size: clamp(1rem, 1.26vw, 1.12rem);
  line-height: 1.48;
  letter-spacing: 0.012em;
  color: var(--text-soft);
  text-wrap: balance;
}

.flip-card__face--back {
  transform: rotateY(180deg);
}

.flip-card__face--back > span {
  max-inline-size: 33ch;
}

.flip-card:hover .flip-card__face,
.flip-card:focus-visible .flip-card__face {
  background: linear-gradient(180deg, rgba(12, 18, 16, 0.78) 0%, rgba(8, 11, 10, 0.88) 100%);
  border-color: var(--line-strong);
}

.flip-card:hover .flip-card__inner,
.flip-card:focus-visible .flip-card__inner {
  transform: translateY(-2px);
}

.flip-card.is-flipped:hover .flip-card__inner,
.flip-card.is-flipped:focus-visible .flip-card__inner {
  transform: rotateY(180deg) translateY(-2px);
}

.flip-card:focus-visible {
  outline: none;
}

.flip-card:focus-visible .flip-card__face {
  border-color: rgba(142, 204, 163, 0.38);
  box-shadow: 0 0 0 1px rgba(142, 204, 163, 0.26), var(--shadow);
}

.hero-status {
  margin: 2px 0 0;
  font-size: 0.78rem;
  line-height: 1.2;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 920ms var(--ease-out) 380ms,
    transform 920ms var(--ease-out) 380ms;
}

body.is-ready .hero-status {
  opacity: 1;
  transform: translateY(0);
}

body:not(.is-ready) .hero-shell {
  opacity: 0;
  transform: translateY(calc(var(--hero-shift) + 18px)) scale(0.988);
  filter: blur(10px);
}

body.is-ready .hero-shell {
  opacity: 1;
  transform: translateY(var(--hero-shift)) scale(1);
  filter: blur(0);
  transition:
    opacity 1200ms var(--ease-out),
    transform 1200ms var(--ease-out),
    filter 1200ms var(--ease-out);
}

@keyframes atmosphereDrift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(0, -1.1%, 0) scale(1.018);
  }
}

@media (max-width: 960px) {
  :root {
    --hero-shift: -5vh;
    --spot-size: clamp(150px, 24vw, 220px);
    --spot-soft: clamp(220px, 34vw, 340px);
  }

  .hero-shell {
    inline-size: min(920px, 100%);
  }

  .brand-stage {
    inline-size: min(860px, 94vw);
  }

  .flip-card {
    inline-size: min(720px, 88vw);
  }
}

@media (max-width: 720px) {
  :root {
    --hero-shift: -2.8vh;
    --spot-size: clamp(132px, 28vw, 186px);
    --spot-soft: clamp(188px, 40vw, 280px);
  }

  .bg-grid {
    background-size: 72px 72px, 72px 72px;
    opacity: 0.16;
  }

  .hero-shell {
    gap: 18px;
  }

  .hero-shell::before,
  .hero-shell::after {
    display: none;
  }

  .intro-brand-image {
    width: min(92vw, 860px);
  }

  .brand-stage {
    inline-size: min(700px, 94vw);
    min-block-size: 104px;
  }

  .brand-image {
    max-block-size: clamp(104px, 18vw, 150px);
  }

  .brand-fallback {
    font-size: clamp(2.2rem, 11vw, 3.8rem);
    letter-spacing: 0.18em;
    text-indent: 0.18em;
  }

  .flip-card {
    inline-size: min(94vw, 680px);
    min-block-size: 118px;
  }

  .flip-card__face {
    padding: 20px 18px;
  }

  .hero-status {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
  }
}

@media (max-width: 520px) {
  :root {
    --hero-shift: -1.8vh;
  }

  .hero {
    padding: 20px 14px;
  }

  .hero-shell {
    gap: 14px;
  }

  .brand-stage {
    min-block-size: 84px;
  }

  .brand-image {
    max-inline-size: min(100%, 92vw);
    max-block-size: 90px;
  }

  .brand-fallback {
    font-size: clamp(1.88rem, 12vw, 2.9rem);
    letter-spacing: 0.16em;
    text-indent: 0.16em;
  }

  .flip-card {
    inline-size: min(94vw, 100%);
    min-block-size: 132px;
    border-radius: 16px;
  }

  .flip-card__face {
    padding: 18px 16px;
    border-radius: 16px;
  }

  .flip-card__face::after {
    border-radius: calc(16px - 1px);
  }

  .flip-card__face--front > span,
  .flip-card__face--back > span {
    font-size: 0.98rem;
    line-height: 1.52;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  body {
    cursor: auto;
  }

  .intro {
    display: none;
  }

  .hero-shell,
  body:not(.is-ready) .hero-shell {
    opacity: 1;
    transform: translateY(var(--hero-shift));
    filter: none;
  }

  .brand-image,
  .brand-stage.is-fallback .brand-fallback,
  .flip-card,
  .hero-status {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
