/*
  3GEN Fuar | yakında sayfası
  Konsept: sitenin montajı. Sayfa bir stand çizim paftası; imza sahne logodaki üçgenin
  zemin planı olarak çizilmesi. Palet logodan: lacivert #1F3957, turuncu #D85514.
  Kurallar: içerik CSS ile gizlenmez, LCP öğesi (başlık) animasyon almaz; JS ya da
  azaltılmış hareket yoksa çizim tam görünür.
*/

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+011E-011F, U+0130, U+015E-015F, U+20BA;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+2018-2019, U+201C-201D, U+2022, U+2026;
}

:root {
  --lacivert: #1f3957;
  --turuncu: #d85514;
  --kagit: #f6f7f9;
  --cizgi: #1f3957;
  --izgara: rgba(31, 57, 87, 0.075);
  --kenar: 20px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--kagit);
  color: var(--lacivert);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-stretch: 100%;
}

/* ---------- pafta (çerçeve) ---------- */
.pafta {
  margin: var(--kenar);
  min-height: calc(100vh - var(--kenar) * 2);
  min-height: calc(100svh - var(--kenar) * 2);
  border: 1.5px solid var(--cizgi);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "logo   sahne"
    "metin  sahne"
    "alt    antet";
}

.logo {
  grid-area: logo;
  padding: clamp(20px, min(3.4vw, 4.5vh), 48px) clamp(24px, 4.4vw, 64px) 0;
}
.logo a { display: inline-block; }
.logo img { display: block; width: clamp(160px, min(17vw, 24vh), 250px); height: auto; }

/* ---------- metin ---------- */
.metin {
  grid-area: metin;
  align-self: center;
  padding: clamp(18px, 4vh, 56px) clamp(24px, 4.4vw, 64px);
  max-width: 44rem;
}

