/* ============================================================
   XMARIT — Cinematic scrollytelling landing page
   Deep green-black void throughout · bio-green accent
   Serif display (Fraunces) + minimal sans (Inter)
   Video colors (KlingAI transitions) are left ungraded — no filters.
   ============================================================ */

:root {
  --void: #0d130f;
  --void-2: #111810;
  --void-3: #161f17;

  --ink: #f2f4ee;
  --ink-dim: #aab3a4;
  --muted: #7d8779;

  --green: #16c98a;
  --green-deep: #0e9d68;
  --cyan: #06b6d4;
  --grad: linear-gradient(135deg, var(--green), var(--cyan));

  --border: rgba(255, 255, 255, 0.12);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.loading { overflow: hidden; height: 100vh; height: 100dvh; }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--green); }

.cin-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--green);
}
.cin-eyebrow--center { display: block; text-align: center; }

/* ============================================================
   LOADER
   ============================================================ */

.loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--void);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  transition: opacity .8s var(--ease), visibility .8s var(--ease);
}
.loader.is-done { opacity: 0; visibility: hidden; }

.loader__brand { display: flex; align-items: center; justify-content: center; }
.loader__brand .brand-logo { height: 64px; width: auto; }

.loader__bar { width: 180px; height: 2px; background: rgba(255,255,255,.14); border-radius: 2px; overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0%; background: var(--grad); transition: width .3s ease; }
.loader__note { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #8a9086; }

/* ============================================================
   NAV
   ============================================================ */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 36px;
  color: var(--ink);
}

.brand { display: flex; align-items: center; }

.brand-logo { height: 34px; width: auto; flex-shrink: 0; }

.nav-links { display: flex; align-items: center; gap: 34px; font-size: .92rem; color: inherit; }
.nav-links a { opacity: .78; transition: opacity .3s ease; color: inherit; }
.nav-links a:hover { opacity: 1; }

.nav-cta {
  padding: 9px 20px; border-radius: 999px;
  border: 1px solid currentColor; opacity: .9 !important;
}

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .3s var(--ease); }

/* ============================================================
   HERO — single continuous pinned video sequence
   İzmarit → Filtre → Moleküler Ağ, full-bleed, cinematic camera drift
   ============================================================ */

.hero { height: 460vh; position: relative; }

.hero__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; width: 100%;
  background: var(--void);
  display: flex; align-items: center; justify-content: center;
}

.hero__frame { position: absolute; inset: 0; overflow: hidden; background: var(--void); }

.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.1s var(--ease); }
.hero__media.is-active { opacity: 1; }
.hero__media video {
  width: 100%; height: 100%; object-fit: cover;
  transform-origin: center center;
  will-change: transform;
  /* renkler bilinçli olarak işlenmiyor — KlingAI görüntülerinin orijinal tonu korunuyor */
}

.hero__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 48%, transparent 44%, rgba(13,19,15,.42) 80%, rgba(13,19,15,.9) 100%);
}

.stage-label {
  position: absolute; z-index: 4; left: 6vw; bottom: 9vh; max-width: 420px;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.stage-label.is-in { opacity: 1; transform: translateY(0); }
.stage-label .cin-eyebrow { text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.stage-label h3 {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem); color: #fff; margin-top: 8px;
  text-shadow: 0 2px 14px rgba(0,0,0,.6);
}
.stage-label__line { display: block; height: 1px; width: 60px; margin-top: 14px; background: linear-gradient(90deg, var(--green), transparent); }

.hero__scrollhint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 5;
  transition: opacity .5s ease;
}
.hero__scrollhint.is-hidden { opacity: 0; }
.hero__scrollhint-line {
  position: relative; width: 1px; height: 40px;
  background: linear-gradient(var(--green), transparent);
  animation: drop 2s ease-in-out infinite; transform-origin: top;
}
@keyframes drop { 0%, 100% { transform: scaleY(.4); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ============================================================
   PRESTIGE — big number moment
   ============================================================ */

.prestige { background: var(--void-2); padding: 26vh 8vw; text-align: center; }
.prestige__inner { max-width: 900px; margin: 0 auto; }

.prestige__big {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(3.4rem, 15vw, 11rem);
  line-height: .94; color: var(--ink); letter-spacing: -.03em;
}
.prestige__big i { font-style: italic; color: var(--green); font-size: .48em; }

.prestige__sub {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: var(--ink-dim); margin-top: 20px;
}

/* ============================================================
   STORY LINES
   ============================================================ */

.story { background: var(--void); padding: 24vh 8vw; }
.story__inner { max-width: 900px; margin: 0 auto; }

.story__line {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.01em;
  font-size: clamp(1.5rem, 4vw, 2.9rem); line-height: 1.22;
  margin: 0 0 .4em;
}
.story__line--dim { color: var(--ink-dim); }
.story__line--accent { color: var(--ink); }
.story__line--accent em { color: var(--green); }

/* ============================================================
   TEKNOLOJİ — plain text section, no jargon
   ============================================================ */

.tech { background: var(--void-2); padding: 22vh 8vw; }
.tech__inner { max-width: 720px; margin: 0 auto; }

.tech__h {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.12;
  color: var(--ink); margin: 18px 0 22px;
}

.tech__p { font-size: 1.05rem; line-height: 1.8; color: var(--ink-dim); max-width: 560px; }

/* ============================================================
   ENGINE — ambient looping video + spec grid
   ============================================================ */

.engine {
  position: relative; min-height: 118vh;
  display: flex; align-items: center; overflow: hidden;
  padding: 14vh 0; background: var(--void);
}
.engine .hero__media { opacity: 1; }
.engine .hero__media video { opacity: .3; }

.engine__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(120% 100% at 50% 50%, rgba(13,19,15,.6), rgba(13,19,15,.94));
}

.engine__inner { position: relative; z-index: 3; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 6vw; text-align: center; }

.engine__h {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 4.8vw, 3.4rem); line-height: 1.12;
  color: #fff; margin: 18px auto 54px; max-width: 760px;
}
.engine__h em { color: var(--green); }

