:root {
  --paper: #f6f5f1;
  --card: #ffffff;
  --ink: #17171a;
  --muted: #6b6963;
  --line: #e2dfd7;
  --line-2: #cfcabd;
  --skel: #e4e0d6;
  --accent: #1f4fd8;

  --c-plan: #2f5bd3;
  --c-code: #1a7f4b;
  --c-design: #d1495b;
  --c-content: #b07800;
  --c-check: #17171a;

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: var(--mono); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ================= Sayfa ================= */
.page {
  min-height: 100vh; min-height: 100svh;
  max-width: 1200px; margin: 0 auto;
  padding: 22px 16px;
  display: flex; flex-direction: column;
}
@media (min-width: 700px) { .page { padding: 28px 32px; } }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* Logo kendi en-boy oranını korur: yükseklik sabit, genişlik serbest */
.logo { flex: none; display: flex; align-items: center; height: var(--logo-h, 46px); min-width: 0; }
.logo img { display: block; height: 100%; width: auto; max-width: min(340px, 70vw); object-fit: contain; object-position: left center; }
.logo[hidden], .brand-name[hidden] { display: none; }
.brand-name { font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hero {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: clamp(48px, 10vh, 110px) 0;
}
.eyebrow { margin: 0 0 18px; font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
.title {
  margin: 0; font-weight: 600;
  font-size: clamp(2.6rem, 9vw, 6.2rem); line-height: 1; letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.title > span { display: inline-block; }
.dot { color: var(--accent); }
.lead { margin: 22px 0 0; max-width: 34em; font-size: clamp(1rem, 2vw, 1.15rem); color: #46443f; }

.countdown { margin: 16px 0 0; font-size: .82rem; color: var(--muted); }

.contact { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.section-label { margin: 0 0 14px; font-size: .78rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  padding: 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none;
  transition: border-color .2s;
}
a.card:hover { border-color: var(--ink); }
.card .icon {
  width: 32px; height: 32px; margin-bottom: 10px; border-radius: 8px;
  display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink);
}
.card .icon svg { width: 16px; height: 16px; }
.card .label { font-size: .72rem; color: var(--muted); font-family: var(--mono); }
.card .value { font-weight: 500; font-size: .95rem; overflow-wrap: break-word; word-break: break-word; }

.social { display: flex; gap: 8px; margin-top: 14px; }
.social:empty { display: none; }
.social a {
  width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  transition: border-color .2s;
}
.social a:hover { border-color: var(--ink); }
.social svg { width: 16px; height: 16px; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px;
  padding-top: 18px; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--muted);
}
.credit a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.credit a:hover { color: var(--accent); }

/* ================= İnşa durumları ================= */
.js-build [data-b]:not(.built) { visibility: hidden; }
.js-build [data-b].built { visibility: visible; }
.js-build .built:not([data-b="text"]) { animation: appear .35s ease-out; }
.rest { visibility: hidden; }
@keyframes appear { from { opacity: 0; } }

/* Kontrol ajanının düzelteceği "kusurlar" */
.dot, .card { transition: color .5s, background-color .5s, transform .5s cubic-bezier(.2,.8,.2,1), border-color .2s; }
.dot.unfixed { color: var(--line-2); }
.card.unfixed { transform: translate(6px, -5px) rotate(-.6deg); }
.card.unfixed:nth-child(even) { transform: translate(-4px, 4px) rotate(.5deg); }

/* ================= Sahne (imleçler) ================= */
.stage { position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; pointer-events: none; z-index: 20; transition: opacity .8s; }
.stage.out { opacity: 0; }
.layer { position: absolute; inset: 0; transition: opacity .8s; }

.grid {
  background-image:
    linear-gradient(rgba(23, 23, 26, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 26, .045) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Plan */
.p-rect { position: absolute; border: 1px dashed var(--c-plan); border-radius: 4px; opacity: .8; }
.p-rect.child { opacity: 0; transition: opacity .25s; }
.p-rect.child.on { opacity: .55; }
.p-region { border-style: solid; border-width: 1.5px; background: rgba(47, 91, 211, .035); transition-property: width, height; transition-timing-function: linear; }
.p-label {
  position: absolute; left: -1px; top: -19px; padding: 1px 6px;
  background: var(--c-plan); color: #fff; font: 500 10px/1.5 var(--mono); border-radius: 3px 3px 0 0; white-space: nowrap;
}
.plan.faint { opacity: .3; }

/* Kod */
.code-line {
  position: absolute; white-space: pre; overflow: hidden;
  font: 500 10.5px/1.35 var(--mono); color: var(--c-code);
  background: rgba(246, 245, 241, .75); padding: 0 2px; border-radius: 2px;
  transition: opacity .35s;
}
.code-line.typing::after { content: ""; display: inline-block; width: 1px; height: 11px; margin-left: 1px; vertical-align: -1px; background: var(--c-code); }
.code-line.css { color: #4d7c0f; }
.code-line.css.typing::after { background: #4d7c0f; }
.code-line.gone { opacity: 0; }

/* Tasarım iskeletleri */
.sk { position: absolute; border-radius: 4px; background: var(--skel); transform-origin: left center; transform: scaleX(0); transition: transform .2s ease-out, opacity .3s; }
.sk.on { transform: none; }
.sk.box { background: rgba(255, 255, 255, .55); border: 1px solid var(--line-2); border-radius: 10px; }
.sk.img { border-radius: 8px; background: #d9d4c8; }
.sk.gone { opacity: 0; }

/* Kontrol */
.k-outline { position: absolute; border: 1.5px solid var(--c-check); border-radius: 6px; opacity: 0; transition: opacity .3s, border-color .4s; }
.k-outline.on { opacity: 1; }
.k-outline.ok { border-color: rgba(23, 23, 26, .25); }
.k-tag {
  position: absolute; right: -1px; top: -19px; padding: 1px 6px;
  background: var(--c-check); color: #fff; font: 500 10px/1.5 var(--mono); border-radius: 3px 3px 0 0; white-space: nowrap;
}

/* İmleç */
.cur {
  position: absolute; left: 0; top: 0; z-index: 5;
  transition-property: transform, opacity;
  transition-timing-function: cubic-bezier(.45, .05, .25, 1), ease;
  transition-duration: 0s, .3s;
  will-change: transform; opacity: 0;
}
.cur.on { opacity: 1; }
.cur.linear { transition-timing-function: linear, ease; }
.cur svg { display: block; width: 18px; height: 18px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.cur span {
  position: absolute; left: 14px; top: 16px; padding: 1px 7px;
  color: #fff; font: 500 11px/1.6 var(--font); border-radius: 4px; white-space: nowrap;
}

/* Atla düğmesi */
.process { position: fixed; right: 14px; bottom: 14px; z-index: 30; transition: opacity .6s; }
.process[hidden] { display: none; }
.process.out { opacity: 0; pointer-events: none; }
.skip {
  font: 500 .8rem/1 var(--font); color: var(--ink); cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.skip:hover { border-color: var(--ink); }

/* ---------- Mobil: tüm bilgiler tek ekrana sığsın ---------- */
@media (max-width: 640px) {
  .process { top: 12px; right: 12px; bottom: auto; }   /* alt bilgiyi kapatmasın */
  .skip { padding: 7px 11px; font-size: .74rem; }

  .page { padding: 14px 16px 12px; }
  .top { padding-bottom: 12px; }
  .logo { height: calc(var(--logo-h, 46px) * .8); }
  .logo img { max-width: 72vw; }
  .brand { gap: 10px; }
  .brand-name { font-size: .95rem; }

  .hero { padding: clamp(16px, 4vh, 40px) 0; }
  .eyebrow { margin-bottom: 10px; font-size: .72rem; }
  .title { font-size: clamp(1.9rem, 9.2vw, 2.6rem); }
  .lead { margin-top: 12px; font-size: .92rem; line-height: 1.45; }
  .countdown { margin-top: 10px; font-size: .74rem; }

  .contact { padding: 12px 0 14px; }
  .section-label { margin-bottom: 8px; font-size: .7rem; }
  .cards { gap: 6px; grid-template-columns: 1fr; }
  /* Kart → ince satır: ikon solda, etiket + değer sağda */
  .card {
    display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; row-gap: 0;
    align-items: center; padding: 7px 12px; border-radius: 8px;
  }
  .card .icon { grid-row: 1 / 3; width: 30px; height: 30px; margin: 0; border-radius: 7px; }
  .card .icon svg { width: 14px; height: 14px; }
  .card .label { font-size: .64rem; line-height: 1.3; }
  .card .value { font-size: .86rem; line-height: 1.3; }
  .social { margin-top: 8px; gap: 6px; }
  .social a { width: 32px; height: 32px; }
  .social svg { width: 14px; height: 14px; }

  .foot { padding-top: 10px; font-size: .74rem; gap: 2px 12px; }
}

/* Kısa ekranlar (ör. iPhone SE) için bir kademe daha sıkı */
@media (max-width: 640px) and (max-height: 720px) {
  .page { padding-top: 10px; }
  .top { padding-bottom: 10px; }
  .hero { padding: 12px 0; }
  .title { font-size: clamp(1.7rem, 8.4vw, 2.2rem); }
  .lead { font-size: .86rem; margin-top: 8px; }
  .contact { padding: 10px 0 10px; }
  .cards { gap: 5px; }
  .card { padding: 5px 10px; }
  .card .icon { width: 26px; height: 26px; }
  .card { grid-template-columns: 26px 1fr; column-gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
