/* ==========================================================
   Tosunoğlu İnşaat — temel: değişkenler, tipografi, bileşenler
   ========================================================== */

:root {
  --paper: #f5f3ef;
  --paper-2: #ece8e1;
  --white: #ffffff;
  --ink: #17140f;
  --ink-2: #4a443c;
  --muted: #857d72;
  --dark: #12100d;
  --dark-2: #1c1915;
  --on-dark: #efebe4;
  --on-dark-2: #a49c90;
  --line: rgba(23, 20, 15, 0.12);
  --line-dark: rgba(239, 235, 228, 0.14);
  --bronze: #9c7a45;
  --bronze-hi: #c9a46a;

  --f-head: 'Archivo', 'Segoe UI', sans-serif;
  --f-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --f-brand: 'Cinzel', 'Times New Roman', serif;

  --container: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 88px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--dark);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--bronze-hi); color: var(--dark); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(90px, 12vw, 160px) 0; }
.section--alt { background: var(--paper-2); }

/* Sayfa içeriği footer'ın üstünde kayar */
.page { position: relative; z-index: 2; background: var(--paper); }

/* ---------- Tipografi ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bronze);
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: var(--bronze-hi); }

.h2 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 17ch;
}
.h2--light { color: var(--on-dark); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: clamp(44px, 5vw, 72px);
}
.section-head__text { max-width: 400px; color: var(--ink-2); }

/* SplitText maskeleri */
.split-mask { overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* ---------- Butonlar ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.6s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn--sm { height: 44px; padding: 0 22px; font-size: 14px; }
.btn--primary { background: var(--bronze); color: var(--white); }
.btn--primary::before { background: var(--dark); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light::before { background: var(--bronze-hi); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline::before { background: var(--ink); }
.btn--outline:hover { color: var(--white); }

/* Yuvarlanan link etiketi */
.roll { display: inline-block; overflow: hidden; vertical-align: bottom; }
.roll > span { position: relative; display: inline-block; transition: transform 0.6s var(--ease); }
.roll > span::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
  color: var(--bronze-hi);
  transform: rotate(8deg);
  transform-origin: left top;
  transition: transform 0.6s var(--ease);
}
.roll:hover > span { transform: translateY(-100%); }
.roll:hover > span::after { transform: rotate(0); }

/* ---------- Marka ---------- */

.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand__mark { width: 46px; display: block; }
.brand__mark .mono, .about__mark .mono { display: block; width: 100%; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text strong { font-family: var(--f-brand); font-weight: 600; font-size: 23px; letter-spacing: 0.12em; color: var(--bronze-hi); }
.brand__text small { font-size: 11px; font-weight: 500; letter-spacing: 0.6em; color: var(--on-dark-2); margin-top: 7px; }

/* ---------- Header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: var(--on-dark);
  transition: background-color 0.5s var(--ease), transform 0.6s var(--ease-io);
}
.header.is-solid { background: rgba(18, 16, 13, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.header.is-hidden { transform: translateY(-100%); }
.header__inner {
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.header .brand { margin-right: auto; }
.header__nav { display: flex; gap: 30px; font-size: 15px; }
.header__phone { font-weight: 500; font-size: 15px; padding-left: 28px; border-left: 1px solid var(--line-dark); }

.header__toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: none;
  position: relative;
}
.header__toggle span {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--on-dark);
  transition: transform 0.5s var(--ease);
}
.header__toggle span:first-child { top: 18px; }
.header__toggle span:last-child { top: 26px; }
.header__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.header__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 2px; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--bronze-hi); transform-origin: left; transform: scaleX(0); }

/* ---------- Mobil menü ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 32px) var(--gutter) 40px;
  background: var(--dark);
  color: var(--on-dark);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.8s var(--ease-io), visibility 0.8s;
}
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { display: block; overflow: hidden; padding: 12px 0; border-bottom: 1px solid var(--line-dark); font-family: var(--f-head); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.menu nav a span { display: block; transform: translateY(110%); transition: transform 0.8s var(--ease); }
.menu.is-open nav a span { transform: none; }
.menu.is-open nav a:nth-child(2) span { transition-delay: 0.05s; }
.menu.is-open nav a:nth-child(3) span { transition-delay: 0.1s; }
.menu.is-open nav a:nth-child(4) span { transition-delay: 0.15s; }
.menu.is-open nav a:nth-child(5) span { transition-delay: 0.2s; }
.menu__foot { display: flex; flex-direction: column; gap: 8px; color: var(--on-dark-2); }

/* ---------- Açılış ---------- */

.loader { display: none; }
.motion .loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: block;
  background: var(--dark);
  color: var(--on-dark);
}
.is-loaded .loader { display: none; }

.loader__top, .loader__bottom {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.loader__top { top: 28px; align-items: center; font-size: 13px; letter-spacing: 0.08em; color: var(--on-dark-2); }
.loader__brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-brand); font-weight: 600; letter-spacing: 0.14em; color: var(--bronze-hi); }
.loader__brand .brand__mark { width: 26px; }
.loader__bottom { bottom: 24px; }
.loader__count {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(90px, 16vw, 240px);
  line-height: 0.8;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.loader__note { font-size: 13px; color: var(--on-dark-2); padding-bottom: 8px; text-align: right; }

/* ---------- İmleç ---------- */

.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .motion .cursor { display: block; }
  .cursor__dot, .cursor__label { position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none; }
  .cursor__dot {
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: var(--white);
    mix-blend-mode: difference;
    transition: width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease);
  }
  .cursor.is-hover .cursor__dot { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  .cursor__label {
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--bronze);
    color: var(--white);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.45s var(--ease);
  }
  .cursor.is-label .cursor__label { transform: translate(-50%, -50%) scale(1); }
  .cursor.is-label .cursor__dot { width: 0; height: 0; margin: 0; }
}

/* ---------- Footer ---------- */

.footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: var(--dark);
  color: var(--on-dark-2);
  padding-top: 80px;
  font-size: 15px;
  overflow: hidden;
}
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
.footer__brand p { max-width: 300px; margin-bottom: 24px; color: var(--on-dark); font-size: 18px; line-height: 1.5; }
.footer h4 { margin-bottom: 16px; color: var(--on-dark); font-family: var(--f-head); font-weight: 600; font-size: 15px; }
.footer li + li { margin-top: 8px; }
.footer a:hover { color: var(--bronze-hi); }
.footer__word {
  margin: 56px 0 0;
  font-family: var(--f-brand);
  font-weight: 600;
  font-size: 13.4vw;
  line-height: 1.1;
  padding-top: 0.04em;
  margin-bottom: -0.12em;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(180deg, var(--bronze-hi) 0%, rgba(201, 164, 106, 0.08) 85%);
  -webkit-background-clip: text;
  background-clip: text;
}
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 26px; border-top: 1px solid var(--line-dark); font-size: 13px; }

/* ---------- Duyarlı ---------- */

@media (max-width: 1100px) {
  .header__nav { gap: 22px; }
  .header__phone { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 72px; }
  .brand__mark { width: 38px; }
  .brand__text strong { font-size: 19px; }
  .brand__text small { font-size: 10px; margin-top: 5px; }
  .header__nav, .header__cta { display: none; }
  .header__toggle { display: block; }
  .footer { position: relative; }
}

@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
  .btn { width: 100%; }
  .loader__note { display: none; }
}