.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.spec { padding: 24px 12px; border-top: 1px solid rgba(22, 201, 138, .35); }
.spec__n {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.6rem, 5vw, 4rem);
  color: var(--green); line-height: 1; letter-spacing: -.02em;
}
.spec__n--word { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-style: italic; }

.spec__l { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-dim); margin-top: 12px; }

.engine__foot {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.4rem); color: var(--muted); margin-top: 52px;
}

/* ============================================================
   HAKKIMIZDA / TAKIM
   ============================================================ */

.team { background: var(--void-2); padding: 22vh 8vw; text-align: center; }
.team__inner { max-width: 900px; margin: 0 auto; }

.team__h {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.14;
  color: var(--ink); margin: 16px 0 50px;
}

.team__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  text-align: left;
}

.team__card {
  display: block; padding: 34px 30px; border-radius: 20px;
  background: var(--void-3); border: 1px solid var(--border);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.team__card:hover { border-color: var(--green-deep); transform: translateY(-3px); }

.team__avatar {
  width: 56px; height: 56px; border-radius: 50%; margin-bottom: 18px;
  background: var(--grad); opacity: .35;
  /* TODO: gerçek fotoğraf eklenince buraya background-image ile değiştirilecek */
}

.team__card h3 {
  font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--ink); margin-bottom: 4px;
}
.team__role { font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--green); display: block; margin-bottom: 20px; }
.team__linkedin { font-size: .85rem; font-weight: 500; color: var(--ink); opacity: .75; transition: opacity .3s ease; }
.team__card:hover .team__linkedin { opacity: 1; color: var(--green); }

/* ============================================================
   CTA / İLETİŞİM
   ============================================================ */

.cta {
  position: relative; z-index: 10;
  background: var(--void-2);
  border-top: 1px solid var(--border);
  padding: 20vh 8vw 12vh; text-align: center;
}
.cta__inner { max-width: 620px; margin: 0 auto; }

.cta__h {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; color: var(--ink);
  margin-top: 16px;
}
.cta__h em { color: var(--green); }

.cta__p { font-size: 1rem; color: var(--ink-dim); margin-top: 18px; }

.contact-form { display: flex; flex-direction: column; gap: 16px; text-align: left; margin-top: 44px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.contact-form input, .contact-form textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255,255,255,.04);
  color: var(--ink); font-family: var(--sans); font-size: .95rem; resize: vertical;
  transition: border-color .3s var(--ease);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--green); }

.cta__row { display: flex; gap: 16px; justify-content: flex-start; flex-wrap: wrap; margin-top: 6px; }

.cta__btn {
  font-size: .92rem; letter-spacing: .02em; font-weight: 500;
  padding: 14px 28px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  color: var(--ink); background: none; cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.cta__btn:hover { border-color: var(--green); color: #fff; transform: translateY(-2px); }

.cta__btn--solid { background: var(--grad); color: #08120c; border-color: transparent; }
.cta__btn--solid:hover { color: #08120c; box-shadow: 0 10px 30px rgba(22,201,138,.28); }

/* ============================================================
   TEŞEKKÜR POPUP (MODAL)
   ============================================================ */

.modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }

.modal__backdrop { position: absolute; inset: 0; background: rgba(8, 12, 9, .74); }

.modal__card {
  position: relative; max-width: 440px; width: 100%;
  background: var(--void-3); border: 1px solid var(--border); border-radius: 20px;
  padding: 42px 36px; text-align: center;
  animation: modalIn .35s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

.modal__icon {
  width: 52px; height: 52px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--grad); color: #08120c; font-size: 24px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

.modal__msg { font-family: var(--serif); font-size: 1.18rem; line-height: 1.55; color: var(--ink); }

.modal__close { margin-top: 28px; }

@media (prefers-reduced-motion: reduce) {
  .modal__card { animation: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */

.cin-foot-wrap { background: var(--void); }
.cin-foot {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
  padding: 34px 8vw; margin: 0 auto; max-width: 1180px;
  font-size: 12px; letter-spacing: .04em; color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ============================================================
   REVEAL-ON-SCROLL
   ============================================================ */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 860px) {
  .specs { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 150;
    background: var(--void);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 6px; padding: 0 40px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
  }
  .nav-links a { width: 100%; padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 1.1rem; }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

  .nav-toggle { display: flex; z-index: 160; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { height: 340vh; }
  .stage-label { bottom: 11vh; max-width: 82vw; }
  .brand-logo { height: 28px; }
}

@media (max-width: 480px) {
  .prestige, .story, .tech { padding-left: 7vw; padding-right: 7vw; }
  .cta { padding: 16vh 7vw 10vh; }
  .cin-foot { flex-direction: column; text-align: center; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scrollhint-line { animation: none; }
  .reveal { transition-duration: .01ms !important; }
}
