/* ============================================================
   INTRO.CSS — dobrecieplo.eu door page
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   BASE
   ───────────────────────────────────────────────────────────── */
html, body {
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ─────────────────────────────────────────────────────────────
   KEYFRAMES
   ───────────────────────────────────────────────────────────── */
@keyframes doorBgKenBurns {
  0%   { transform: scale(1)    translate(0%,    0%); }
  100% { transform: scale(1.08) translate(-1.5%, 1%); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes lineExpand {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes cardFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────────
   DOOR — fullscreen section
   ───────────────────────────────────────────────────────────── */
.door {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vh, 4rem) clamp(1.25rem, 5vw, 2rem);
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   CURSOR GLOW — desktop torch effect
   ───────────────────────────────────────────────────────────── */
.door__cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 113, 52, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}

.door__cursor-glow.is-active {
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────────
   BACKGROUND
   ───────────────────────────────────────────────────────────── */
.door__bg {
  position: absolute;
  inset: 0;
  background-image: url('https://hurt.dobrecieplo.eu/img/hero__img-1.webp');
  background-size: cover;
  background-position: center 30%;
  z-index: 0;
  transform-origin: center center;
  animation: doorBgKenBurns 22s ease-in-out infinite alternate;
  will-change: transform;
}

#embers-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Overlay — z:3, nad canvasem iskier (z:2), pod treścią (z:4) */
.door__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.30) 40%,
      rgba(0, 0, 0, 0.30) 60%,
      rgba(0, 0, 0, 0.72) 100%
    ),
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(20, 13, 2, 0.10) 35%,
      rgba(201, 149, 44, 0.08) 65%,
      rgba(0, 0, 0, 0.45) 100%
    );
}

/* ─────────────────────────────────────────────────────────────
   BODY — central content block
   ───────────────────────────────────────────────────────────── */
.door__body {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 900px;
  gap: clamp(1.25rem, 2.5vh, 2rem);
}

/* ─────────────────────────────────────────────────────────────
   LOGO — fade down on load
   ───────────────────────────────────────────────────────────── */
.door__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-bottom: 0.25rem;
  opacity: 0;
  animation: fadeDown 0.8s ease forwards;
}

.door__logo-icon {
  height: 64px;
  width: auto;
}

.door__logo-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gold);
  line-height: 1;
}

/* ─────────────────────────────────────────────────────────────
   TAGLINE — gold line expands in above text
   ───────────────────────────────────────────────────────────── */
.door__tagline-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.door__tagline-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: center;
  animation: lineExpand 0.6s 0.6s ease forwards;
}

.door__tagline {
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  line-height: 1;
  margin: 0;
}

/* ─────────────────────────────────────────────────────────────
   HEADLINE — fade up with delay
   ───────────────────────────────────────────────────────────── */
.door__h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: var(--fw-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
  color: var(--text-on-dark);
  margin: 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fadeUp 0.6s 0.5s ease forwards;
}

/* ─────────────────────────────────────────────────────────────
   CARDS ROW
   ───────────────────────────────────────────────────────────── */
.door__cards {
  display: flex;
  flex-direction: row;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  width: 100%;
  max-width: 820px;
  margin-top: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────
   CARD — glassmorphism
   ───────────────────────────────────────────────────────────── */
.door__card {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.door__card:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(140, 113, 52, 0.6);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Staggered entrance */
.door__card--left {
  animation: cardFadeUp 0.6s 0.3s ease-out both;
}

.door__card--right {
  animation: cardFadeUp 0.6s 0.5s ease-out both;
}

/* ─────────────────────────────────────────────────────────────
   CARD CONTENT — white text on glass
   ───────────────────────────────────────────────────────────── */
.door__card-label {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  gap: 8px;
}

.door__card-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--color-accent);
  opacity: 0.7;
  flex-shrink: 0;
}

.door__card-heading {
  font-size: clamp(1.1rem, 2vw, 1.375rem);
  font-weight: var(--fw-semibold);
  color: var(--text-on-dark);
  line-height: var(--line-height-snug);
  margin-bottom: 0.625rem;
}

.door__card-text {
  font-size: var(--fs-body-sm);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

/* ─────────────────────────────────────────────────────────────
   CARD BUTTONS
   ───────────────────────────────────────────────────────────── */
.door__card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 20px;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  letter-spacing: var(--letter-spacing-btn);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

/* Left card — solid gold fill */
.door__card-btn--primary {
  background: var(--color-accent);
  color: var(--color-black);
  border: 1px solid var(--color-accent);
}

.door__card--left:hover .door__card-btn--primary {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* Right card — glass outline → white fill on hover */
.door__card-btn--glass {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.door__card--right:hover .door__card-btn--glass {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--color-black);
}

/* ─────────────────────────────────────────────────────────────
   FOOTER — frosted glass
   ───────────────────────────────────────────────────────────── */
.door__footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1rem clamp(1.25rem, 5vw, 2rem);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.door__footer-text {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.5;
  margin: 0;
}

/* ─────────────────────────────────────────────────────────────
   MOBILE
   ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  html, body {
    overflow: auto;
  }

  .door {
    min-height: 100svh;
    justify-content: flex-start;
    padding-top: clamp(2.5rem, 8vh, 4rem);
    padding-bottom: 5rem;
  }

  .door__cards {
    flex-direction: column;
  }

  .door__logo-icon {
    height: 36px;
  }

  .door__logo-text {
    font-size: 0.85rem;
  }

  .door__cursor-glow {
    display: none;
  }
}

/* ─────────────────────────────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .door__bg {
    animation: none;
  }

  .door__logo {
    animation: none;
    opacity: 1;
  }

  .door__h1 {
    animation: none;
    opacity: 1;
  }

  .door__tagline-line {
    animation: none;
    transform: scaleX(1);
  }

  .door__card--left,
  .door__card--right {
    animation: none;
  }

  .door__card {
    transition: none;
  }

  .door__card:hover {
    transform: none;
  }
}
