/* ===========================================================
   YapıLab — Architecture & Project Management
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Inter:wght@300;400;500;600&display=swap');

:root{
  --bg: #0a0b0a;
  --bg-soft: #101210;
  --panel: #14150f;
  --text: #f2efe6;
  --muted: #a6a299;
  --muted-2: #6f6c64;
  --accent: #c8a15a;
  --accent-soft: #d9bd85;
  --line: rgba(242,239,230,0.12);
  --line-strong: rgba(242,239,230,0.24);
  --ease: cubic-bezier(.16,.84,.32,1);
  --container: 1240px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{
  background: var(--bg);
  scroll-behavior: auto;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display{
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

p{ margin: 0; }

a{ color: inherit; text-decoration: none; }

img{ max-width: 100%; display: block; }

::selection{ background: var(--accent); color: #0a0b0a; }

.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.eyebrow::before{
  content: '';
  width: 26px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

section{ position: relative; }

/* ---------- scrollbar (webkit) ---------- */
::-webkit-scrollbar{ width: 10px; }
::-webkit-scrollbar-track{ background: var(--bg); }
::-webkit-scrollbar-thumb{ background: var(--line-strong); border-radius: 10px; }

/* ===========================================================
   Cursor
   =========================================================== */
.cursor-dot, .cursor-ring{
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  will-change: transform;
}
.cursor-dot{
  width: 6px; height: 6px;
  background: var(--accent);
}
.cursor-ring{
  width: 36px; height: 36px;
  border: 1px solid var(--line-strong);
  transition: width .25s var(--ease), height .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.cursor-ring.is-active{
  width: 64px; height: 64px;
  border-color: var(--accent);
  background: rgba(200,161,90,0.08);
}
@media (hover: none), (pointer: coarse){
  .cursor-dot, .cursor-ring{ display: none; }
}

/* ===========================================================
   Progress bar
   =========================================================== */
.scroll-progress{
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 9998;
  transition: width .05s linear;
}

/* ===========================================================
   Preloader
   =========================================================== */
#preloader{
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.preloader-mark{
  display: flex;
  gap: clamp(4px, 1vw, 10px);
}
.preloader-mark span{
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 6vw, 56px);
  color: var(--text);
  opacity: 0;
  transform: translateY(24px);
}
.preloader-count{
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.preloader-bar{
  width: 200px;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.preloader-bar::after{
  content: '';
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--accent);
}
body.is-loaded #preloader{ display: none; }

/* ===========================================================
   Header
   =========================================================== */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 26px 0;
  transition: padding .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled{
  padding: 16px 0;
  background: rgba(10,11,10,0.82);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Fraunces', serif;
  font-size: 20px;
  letter-spacing: 0.02em;
}
.brand-mark{
  width: 26px; height: 26px;
  flex-shrink: 0;
}
.brand-tag{
  display: none;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-left: 6px;
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
}
@media (min-width: 720px){ .brand-tag{ display: inline-block; } }

.nav-links{
  display: none;
  gap: 36px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a{
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after{
  content:'';
  position: absolute;
  left: 0; bottom: 0;
  height: 1px; width: 0%;
  background: var(--accent);
  transition: width .3s var(--ease);
}
.nav-links a:hover{ color: var(--text); }
.nav-links a:hover::after{ width: 100%; }
@media (min-width: 900px){ .nav-links{ display: flex; } }

.nav-cta{
  display: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  padding: 10px 20px;
  border-radius: 999px;
}
@media (min-width: 900px){ .nav-cta{ display: inline-flex; align-items:center; } }
.nav-cta:hover{ border-color: var(--accent); color: var(--accent); }

.nav-toggle{
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
}
.nav-toggle span{
  height: 1px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
@media (min-width: 900px){ .nav-toggle{ display: none; } }

.mobile-nav{
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 400;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: 40px;
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}
.mobile-nav.is-open{ transform: translateY(0); }
.mobile-nav a{
  font-family: 'Fraunces', serif;
  font-size: 34px;
}

/* ===========================================================
   Marquee
   =========================================================== */
.marquee{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  background: var(--bg-soft);
}
.marquee-track{
  display: flex;
  width: max-content;
  gap: 40px;
  animation: marquee 30s linear infinite;
}
.marquee.reverse .marquee-track{ animation-direction: reverse; animation-duration: 38s; }
.marquee-track span{
  font-family: 'Fraunces', serif;
  font-size: clamp(16px, 2.4vw, 26px);
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 40px;
}
.marquee-track span em{
  font-style: normal;
  color: var(--accent);
  margin-right: 40px;
}
@keyframes marquee{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* ===========================================================
   Hero
   =========================================================== */
.hero{
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  position: relative;
}
#hero-canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
}
.hero .container{
  position: relative;
  z-index: 2;
}
.hero-eyebrow{ margin-bottom: 26px; }
.hero-title{
  font-size: clamp(40px, 8vw, 104px);
  overflow: hidden;
}
.hero-title .line{
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.hero-title .line span{
  display: inline-block;
  transform: translateY(110%);
}
.hero-title em{
  font-style: italic;
  color: var(--accent);
}
.hero-sub{
  max-width: 520px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.hero-cta-row{
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 46px;
}
.btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.btn-primary{
  background: var(--accent);
  color: #0a0b0a;
  border-color: var(--accent);
}
.btn-primary:hover{ background: var(--accent-soft); border-color: var(--accent-soft); }
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); }

.hero-scroll-hint{
  position: absolute;
  bottom: 40px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  z-index: 2;
}
.hero-scroll-hint .stick{
  width: 1px; height: 34px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.hero-scroll-hint .stick::after{
  content:'';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: stick-drop 2.2s ease-in-out infinite;
}
@keyframes stick-drop{
  0%{ top: -100%; }
  60%{ top: 100%; }
  100%{ top: 100%; }
}

/* ===========================================================
   Section heads (shared)
   =========================================================== */
.section-pad{ padding: 140px 0; }
.section-head{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 70px;
}
.section-head h2{
  font-size: clamp(32px, 5vw, 56px);
  max-width: 620px;
}
.section-head .section-note{
  max-width: 320px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.reveal{
  opacity: 0;
  transform: translateY(50px);
}

/* ===========================================================
   About
   =========================================================== */
.about-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px){ .about-grid{ grid-template-columns: 1fr; gap: 50px; } }
.about-copy p{
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}
.about-copy p + p{ margin-top: 20px; }
.stat-list{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
@media (max-width: 560px){ .stat-list{ grid-template-columns: 1fr; } }
.stat-num{
  font-family: 'Fraunces', serif;
  font-size: 40px;
  color: var(--accent);
}
.stat-label{
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.about-frame{
  position: relative;
  aspect-ratio: 3/2;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.about-frame img{
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.25) contrast(1.05);
}
.about-frame .frame-tag{
  position: absolute;
  left: 20px; bottom: 20px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(10,11,10,0.6);
  backdrop-filter: blur(6px);
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

/* ===========================================================
   Services
   =========================================================== */
.services-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 800px){ .services-grid{ grid-template-columns: 1fr; } }
.service-card{
  background: var(--bg);
  padding: 50px 44px;
  position: relative;
  overflow: hidden;
  transition: background .4s var(--ease);
}
.service-card:hover{ background: var(--panel); }
.service-num{
  font-family: 'Fraunces', serif;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.service-card h3{
  margin-top: 26px;
  font-size: 26px;
  max-width: 340px;
}
.service-card p{
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  max-width: 380px;
}
.service-line{
  position: absolute;
  right: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.service-card:hover .service-line{ transform: scaleX(1); }

/* ===========================================================
   Portfolio (pinned horizontal scroll)
   =========================================================== */
.portfolio{ background: var(--bg-soft); }
.portfolio-pin{
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.portfolio-head{
  padding: 0 40px;
  margin-bottom: 50px;
}
.portfolio-track{
  display: flex;
  gap: 40px;
  padding: 0 40px;
  will-change: transform;
}
.portfolio-item{
  position: relative;
  flex: 0 0 auto;
  width: min(70vw, 560px);
}
.portfolio-frame{
  position: relative;
  width: 100%;
  aspect-ratio: 3/2;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.portfolio-frame img{
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform .8s var(--ease), filter .8s var(--ease);
  filter: grayscale(0.55) brightness(0.85);
}
.portfolio-item:hover .portfolio-frame img{
  transform: scale(1);
  filter: grayscale(0) brightness(1);
}
.portfolio-item-index{
  position: absolute;
  top: 20px; left: 20px;
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(10,11,10,0.55);
  backdrop-filter: blur(6px);
  z-index: 2;
}
.portfolio-meta{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 20px;
  gap: 20px;
}
.portfolio-meta h3{ font-size: 22px; }
.portfolio-meta span{
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.portfolio-progress{
  margin-top: 40px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.portfolio-progress-track{
  flex: 1;
  height: 1px;
  background: var(--line);
  position: relative;
}
.portfolio-progress-bar{
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
}
.portfolio-progress-label{
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 720px){
  .portfolio-pin{ height: auto; padding: 100px 0; }
  .portfolio-track{
    flex-direction: column;
    transform: none !important;
  }
  .portfolio-item{ width: 100%; }
  .portfolio-progress{ display: none; }
}

/* ===========================================================
   Film grain overlay
   =========================================================== */
.grain{
  position: fixed;
  inset: -100px;
  z-index: 9000;
  pointer-events: none;
  background-image: url('../img/noise.png');
  background-repeat: repeat;
  opacity: 0.05;
  mix-blend-mode: overlay;
  animation: grainShift 0.9s steps(4) infinite;
}
@keyframes grainShift{
  0%{ transform: translate(0,0); }
  25%{ transform: translate(-28px,16px); }
  50%{ transform: translate(20px,-24px); }
  75%{ transform: translate(-14px,-10px); }
  100%{ transform: translate(0,0); }
}
.no-motion .grain{ animation: none; }

/* ===========================================================
   Portfolio frame hover video
   =========================================================== */
.frame-video{
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s var(--ease);
  z-index: 1;
}
.portfolio-item:hover .frame-video,
.frame-video.is-playing{ opacity: 1; }

/* ===========================================================
   Showreel (scroll-scaling drone video)
   =========================================================== */
.showreel{
  padding: 140px 0;
  background: var(--bg);
  overflow: hidden;
}
.showreel-frame{
  position: relative;
  width: min(1240px, 92vw);
  margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  transform-origin: center;
}
.showreel-frame video{
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.02) saturate(1.05);
  display: block;
}
.showreel-caption{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 90px 40px 32px;
  background: linear-gradient(to top, rgba(10,11,10,0.85), transparent);
}
.showreel-tag{
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 14px;
  background: rgba(10,11,10,0.5);
  backdrop-filter: blur(6px);
}
.showreel-caption h3{
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 3vw, 34px);
}
.showreel-caption p{
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 720px){
  .showreel{ padding: 90px 0; }
  .showreel-frame{
    width: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .showreel-frame video{
    aspect-ratio: 16/9;
  }
  .showreel-caption{
    position: static;
    padding: 18px 24px 4px;
    background: none;
  }
  .showreel-caption p{ font-size: 13px; }
}

/* ===========================================================
   Process
   =========================================================== */
.process-list{ margin-top: 20px; }
.process-item{
  display: grid;
  grid-template-columns: 100px 1fr 40px;
  gap: 30px;
  align-items: center;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.process-item:last-child{ border-bottom: 1px solid var(--line); }
.process-num{
  font-family: 'Fraunces', serif;
  font-size: 15px;
  color: var(--muted-2);
}
.process-body h3{
  font-size: 24px;
}
.process-body p{
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  max-width: 620px;
  line-height: 1.7;
}
.process-arrow{
  font-size: 20px;
  color: var(--accent);
  transform: translateX(-8px);
  opacity: 0;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.process-item:hover .process-arrow{ transform: translateX(0); opacity: 1; }
@media (max-width: 640px){
  .process-item{ grid-template-columns: 50px 1fr; }
  .process-arrow{ display: none; }
}

/* ===========================================================
   Contact
   =========================================================== */
.contact{ position: relative; }
.contact-grid{
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
}
@media (max-width: 900px){ .contact-grid{ grid-template-columns: 1fr; } }
.contact-title{
  font-size: clamp(34px, 6vw, 64px);
  max-width: 640px;
}
.contact-sub{
  margin-top: 24px;
  color: var(--muted);
  font-size: 17px;
  max-width: 480px;
  line-height: 1.7;
}
.contact-links{
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 10px;
}
.contact-link{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  font-size: clamp(20px, 3vw, 28px);
  font-family: 'Fraunces', serif;
}
.contact-link:last-child{ border-bottom: 1px solid var(--line); }
.contact-link span{
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-link .arrow{
  transition: transform .35s var(--ease);
  color: var(--accent);
}
.contact-link:hover .arrow{ transform: translateX(8px) rotate(-45deg); }
.contact-link .arrow{ transform: rotate(-45deg); }
.contact-depts{
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-depts a{
  font-size: 14px;
  color: var(--muted);
  transition: color .3s var(--ease);
}
.contact-depts a:hover{ color: var(--accent); }
.contact-depts a span{
  display: inline-block;
  min-width: 160px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ===========================================================
   Footer
   =========================================================== */
.site-footer{
  padding: 60px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-top{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding-bottom: 40px;
}
.footer-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Fraunces', serif;
  font-size: 20px;
}
.footer-brand img{ width: 24px; }
.footer-links{
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
  flex-wrap: wrap;
}
.footer-links a{
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-links a:hover{ color: var(--accent); }
.footer-bottom{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted-2);
}

/* ===========================================================
   Utility
   =========================================================== */
@media (max-width: 640px){
  .container{ padding: 0 22px; }
  .section-pad{ padding: 90px 0; }
}

/* ---------------------------------------------------------
   Fallback when GSAP/CDN scripts fail to load — never trap
   content in a hidden/animating state.
--------------------------------------------------------- */
html.no-motion #preloader{ display: none; }
html.no-motion .hero-title .line span{ transform: none; }
html.no-motion .hero-eyebrow,
html.no-motion .hero-sub,
html.no-motion .hero-cta-row,
html.no-motion .hero-scroll-hint,
html.no-motion .reveal{ opacity: 1; transform: none; }
html.no-motion .cursor-dot,
html.no-motion .cursor-ring,
html.no-motion .scroll-progress{ display: none; }
