/* ==========================================================================
   Khalaf Al Kaabi – Digital Business Card
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: dark;
  --page-bg: #242323;
  --card-bg: #000;
  --gold: #d4af37;
  --gold-soft: #c9a961;
  --card-radius: 14px;
  --card-shadow: 0 12px 34px rgba(0, 0, 0, 0.6);
  --flip-duration: 0.7s;
  --flip-easing: cubic-bezier(0.4, 0.2, 0.2, 1);
}

/* ---------- 2. Base ---------- */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--page-bg);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

/* ---------- 3. Layout ---------- */
.stage {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ---------- 4. Card (3D flip) ---------- */
.card-scene {
  width: 100%;
  aspect-ratio: 1270 / 728;
  perspective: 1800px;
}

.card-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--flip-duration) var(--flip-easing);
}

.card-scene.is-flipped .card-flipper {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-face--back {
  transform: rotateY(180deg);
}

/* Full-face press target (front and back) */
.card-press {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  appearance: none;
}

.card-press img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

/* ---------- 5. Link placeholder (back face) ---------- */
/* Transparent hit area sitting on top of the website link in the image. */
.link-hotspot {
  position: absolute;
  top: 73.5%;
  left: 1.5%;
  width: 29%;
  height: 10.5%;
  z-index: 2;
  border-radius: 8px;
  cursor: pointer;
}

/* ---------- 6. Hint text ---------- */
.hint {
  margin: 0;
  color: var(--gold-soft);
  opacity: 0.8;
  font-size: 13px;
  letter-spacing: 0.01em;
  text-align: center;
}

/* ---------- 7. Accessibility ---------- */
.card-press:focus-visible,
.link-hotspot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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