/* =========================
  RESET
========================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
:root{
  --ink: #1b1410;
  --gold: #b58a2b;
  --gold2:#e1c16e;
  --wine:#6e2323;

  --bg: #15110e;

  --max: 980px;
  --radius: 18px;

  --padX: clamp(18px, 4vw, 34px);
  --padY: clamp(22px, 5vw, 40px);
}

body{
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  overflow: hidden; /* SAYFA SABİT */
}

/* =========================
  SAHNE / DUVAR ARKA PLAN
========================= */
.scene{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}

.scene::before{
  content:"";
  position:absolute;
  inset:0;
  background: url("assets/textures/wall.png") center / cover no-repeat;
  filter: contrast(1.02) saturate(0.95);
  transform: scale(1.02);
  z-index: 0;
}

.scene__overlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(60% 60% at 50% 25%, rgba(0,0,0,0.10), rgba(0,0,0,0.50)),
    radial-gradient(120% 90% at 50% 120%, rgba(0,0,0,0.68), rgba(0,0,0,0.28));
  z-index: 1;
}

.scene__dust{
  position:absolute;
  inset:-20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.06) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,0.05) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 75%, rgba(255,255,255,0.04) 0 2px, transparent 3px),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,0.04) 0 2px, transparent 3px),
    radial-gradient(circle at 10% 85%, rgba(255,255,255,0.03) 0 2px, transparent 3px);
  filter: blur(0.3px);
  animation: dustMove 14s linear infinite;
  z-index: 2;
  pointer-events:none;
}

@keyframes dustMove{
  0%   { transform: translate3d(0,0,0) scale(1); opacity: .85; }
  50%  { transform: translate3d(2%, -2%, 0) scale(1.02); opacity: 1; }
  100% { transform: translate3d(0,0,0) scale(1); opacity: .85; }
}

/* =========================
  İÇERİK VIEWPORT (SABİT MERKEZ)
========================= */
.viewport{
  position: fixed;
  inset: 0;
  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: center;

  /* ZOOM/RESIZE'DA SAPMA OLMASIN */
  overflow: hidden;

  padding:
    max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
}

/* =========================
  FERMAN
========================= */
.ferman{
  height: 98dvh;
  width: min(var(--max), 94vw);
  position: relative;

  background: url("assets/textures/parsomen.png") center / 100% 100% no-repeat;

  border-radius: 22px;
  filter: drop-shadow(0 18px 36px rgba(0,0,0,0.55));

  display: flex;
  flex-direction: column;

  padding: clamp(64px, 7vh, 92px) var(--padX) clamp(92px, 9vh, 128px);

  animation: fermanIn 680ms cubic-bezier(.2,.85,.2,1) both;
}

@keyframes fermanIn{
  from { transform: translateY(14px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.ferman__shine{
  position:absolute;
  inset: 0;
  border-radius: 22px;
  background:
    radial-gradient(80% 40% at 30% 10%, rgba(255,255,255,0.22), transparent 55%),
    radial-gradient(70% 40% at 80% 30%, rgba(255,255,255,0.10), transparent 55%);
  mix-blend-mode: soft-light;
  pointer-events:none;
  animation: shine 9s ease-in-out infinite;
}

@keyframes shine{
  0%,100% { opacity: .55; }
  50%     { opacity: .85; }
}

/* =========================
  HEADER / TUĞRA
========================= */
.mast{
  text-align: center;
  padding-top: 6px;
  margin-bottom: 10px;
}

.tugra{
  width: clamp(98px, 18vw, 168px);
  height: clamp(98px, 18vw, 168px);

  margin: 0 auto 10px;
  border-radius: 999px;
  overflow: hidden;

  display: grid;
  place-items: center;

  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.28), rgba(255,255,255,0.10));
  border: 1px solid rgba(0,0,0,0.28);

  box-shadow:
    0 18px 32px rgba(0,0,0,0.22),
    inset 0 0 0 2px rgba(255,255,255,0.10);

  position: relative;
}

.tugra::after{
  content:"";
  position:absolute;
  inset:-20%;
  background:
    radial-gradient(circle at 20% 20%, rgba(225,193,110,0.42), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(181,138,43,0.30), transparent 55%);
  opacity: .55;
  mix-blend-mode: overlay;
  animation: tugraGlow 6.5s ease-in-out infinite;
  pointer-events:none;
}

@keyframes tugraGlow{
  0%,100% { transform: translate3d(0,0,0); opacity: .45; }
  50%     { transform: translate3d(2%, -2%, 0); opacity: .75; }
}

.tugra img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
  transform: none;
}

