/* =========================================================
   Süslü Hediyeler — görsel stil
   Renkleri, tipografiyi ve kart ölçülerini buradan değiştir.
   ========================================================= */

:root {
  --bg: #080507;
  --ink: #28140f;
  --ink-soft: #6d5336;
  --cream: #f4ead8;
  --cream-deep: #e6d5b7;
  --gold: #d8b77e;
  --gold-hi: #f3dcaa;
  --gold-dim: rgba(216, 183, 126, 0.38);
  --line: rgba(216, 183, 126, 0.2);
  --card-w: 252px;
  --ease-out: cubic-bezier(0.16, 0.84, 0.28, 1.02);
  --ease-spring: cubic-bezier(0.22, 1.2, 0.36, 1);
}

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

html,
body {
  height: 100%;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(130% 115% at 50% -25%, #360f1f 0%, rgba(54, 15, 31, 0) 60%),
    radial-gradient(100% 90% at 50% 60%, #1d0a14 0%, #0c060a 55%, #050305 100%);
  color: var(--cream);
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

::selection {
  color: #1d0d0a;
  background: var(--gold-hi);
}

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

/* ---------------- atmosfer ---------------- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.atmosphere__glow {
  position: absolute;
  left: 50%;
  top: 53%;
  width: min(84vw, 960px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(177, 32, 70, 0.46) 0%,
    rgba(112, 22, 50, 0.22) 42%,
    rgba(24, 8, 16, 0) 70%
  );
  filter: blur(26px);
  animation: breathe 9s ease-in-out infinite;
  transition: opacity 1.4s ease, transform 1.4s var(--ease-out);
}

body.box-open .atmosphere__glow {
  opacity: 0.72;
  transform: translate(-50%, -46%) scale(1.18);
}

.atmosphere::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -24%;
  width: min(120vw, 1400px);
  height: 66vh;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(199, 122, 62, 0.17) 0%,
    rgba(125, 49, 36, 0.08) 42%,
    rgba(0, 0, 0, 0) 72%
  );
  filter: blur(34px);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 70% at 50% 48%,
    rgba(0, 0, 0, 0) 42%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.atmosphere__grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

/* ---------------- sahne ---------------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  isolation: isolate;
}

.stage__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
  cursor: grab;
}

.stage__canvas.is-grabbing {
  cursor: grabbing;
}

.stage__canvas.is-over-lid {
  cursor: move;
}

/* ---------------- menü ---------------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.menu__item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--card-w);
  opacity: 0;
  pointer-events: none;
  transform-origin: 50% 72%;
  transform:
    translate3d(
      calc(-50% + var(--ox, 0px)),
      calc(-50% + var(--oy, 0px)),
      0
    )
    scale(0.18);
  transition:
    transform 1.05s var(--ease-out) var(--d, 0ms),
    opacity 0.45s ease var(--d, 0ms);
  will-change: transform, opacity;
}

.menu.is-open .menu__item {
  opacity: 1;
  pointer-events: auto;
  transform:
    translate3d(
      calc(-50% + var(--tx, 0px)),
      calc(-50% + var(--ty, 0px)),
      0
    )
    rotate(var(--rot, 0deg))
    scale(1);
}

.menu:not(.is-open) .menu__item {
  transition-duration: 0.62s, 0.3s;
  transition-delay: calc(var(--i, 0) * 28ms), calc(var(--i, 0) * 20ms);
}

.menu__item:hover,
.menu__item:focus-within {
  z-index: 6;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 15px 18px 17px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  background:
    radial-gradient(120% 150% at 15% -30%, #fffdf8 0%, rgba(255, 253, 248, 0) 55%),
    linear-gradient(155deg, #fbf5ea 0%, var(--cream) 46%, #e8d8bd 100%);
  box-shadow:
    0 26px 55px -28px rgba(0, 0, 0, 0.85),
    0 2px 0 rgba(255, 255, 255, 0.5) inset,
    0 0 0 1px rgba(112, 74, 32, 0.12);
  transform: translateY(0);
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s ease,
    background-color 0.5s ease;
  will-change: transform;
}

.card::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 0;
  border: 1px solid rgba(139, 99, 47, 0.18);
  border-radius: 9px;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='.22'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:hover {
  transform: translateY(-7px);
  box-shadow:
    0 38px 75px -30px rgba(0, 0, 0, 0.9),
    0 0 46px -14px rgba(216, 183, 126, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.55) inset,
    0 0 0 1px rgba(112, 74, 32, 0.16);
}

.card:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 4px;
}

.card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
}

.card__no {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1;
}

.card__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(139, 99, 47, 0.42), rgba(139, 99, 47, 0.04));
}

.card__arrow {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(139, 99, 47, 0.35);
  border-radius: 50%;
  color: var(--ink-soft);
  transition:
    color 0.45s ease,
    background-color 0.45s ease,
    border-color 0.45s ease,
    transform 0.45s var(--ease-out);
}

.card__arrow svg {
  width: 10px;
  height: 10px;
}

.card:hover .card__arrow,
.card:focus-visible .card__arrow {
  color: var(--cream);
  background: var(--ink);
  border-color: var(--ink);
  transform: rotate(45deg);
}

.card__label {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(24px, 2.05vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--ink);
}

/* ---------------- ipucu ---------------- */

.hint {
  position: fixed;
  left: 50%;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 11px 17px;
  border: 1px solid rgba(216, 183, 126, 0.16);
  border-radius: 999px;
  background: rgba(13, 7, 10, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(244, 234, 216, 0.66);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition:
    opacity 0.9s ease 1.05s,
    transform 0.9s var(--ease-out) 1.05s;
}

body.is-ready .hint {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.box-open .hint {
  opacity: 0.62;
}

.hint__dot {
  width: 4px;
  height: 4px;
  flex: none;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: pulse 2.6s ease-in-out infinite;
}

.hint__sep {
  opacity: 0.4;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* ---------------- klavye ile açma ---------------- */

.a11y-open {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 20;
  padding: 13px 22px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.25s ease,
    transform 0.25s var(--ease-out);
}

.a11y-open:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}

body.box-open .a11y-open {
  opacity: 0 !important;
  pointer-events: none;
}

/* ---------------- perde ---------------- */

.curtain {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, #1a0a12 0%, #080507 62%);
  transition:
    opacity 1.1s ease 0.15s,
    visibility 1.1s ease 0.15s;
}

body.is-ready .curtain,
body.no-scene .curtain {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.curtain__mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(216, 183, 126, 0.75);
  transform: rotate(45deg);
  animation: curtainMark 2.1s ease-in-out infinite;
}

.curtain__mark span {
  display: block;
  width: 8px;
  height: 8px;
  margin: 12px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(216, 183, 126, 0.7);
}

@keyframes curtainMark {
  0%,
  100% {
    opacity: 0.35;
    transform: rotate(45deg) scale(0.92);
  }
  50% {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}

/* ---------------- yedek ekran ---------------- */

.fallback {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(100% 80% at 50% 20%, #2a0c19 0%, #0a0609 62%, #050305 100%);
  text-align: center;
}

.fallback[hidden] {
  display: none;
}

.fallback__eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.fallback h1 {
  max-width: 560px;
  margin: 0 0 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.fallback > p:not(.fallback__eyebrow) {
  margin: 0 0 34px;
  color: rgba(244, 234, 216, 0.6);
  font-size: 14px;
}

.fallback__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 640px;
}

.fallback__nav a {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.fallback__nav a span {
  color: var(--gold);
  font-family: "Manrope", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.fallback__nav a:hover {
  border-color: var(--gold-dim);
  background: rgba(255, 255, 255, 0.07);
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px;
  background: #080507;
  text-align: center;
}

.noscript nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.noscript a {
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  text-decoration: none;
}

/* ---------------- responsive ---------------- */

@media (max-width: 860px) {
  :root {
    --card-w: min(340px, calc(100vw - 56px));
  }

  .card {
    gap: 7px;
    padding: 13px 16px 14px;
    border-radius: 12px;
  }

  .card::before {
    inset: 5px;
    border-radius: 8px;
  }

  .card__top {
    gap: 8px;
  }

  .card__no {
    font-size: 8px;
  }

  .card__arrow {
    width: 20px;
    height: 20px;
  }

  .card__label {
    font-size: clamp(20px, 5.4vw, 24px);
  }

  .hint {
    gap: 7px;
    padding: 10px 14px;
    font-size: 8.5px;
    letter-spacing: 0.1em;
    max-width: calc(100vw - 28px);
    white-space: normal;
    text-align: center;
    line-height: 1.5;
  }

  .hint__sep {
    display: none;
  }

  .a11y-open {
    bottom: 96px;
  }
}

@media (max-height: 540px) {
  .hint {
    display: none;
  }
}

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

  .menu__item,
  .menu:not(.is-open) .menu__item {
    transition-duration: 0.2s, 0.2s;
    transition-delay: 0ms, 0ms;
  }

  .card,
  .card__arrow,
  .atmosphere__glow,
  .hint {
    transition-duration: 0.2s;
  }
}
