/* ============================================================================
   MZ DOOR site stilleri
   Sıra: scrollcraft.css → tokens.css → door.css → site.css
   ========================================================================== */

/* ------------------------------------------------------------- fontlar -- */
/* Yalnızca Türkçe için gereken karakter setleri (latin + latin-ext). */
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/big-shoulders-display-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/big-shoulders-display-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --sc-font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --sc-font-text: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --header-h: 72px;
  --tap: 52px; /* parmakla rahat basılacak en küçük yükseklik */
}
@media (max-width: 700px) {
  :root { --header-h: 60px; }
}

body { font-family: var(--sc-font-text); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------ butonlar -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: var(--tap);
  padding: 0 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  transition: transform var(--sc-d-fast) var(--sc-ease-out), opacity var(--sc-d-fast) var(--sc-ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--amber {
  background: var(--mz-amber);
  color: var(--mz-night);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 18px -8px rgba(0, 0, 0, 0.7);
}
button.btn { border: 0; cursor: pointer; font-family: inherit; }
.btn--ghost {
  background: transparent;
  color: var(--mz-ink);
  box-shadow: inset 0 0 0 1px rgba(237, 234, 228, 0.35);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1px rgba(237, 234, 228, 0.7); }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn--sm { min-height: 44px; padding: 0 1.1rem; font-size: 0.95rem; }

/* ----------------------------------------------------------------- menü -- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--sc-z-chrome);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: clamp(16px, 4vw, 48px);
}
/* Kaydırdıkça koyulaşan zemin. JS yalnızca opacity'yi değiştirir. */
.site-header__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: rgba(20, 23, 26, 0.92);
  box-shadow: 0 1px 0 rgba(237, 234, 228, 0.06);
}
.brand { display: block; line-height: 0; }
.brand img { height: 30px; width: auto; }

.site-nav { display: flex; align-items: center; }
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__list a:not(.btn) {
  color: var(--mz-ink);
  text-decoration: none;
  font-size: 0.98rem;
  opacity: 0.82;
  transition: opacity var(--sc-d-fast) var(--sc-ease-out);
}
.site-nav__list a:not(.btn):hover,
.site-nav__list a:not(.btn):focus-visible,
.site-nav__list a[aria-current="page"] { opacity: 1; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .brand img { height: 26px; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0 0.9rem;
    border: 0;
    border-radius: 6px;
    background: rgba(237, 234, 228, 0.08);
    color: var(--mz-ink);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
  }
  .nav-toggle__bars { width: 18px; height: 12px; position: relative; }
  .nav-toggle__bars::before,
  .nav-toggle__bars::after,
  .nav-toggle__bars span {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--sc-d-base) var(--sc-ease-out), opacity var(--sc-d-base) var(--sc-ease-out);
  }
  .nav-toggle__bars::before { top: 0; }
  .nav-toggle__bars span { top: 5px; }
  .nav-toggle__bars::after { top: 10px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

  /* Açılır menü: yukarıdan aşağı kapı gibi iner (clip-path) */
  .site-nav__list {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem clamp(16px, 4vw, 48px) 1.25rem;
    background: rgba(20, 23, 26, 0.97);
    box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.6);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path var(--sc-d-slow) var(--sc-ease-drawer), visibility 0s linear var(--sc-d-slow);
  }
  .site-nav.is-open .site-nav__list {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path var(--sc-d-slow) var(--sc-ease-drawer), visibility 0s;
  }
  .site-nav__list li { border-bottom: 1px solid rgba(237, 234, 228, 0.08); }
  .site-nav__list li:last-child { border-bottom: 0; padding-top: 1rem; }
  .site-nav__list a:not(.btn) {
    display: flex;
    align-items: center;
    min-height: var(--tap);
    font-size: 1.1rem;
    opacity: 1;
  }
  .site-nav__list .btn { width: 100%; min-height: var(--tap); }
}

/* ======================================================= AÇILIŞ SAHNESİ == */
.hero__stage {
  background: var(--mz-night);
}

.hero__door {
  position: absolute;
  inset: 0;
  --door-inset-x: 11%;
  --door-inset-top: calc(var(--header-h) + 5vh);
  --door-inset-bottom: 21%;
  --door-spill-height: 17%;
}

/* Başlık ve butonlar: kapının ARKASINDA, iç mekânın önünde.
   Yazıyı kapının kendisi açığa çıkarır. */
.hero__copy {
  position: absolute;
  z-index: 1;
  left: 6%;
  right: 6%;
  bottom: 9%;
  max-width: 44rem;
  will-change: transform;
  /* Başlık hem genişliğe hem yüksekliğe bakar: kısa dizüstü ekranlarında taşmasın.
     --hero-fit: kapı panelleriyle çakışırsa js/hero.js küçültür (fitCopy). */
  --title-fs: clamp(2.9rem, min(1.4rem + 4.6vw, 11.5vh), 6.4rem);
  --lede-fs: clamp(1.02rem, 0.95rem + 0.35vw, 1.2rem);
}
.hero__title {
  margin: 0;
  font-family: var(--sc-font-display);
  font-weight: 700;
  font-size: calc(var(--title-fs) * var(--hero-fit, 1));
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: var(--mz-ink);
  text-wrap: balance;
}
.hero__more { margin-top: 1.25rem; }
.hero__lede {
  margin: 0;
  max-width: 34rem;
  font-size: calc(var(--lede-fs) * max(var(--hero-fit, 1), 0.88));
  line-height: 1.55;
  color: rgba(237, 234, 228, 0.86);
  text-wrap: pretty;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Kapı kapalıyken zeminde duran slogan */
.hero__floor-note {
  position: absolute;
  z-index: 3;
  left: var(--door-inset-x, 11%);
  bottom: 6%;
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--mz-ink-soft);
  will-change: opacity;
}