h1 {
  margin: 0;
  font-weight: 800;
  font-stretch: 118%;
  font-size: clamp(2.6rem, min(5.4vw, 8.4vh), 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.sonuc {
  margin: clamp(20px, 2.4vw, 32px) 0 0;
  max-width: 34rem;
}

.selam {
  margin: clamp(20px, 2.4vw, 32px) 0 0;
  color: var(--turuncu);
  font-weight: 600;
  font-stretch: 112%;
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ---------- çizim alanı ---------- */
.sahne {
  grid-area: sahne;
  position: relative;
  border-left: 1.5px solid var(--cizgi);
  background-color: var(--kagit);
  background-image:
    linear-gradient(var(--izgara) 1px, transparent 1px),
    linear-gradient(90deg, var(--izgara) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  display: grid;
  place-items: center;
  padding: clamp(20px, 3vw, 48px);
  min-height: 0;
  min-width: 0;
}

.plan {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  overflow: visible;
  --tw: 0;
}

.plan .hat {
  fill: none;
  stroke: var(--turuncu);
  stroke-width: 0.34;
  stroke-linejoin: miter;
  transform-origin: 51.1px 59px;
  transform: rotate(calc(var(--k) * var(--tw) * 1deg));
}
.plan .hat:first-of-type { stroke-width: 0.5; }

.plan .olcu line,
.plan .eksen line { stroke: var(--lacivert); stroke-width: 0.35; }
.plan .eksen circle { fill: var(--kagit); stroke: var(--lacivert); stroke-width: 0.35; }
.plan text {
  fill: var(--lacivert);
  font-family: "Archivo", system-ui, sans-serif;
  font-stretch: 70%;
  font-weight: 600;
  text-anchor: middle;
}
.plan .eksen text { font-size: 4.6px; dominant-baseline: central; }
.plan .olcu text { font-size: 4.4px; font-weight: 500; }

/* ---------- antet (pafta künyesi) ---------- */
.antet {
  grid-area: antet;
  margin: 0;
  border-left: 1.5px solid var(--cizgi);
  border-top: 1.5px solid var(--cizgi);
  display: grid;
  grid-template-columns: max-content 1fr;
  background: var(--kagit);
  font-size: 15px;
  line-height: 1.35;
}
.antet dt,
.antet dd {
  margin: 0;
  padding: 8px 16px;
  border-top: 1px solid rgba(31, 57, 87, 0.28);
}
.antet dt:first-of-type,
.antet dt:first-of-type + dd { border-top: 0; }
.antet dt {
  font-stretch: 78%;
  font-weight: 500;
  font-size: 16px;
  border-right: 1px solid rgba(31, 57, 87, 0.28);
  min-width: 6.2rem;
}
.antet dd { font-weight: 600; }
.antet a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.antet a:hover { text-decoration-color: var(--turuncu); text-decoration-thickness: 2px; }
.antet a:focus-visible { outline: 3px solid var(--turuncu); outline-offset: 2px; }

.durum::before {
  content: "";
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-right: 0.55em;
  border-radius: 50%;
  background: var(--turuncu);
  vertical-align: 0.02em;
}

.alt {
  grid-area: alt;
  align-self: end;
  padding: 0 clamp(24px, 4.4vw, 64px) 18px;
  font-size: 15px;
  font-stretch: 85%;
}
.alt {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 4px 24px;
}
.alt p { margin: 0; }
.alt a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.alt a:hover { text-decoration-color: var(--turuncu); text-decoration-thickness: 2px; }
.alt a:focus-visible { outline: 3px solid var(--turuncu); outline-offset: 3px; }

/* ---------- çizim animasyonu (yalnız hareket tercihi serbestse) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .plan .hat {
    stroke-dasharray: 1;
    animation: ciz 0.8s cubic-bezier(0.3, 0.6, 0.3, 1) backwards;
    animation-delay: calc(var(--i) * 0.12s + 0.15s);
  }
  .plan .olcu line,
  .plan .eksen line {
    stroke-dasharray: 1;
    animation: ciz 0.7s ease-out backwards;
    animation-delay: 2.9s;
  }
  .plan .eksen circle,
  .plan .eksen text,
  .plan .olcu text {
    animation: belir 0.5s ease-out backwards;
    animation-delay: 3.4s;
  }
}
@keyframes ciz { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes belir { from { opacity: 0; } to { opacity: 1; } }

/* ---------- tablet ve mobil ---------- */
@media (max-width: 900px) {
  :root { --kenar: 10px; }
  .pafta {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      "logo"
      "metin"
      "sahne"
      "antet"
      "alt";
  }
  .logo { padding: 22px 20px 0; }
  .logo img { width: 190px; }
  .metin { padding: 28px 20px 36px; max-width: none; }
  h1 { font-size: clamp(2.35rem, 11.6vw, 3.6rem); }
  .sahne {
    border-left: 0;
    border-top: 1.5px solid var(--cizgi);
    padding: 20px 14px;
  }
  .plan { max-height: none; max-width: 560px; margin-inline: auto; }
  .plan .eksen text { font-size: 6px; }
  .plan .olcu text { font-size: 5.6px; }
  .antet { border-left: 0; }
  .antet dt,
  .antet dd { padding-block: 12px; }
  .antet a { display: inline-block; padding-block: 2px; }
  .antet dt { min-width: 6rem; }
  .alt {
    padding: 10px 20px 10px;
    border-top: 1px solid rgba(31, 57, 87, 0.28);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    text-align: center;
  }
  .alt a { display: inline-block; padding-block: 11px; }
}

/* masaüstü: pafta tam ekran, sayfa kaymaz */
@media (min-width: 901px) {
  html,
  body { height: 100%; overflow: hidden; }
  .pafta {
    height: calc(100vh - var(--kenar) * 2);
    height: calc(100svh - var(--kenar) * 2);
    min-height: 0;
    overflow: hidden;
  }
  .sahne {
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .plan { height: 100%; max-height: 100%; }
}
/* kısa pencere: aynı tasarım, sıkıştırılmış ritim */
@media (min-width: 901px) and (max-height: 700px) {
  body { font-size: 16px; line-height: 1.45; }
  h1 { font-size: clamp(2.2rem, min(5.4vw, 7.4vh), 5.2rem); }
  .metin { padding-block: 10px; }
  .sonuc,
  .selam { margin-top: 14px; }
  .selam { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
  .logo { padding-top: 16px; }
  .logo img { width: clamp(150px, min(15vw, 19vh), 210px); }
  .antet dt,
  .antet dd { padding-block: 4px; }
  .alt { padding-bottom: 10px; }
  .sahne { padding: 14px; }
}

/* pencere çok kısaysa içerik kesilmesin, sayfa kaysın */
@media (min-width: 901px) and (max-height: 520px) {
  html,
  body { height: auto; overflow: auto; }
  .pafta { height: auto; min-height: calc(100svh - var(--kenar) * 2); overflow: visible; }
  .plan { height: auto; max-height: 70vh; }
}

@media (max-width: 400px) {
  .plan .eksen text { font-size: 7px; }
  .plan .olcu text { font-size: 6.4px; }
}

/* kısa dizüstü ekranlarda pafta kaydırmasız sığsın */
@media (min-width: 901px) and (max-height: 760px) {
  .antet { font-size: 14px; }
  .antet dt { font-size: 15px; }
  .antet dt,
  .antet dd { padding-block: 6px; }
}

/* ---------- 404 ---------- */
.pafta--tek {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "logo" "metin" "alt";
}
.bag {
  display: inline-block;
  margin-top: clamp(20px, 2.4vw, 32px);
  padding: 14px 22px;
  background: var(--lacivert);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
}
.bag:hover { background: #b84410; }
.bag:focus-visible,
.logo a:focus-visible {
  outline: 3px solid var(--turuncu);
  outline-offset: 3px;
}
