/* ==========================================================================
   Camcı Orhan İnşaat — Tanıtım Sitesi
   ========================================================================== */

:root {
  --ink: #16181d;
  --paper: #faf9f7;
  --paper-dim: #f0eee9;
  --white: #ffffff;
  --line: rgba(22, 24, 29, 0.12);
  --line-on-dark: rgba(255, 255, 255, 0.16);
  --text-muted: #6b6f76;
  --text-muted-on-dark: rgba(255, 255, 255, 0.62);
  --accent: #b8763a;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --container-w: 1160px;
  --radius: 3px;
  --ease: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 500; }

p { margin: 0 0 1em; color: var(--text-muted); }

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

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

ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 120px 0; }

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.1em;
}

.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-lead { max-width: 520px; color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-solid {
  background: var(--paper);
  color: var(--ink);
}
.btn-solid:hover { background: var(--accent); color: var(--white); }

.btn-line {
  border-color: var(--line-on-dark);
  color: var(--white);
}
.btn-line:hover { border-color: var(--white); }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 200;
  transition: width 0.12s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 26px 0;
  border-bottom: 1px solid transparent;
  transition: background var(--ease), padding var(--ease), border-color var(--ease);
  --nav-fg: var(--white);
  --nav-fg-muted: rgba(255, 255, 255, 0.7);
}

.site-header.scrolled {
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(10px);
  padding: 16px 0;
  border-bottom-color: var(--line);
  --nav-fg: var(--ink);
  --nav-fg-muted: var(--text-muted);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  animation: headerDrop 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

@keyframes headerDrop {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.logo-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center 15%;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--nav-fg);
  line-height: 1.15;
  transition: color var(--ease);
}

.logo-text small {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nav-fg);
  opacity: 0.75;
}

.main-nav {
  display: flex;
  gap: 36px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  color: var(--nav-fg-muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: color var(--ease);
}
.main-nav a:hover { color: var(--nav-fg); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--nav-fg);
  transition: transform var(--ease), opacity var(--ease), background var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--ink);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 50%;
  right: 6%;
  width: 640px;
  height: 640px;
  max-width: 70vw;
  background: radial-gradient(circle, rgba(184, 118, 58, 0.22), rgba(184, 118, 58, 0) 70%);
  filter: blur(40px);
  transform: translateY(-50%);
  animation: glowPulse 9s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.55; transform: translateY(-50%) scale(1); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.14); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 740px;
  padding-top: 100px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 0;
}

.line-mask { display: block; overflow: hidden; }
.line-inner {
  display: inline-block;
  animation: heroRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero h1 .line-mask:nth-child(1) .line-inner { animation-delay: 0.28s; }
.hero h1 .line-mask:nth-child(2) .line-inner { animation-delay: 0.46s; }

@keyframes heroRise {
  from { transform: translateY(112%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.accent-text { color: var(--accent); }

.hero-eyebrow-in {
  animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.05s;
}

.hero-rule {
  display: block;
  width: 48px;
  height: 1px;
  margin: 26px 0 28px;
  background: var(--line-on-dark);
  transform-origin: left;
  animation: heroLine 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.65s;
}

@keyframes heroLine {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

@keyframes heroFadeUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.hero-lead {
  color: var(--text-muted-on-dark);
  font-size: 1.08rem;
  max-width: 520px;
  animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.8s;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.95s;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
  width: 1px;
  height: 54px;
  background: var(--line-on-dark);
  overflow: hidden;
  z-index: 1;
  opacity: 0;
  animation: heroFadeUp 0.8s ease both;
  animation-delay: 1.1s;
}
.scroll-cue span {
  position: absolute;
  top: -30%;
  left: 0;
  width: 100%;
  height: 30%;
  background: var(--accent);
  animation: scrollDrop 2.4s ease-in-out infinite;
  animation-delay: 1.4s;
}
@keyframes scrollDrop {
  0% { top: -30%; }
  100% { top: 100%; }
}

/* ---------- Stats ---------- */
.stats {
  background: var(--ink);
  border-top: 1px solid var(--line-on-dark);
  padding: 64px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-item {
  position: relative;
  text-align: center;
  padding: 0 16px;
}
.stat-item:not(:last-child) { border-right: 1px solid var(--line-on-dark); }
.stat-number {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 3.6vw, 2.8rem);
  font-weight: 500;
  color: var(--white);
}
.stat-label {
  display: block;
  margin-top: 8px;
  color: var(--text-muted-on-dark);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ---------- About ---------- */
.about-inner {
  max-width: 760px;
}
.about-lead {
  font-size: 1.08rem;
  line-height: 1.75;
}

.value-row {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.value-item {
  padding: 32px 28px 0;
  text-align: center;
  border-left: 1px solid var(--line);
}
.value-item:first-child { border-left: none; }
.value-item h3 { font-size: 1.05rem; margin-bottom: 0.5em; }
.value-item p { font-size: 0.92rem; margin: 0; }

/* ---------- Services ---------- */
.services-list {
  margin-top: 56px;
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr;
  gap: 40px;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.service-num {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--accent);
  padding-top: 0.15em;
}

.service-main h3 { margin-bottom: 0.4em; }
.service-main p { margin: 0; }

.service-list { display: flex; flex-direction: column; gap: 10px; padding-top: 0.2em; }
.service-list li {
  padding-left: 1.3em;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 1px;
  background: var(--accent);
}

/* ---------- Gallery ---------- */
.gallery { background: var(--paper-dim); }

.gallery-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 28px;
}

.gallery-item { margin: 0; }

.gallery-trigger {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--ink);
}
.gallery-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity var(--ease);
}
.gallery-trigger:hover img,
.gallery-trigger:focus-visible img { transform: scale(1.04); opacity: 0.92; }

.gallery-item figcaption {
  margin-top: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(14, 15, 18, 0.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease), visibility var(--ease);
}
.lightbox.open { opacity: 1; visibility: visible; }

.lightbox-figure { max-width: 1100px; max-height: 85vh; margin: 0; text-align: center; }
.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
}
.lightbox-figure figcaption {
  margin-top: 20px;
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 32px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity var(--ease);
}
.lightbox-close:hover { opacity: 1; }

/* ---------- Contact ---------- */
.contact-persons {
  margin-top: 56px;
  border-top: 1px solid var(--line);
}

.person-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.7s ease, transform 0.7s ease, background var(--ease);
}
.person-row:hover { background: rgba(22, 24, 29, 0.02); }

.person-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ink);
}
.person-phone {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: right;
  transition: color var(--ease);
}
.person-phone:hover { color: var(--accent); }