@media (max-width: 700px) {
  .hero__door {
    --door-inset-x: 5%;
    --door-inset-top: calc(var(--header-h) + 3vh);
    /* alttaki arama çubuğu + kumanda için yer (kumanda kapı açıklığına binmesin) */
    --door-inset-bottom: calc(var(--callbar-h, 0px) + 104px);
    --door-spill-height: 12%;
  }
  .hero__copy {
    left: 7%; right: 7%; bottom: 6%;
    --title-fs: clamp(2.3rem, min(1.6rem + 5vw, 7vh), 3.4rem);
    --lede-fs: 1rem;
  }
  .hero__more { margin-top: 0.9rem; }
  .hero__actions { flex-direction: column; gap: 0.6rem; margin-top: 1.1rem; }
  .hero__actions .btn { width: 100%; }
  .hero__floor-note { bottom: calc(var(--callbar-h, 0px) + 22px); max-width: 60%; font-size: 0.9rem; }
}

/* ---------------------------------------------------------- kumanda -- */
.remote {
  position: fixed;
  right: clamp(14px, 2.2vw, 30px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(14px, 2.6vw, 30px));
  z-index: calc(var(--sc-z-chrome) + 1);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  transition: opacity var(--sc-d-slow) var(--sc-ease-out), transform var(--sc-d-slow) var(--sc-ease-out), visibility 0s;
}
.remote.is-away {
  opacity: 0;
  transform: translateY(12px);
  visibility: hidden;
  transition: opacity var(--sc-d-slow) var(--sc-ease-out), transform var(--sc-d-slow) var(--sc-ease-out), visibility 0s linear var(--sc-d-slow);
}
/* Açılış sahnesi geçilince kumanda köşede küçülür (basınca kapanış sahnesine götürür) */
.remote.is-compact { transform: scale(0.82); transform-origin: 100% 100%; }
.remote.is-compact .remote__hint { display: none; }

.remote__hint {
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  background: rgba(20, 23, 26, 0.85);
  color: var(--mz-ink);
  font-size: 0.88rem;
  white-space: nowrap;
  pointer-events: none;
}

/* Kumanda gövdesi: gerçek bir kapı kumandası formunda */
.remote__body {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 64px;
  padding: 10px 0 12px;
  border: 0;
  border-radius: 20px 20px 24px 24px;
  background: linear-gradient(180deg, #2E3338 0%, #1E2226 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -2px 0 rgba(0, 0, 0, 0.45),
    0 4px 10px -2px rgba(0, 0, 0, 0.6),
    0 14px 30px -10px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* anahtarlık halkası */
.remote__body::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 16px;
  height: 10px;
  margin-left: -8px;
  border-radius: 8px 8px 0 0;
  box-shadow: inset 0 0 0 3px #2A2E33;
}
.remote__led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3B4046;
  transition: background var(--sc-d-fast) linear;
}
.remote.is-running .remote__led { background: var(--mz-amber); }
.remote__btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #3A4046, #24282C 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 3px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.6);
  transition: transform var(--sc-d-fast) var(--sc-ease-out);
}
.remote__btn img { width: 25px; height: auto; }
.remote__body:active .remote__btn { transform: translateY(1px) scale(0.96); }
.remote__body:focus-visible { outline-offset: 4px; border-radius: 20px 20px 24px 24px; }

@media (max-width: 700px) {
  /* Dar ekranda ipucu, soldaki sloganla çakışmasın diye kumandanın üstünde durur */
  .remote { flex-direction: column; align-items: flex-end; gap: 0.6rem; }
  .remote__hint { font-size: 0.82rem; }
  .remote__body { width: 58px; padding: 9px 0 10px; }
  .remote__btn { width: 44px; height: 44px; }
}

/* ------------------------------------------ geçici bölümler (Aşama 6) -- */
.placeholder {
  min-height: 60vh;
  padding: calc(var(--header-h) + 3rem) clamp(16px, 6vw, 96px) 4rem;
  border-top: 1px solid rgba(237, 234, 228, 0.06);
}
.placeholder h2 {
  margin: 0 0 0.5rem;
  font-family: var(--sc-font-display);
  font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem);
  line-height: 1;
}
.placeholder p { margin: 0; color: var(--mz-ink-soft); }

/* ---------------------------------------------------- hareketi azalt -- */
@media (prefers-reduced-motion: reduce) {
  .hero [data-sc-cue] { opacity: 1 !important; transform: none !important; }
  .btn, .remote, .remote__btn, .site-nav__list { transition: none !important; }
}