h1{
  font-size: clamp(26px, 4.2vw, 58px);
  letter-spacing: 0.3px;
  line-height: 1.05;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}

.subtitle{
  margin-top: 8px;
  font-size: clamp(13px, 1.8vw, 16px);
  opacity: .86;
}

/* =========================
  LINK ALANI (SABİT, SCROLL YOK)
========================= */
.links{
  flex: 1;
  min-height: 0;

  display: grid;
  gap: 14px;

  width: calc(100% - 64px);
  max-width: 620px;
  margin: 18px auto 0;

  padding: 0;

  overflow: hidden; /* SAPMA OLMASIN */
  background: transparent;
}

/* =========================
  KART (SAYDAM PANEL YOK)
========================= */
.card{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;

  text-decoration: none;
  color: var(--ink);

  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;

  padding: 10px 8px;
  border-radius: 12px;

  width: 100%;
  max-width: 100%;
  margin: 0;

  transition: transform .18s ease, background .18s ease;
}

.card:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
}

.card__icon{
  width: 54px;
  height: 54px;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;

  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.12);
}

.card__icon img{
  width: 88%;
  height: 88%;
  object-fit: contain;
  display:block;
  opacity: .95;
}

.card__txt{ min-width: 0; }

.card__top{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.card__top h2{ min-width: 0; }

.card h2{
  font-size: clamp(16px, 2.1vw, 22px);
  line-height: 1.1;
}

.card p{
  margin-top: 6px;
  font-size: clamp(13px, 1.8vw, 15px);
  opacity: .90;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

/* Badge kapalı */
.badge{ display:none !important; }

.card__arrow{
  font-size: 28px;
  line-height: 1;
  opacity: .35;
  transform: translateY(-1px);
}

/* =========================
  FOOTER / MÜHÜR
========================= */
.seal{
  margin-top: 14px;
  text-align: center;
  opacity: .92;
  padding-top: 8px;
  padding-bottom: 10px;
}

.seal__line{
  height: 2px;
  width: min(460px, 70%);
  margin: 0 auto 12px;
  background: linear-gradient(90deg, transparent, rgba(181,138,43,0.55), transparent);
}

.seal p{
  font-size: 14px;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}

/* =========================
  KARTLAR HER KOŞULDA GÖRÜNÜR
========================= */
.reveal{
  opacity: 1 !important;
  transform: none !important;
}
.reveal.is-in{
  opacity: 1 !important;
  transform: none !important;
}

/* =========================
  MOBİL (ÇERÇEVE İÇİNE OTURTMA)
========================= */
/* ==========================================
  TABLET + TELEFON: İÇ ÇERÇEVEYE TAM OTURTMA
  - Başlık/subtitle/kart/ikon hiçbir cihazda çizgilerin dışına taşmaz
========================================== */
@media (max-width: 980px){

  :root{
    --frameX: 44px;     /* sağ-sol güvenli alan (taşmayı bitirir) */
    --frameTop: 72px;   /* üst boşluk */
    --frameBot: 98px;   /* alt boşluk */
  }

  .viewport{
    overflow: hidden !important;
    padding: 10px !important;
  }

  .ferman{
    width: min(92vw, 520px) !important;
    aspect-ratio: 9 / 16 !important;
    height: auto !important;
    min-height: unset !important;

    display: flex !important;
    flex-direction: column !important;

    padding: var(--frameTop) var(--frameX) var(--frameBot) !important;
    border-radius: 18px !important;
  }

  /* Başlık bloğu */
  .mast{
    margin-bottom: 12px !important;
  }

  .tugra{
    width: clamp(98px, 18vw, 124px) !important;
    height: clamp(98px, 18vw, 124px) !important;
    margin: 0 auto 8px !important;
  }

  h1{
    font-size: clamp(24px, 6.4vw, 34px) !important;
    line-height: 1.02 !important;
    letter-spacing: 0.1px !important;
    text-align: center !important;

    /* taşmayı bitiren ayarlar */
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  .subtitle{
    font-size: clamp(11px, 2.6vw, 13px) !important;
    line-height: 1.2 !important;
    margin-top: 6px !important;
    text-align: center !important;

    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  /* Kart alanı */
  .links{
    width: 100% !important;
    margin: 0 !important;

    flex: 1 !important;
    min-height: 0 !important;

    display: grid !important;
    gap: 12px !important;

    overflow: auto !important;        /* çok kart olursa burada kayar */
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;

    padding: 0 0 6px !important;
  }

  /* Kart: taşma sıfır */
  .card{
    width: 100% !important;
    max-width: 100% !important;

    display: grid !important;
    grid-template-columns: 40px 1fr !important; /* ikon + yazı */
    gap: 10px !important;

    padding: 8px 6px !important;
    align-items: start !important;

    overflow: hidden !important; /* hiçbir şey dışarı çıkamaz */
  }

  .card__icon{
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
  }

  .card__txt{
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .card h2{
    font-size: 16px !important;
    line-height: 1.1 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  .card p{
    font-size: 12px !important;
    line-height: 1.25 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  .card__arrow{ display: none !important; }
  .badge{ display:none !important; }

  /* Footer */
  .seal{
    margin-top: auto !important;
    padding-top: 10px !important;
    padding-bottom: 0 !important;
  }
  .seal__line{ display:none !important; }
  .seal p{ font-size: 12px !important; }
}

/* Çok dar telefonlar (360px ve altı) */
@media (max-width: 380px){
  :root{
    --frameX: 46px;   /* daha dar ekranda daha da içeri */
    --frameTop: 70px;
    --frameBot: 96px;
  }
  h1{ font-size: 23px !important; }
  .subtitle{ font-size: 11px !important; }
  .card{ grid-template-columns: 38px 1fr !important; }
  .card__icon{ width: 38px !important; height: 38px !important; }
}



@media (max-width: 420px){
  .ferman{ width: 96vw; }
  .subtitle{ opacity: .88; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
  .reveal{ opacity: 1 !important; transform: none !important; }
}
/* ==========================================
  TABLET + TELEFON FIX (<= 980px)
  - Yazılar/kartlar sığar
  - Her cihazda aynı oran (fix görünüm)
  - Taşarsa sadece link alanı scroll
========================================== */
@media (max-width: 980px){
  html, body { overflow: hidden; }

  .viewport{
    overflow: hidden !important;
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left)) !important;
  }

  .ferman{
    width: min(92vw, 520px) !important;
    aspect-ratio: 9 / 16 !important; /* FIX görünüm */
    height: auto !important;
    min-height: unset !important;

    display: flex !important;
    flex-direction: column !important;

    padding: clamp(42px, 5vh, 56px) 16px clamp(56px, 7vh, 74px) !important;
    border-radius: 18px !important;
  }

  .tugra{
    width: clamp(104px, 18vw, 132px) !important;
    height: clamp(104px, 18vw, 132px) !important;
    margin: 0 auto 8px !important;
  }

  h1{
    font-size: clamp(28px, 6.2vw, 40px) !important;
    line-height: 1.02 !important;
    letter-spacing: 0.2px !important;
  }

  .subtitle{
    font-size: clamp(12px, 2.6vw, 14px) !important;
    margin-top: 6px !important;
  }

  .links{
    width: calc(100% - 26px) !important;
    margin: 12px auto 0 !important;

    flex: 1 !important;
    min-height: 0 !important;

    overflow: auto !important;       /* kartlar burada kayar */
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;

    padding-right: 4px !important;
  }

  .card{ padding: 8px 6px !important; }

  .card__icon{
    width: clamp(42px, 9vw, 52px) !important;
    height: clamp(42px, 9vw, 52px) !important;
    border-radius: 14px !important;
  }

  .card__arrow{ font-size: 24px !important; }

  .seal{
    margin-top: auto !important;
    padding-top: 10px !important;
    padding-bottom: 6px !important;
  }
  .seal p{ font-size: 12px !important; }
}

@media (max-width: 420px){
  .ferman{
    width: 94vw !important;
    padding: 40px 14px 66px !important;
  }
  h1{ font-size: 30px !important; }
}