.person-row-primary .person-name { font-weight: 600; }
.person-row-primary .person-phone { color: var(--ink); font-weight: 600; }

.contact-grid {
  margin-top: 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.contact-list a { color: var(--ink); }
.contact-list a:hover { color: var(--accent); }

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border: 0;
  filter: grayscale(0.4) contrast(1.02);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--text-muted-on-dark);
  padding: 88px 0 0;
}

.site-footer .logo-text { color: var(--white); }
.site-footer .logo-text small { color: var(--text-muted-on-dark); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-on-dark);
}

.footer-brand p { margin-top: 18px; max-width: 300px; }

.site-footer h4 {
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links, .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links a, .footer-contact a, .footer-contact p {
  color: var(--text-muted-on-dark);
  font-size: 0.92rem;
  margin: 0;
  transition: color var(--ease);
}
.footer-links a:hover, .footer-contact a:hover { color: var(--white); }

.footer-bottom {
  padding: 28px 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.stats-grid .stat-item:nth-child(1) { transition-delay: 0s; }
.stats-grid .stat-item:nth-child(2) { transition-delay: 0.08s; }
.stats-grid .stat-item:nth-child(3) { transition-delay: 0.16s; }
.stats-grid .stat-item:nth-child(4) { transition-delay: 0.24s; }

.value-row .value-item:nth-child(1) { transition-delay: 0s; }
.value-row .value-item:nth-child(2) { transition-delay: 0.1s; }
.value-row .value-item:nth-child(3) { transition-delay: 0.2s; }

.services-list .service-row:nth-child(1) { transition-delay: 0s; }
.services-list .service-row:nth-child(2) { transition-delay: 0.12s; }

.gallery-grid .gallery-item:nth-child(3n+1) { transition-delay: 0s; }
.gallery-grid .gallery-item:nth-child(3n+2) { transition-delay: 0.08s; }
.gallery-grid .gallery-item:nth-child(3n+3) { transition-delay: 0.16s; }

.contact-persons .person-row:nth-child(1) { transition-delay: 0s; }
.contact-persons .person-row:nth-child(2) { transition-delay: 0.08s; }
.contact-persons .person-row:nth-child(3) { transition-delay: 0.16s; }
.contact-persons .person-row:nth-child(4) { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ink);
    padding: 8px 24px 20px;
  }
  .main-nav.open a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line-on-dark);
    color: var(--white);
  }

  .services-list { margin-top: 40px; }
  .service-row { grid-template-columns: 1fr; gap: 16px; }
  .service-num { padding-top: 0; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }

  .person-row { grid-template-columns: 1fr; text-align: left; gap: 6px; }
  .person-phone { text-align: left; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--line-on-dark); }
}

@media (max-width: 600px) {
  section { padding: 84px 0; }
  .value-row { grid-template-columns: 1fr; border-top: none; }
  .value-item { border-left: none; border-top: 1px solid var(--line); padding: 28px 0 0; }
  .value-item:first-child { border-top: none; padding-top: 0; }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .lightbox { padding: 20px; }
  .lightbox-close { top: 16px; right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
