/* ============================================================
   BuluDesign 2.1 — Design System
   Mimarlık · Şehir Planlama · Tasarım
   ============================================================ */

/* --- Google Fonts (preconnect in HTML for speed) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* ============================================================
   1. Design Tokens (CSS Custom Properties)
   ============================================================ */
:root {
  /* —— Color Palette ——
     Krem / Bej / Yeşil / Mavi uyumlu doğal palet */
  --color-ivory:       #FAF7F2;
  --color-cream:       #F5F0E8;
  --color-sand:        #E8E0D5;
  --color-taupe:       #B8A99A;
  --color-warm-gray:   #9A8E82;

  --color-forest:      #2D5A3D;
  --color-sage:        #7A9B7E;
  --color-mint:        #A8C5AD;

  --color-deep-teal:   #1B4D5C;
  --color-soft-teal:   #5A8F9E;
  --color-sky:         #8BB8C4;

  --color-text:        #2C2C2C;
  --color-text-light:  #6B6B6B;
  --color-text-muted:  #999;
  --color-white:       #FFFFFF;
  --color-overlay:     rgba(27, 77, 92, 0.55);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font Sizes (fluid) */
  --fs-xs:    clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --fs-sm:    clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --fs-base:  clamp(1rem, 0.9rem + 0.45vw, 1.125rem);
  --fs-md:    clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --fs-lg:    clamp(1.25rem, 1rem + 1vw, 1.75rem);
  --fs-xl:    clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --fs-2xl:   clamp(2rem, 1.2rem + 3vw, 3.5rem);
  --fs-3xl:   clamp(2.5rem, 1.5rem + 4vw, 4.5rem);

  /* Spacing (8px grid) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  2.5rem;
  --space-8:  3rem;
  --space-9:  4rem;
  --space-10: 5rem;
  --space-11: 6rem;
  --space-12: 8rem;

  /* Layout */
  --max-width:        1200px;
  --max-width-narrow: 800px;
  --nav-height:       72px;
  --nav-height-shrunk: 56px;
  --border-radius:    8px;
  --border-radius-lg: 16px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.1);
  --shadow-xl:  0 20px 50px rgba(0,0,0,0.12);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   300ms ease;
  --transition-slow:   500ms ease;
}


/* ============================================================
   2. Reset & Base
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--color-deep-teal);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-forest);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-deep-teal);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl);  }
h4 { font-size: var(--fs-lg);  }

p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}


/* ============================================================
   3. Utility Classes
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}


/* ============================================================
   4. Navbar — Sticky, glass effect
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(184, 169, 154, 0.18);
  transition: height var(--transition-base),
              background var(--transition-base),
              box-shadow var(--transition-base);
}

.navbar.scrolled {
  height: var(--nav-height-shrunk);
  box-shadow: var(--shadow-sm);
  background: rgba(250, 247, 242, 0.96);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* Logo */
.navbar__logo {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--color-deep-teal);
  text-decoration: none;
  transition: all var(--transition-base);
  letter-spacing: -0.02em;
}

.navbar__logo:hover {
  color: var(--color-forest);
}

.navbar.scrolled .navbar__logo {
  font-size: var(--fs-md);
}

/* Nav links */
.navbar__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.navbar__link {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  position: relative;
  padding: var(--space-1) 0;
  transition: color var(--transition-fast);
  letter-spacing: 0.01em;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-forest);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.navbar__link:hover {
  color: var(--color-forest);
}

.navbar__link:hover::after,
.navbar__link.active::after {
  width: 100%;
}

.navbar__link.active {
  color: var(--color-forest);
}

/* Hamburger */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  z-index: 1010;
}

.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-deep-teal);
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
}

.navbar__hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.navbar__hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
@media (max-width: 768px) {
  .navbar__hamburger {
    display: flex;
  }

  .navbar__links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 80vw);
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-7);
    background: var(--color-ivory);
    padding: var(--space-9) var(--space-6);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-xl);
    z-index: 1005;
  }

  .navbar__links.open {
    transform: translateX(0);
  }

  .navbar__link {
    font-size: var(--fs-lg);
  }

  /* Overlay */
  .navbar__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1002;
    opacity: 0;
    transition: opacity var(--transition-base);
  }

  .navbar__overlay.open {
    display: block;
    opacity: 1;
  }
}


/* ============================================================
   5. Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--border-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-forest);
  color: var(--color-white);
  border-color: var(--color-forest);
}

.btn--primary:hover {
  background: var(--color-deep-teal);
  border-color: var(--color-deep-teal);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--color-forest);
  border-color: var(--color-forest);
}

.btn--outline:hover {
  background: var(--color-forest);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--color-deep-teal);
  border-color: transparent;
  padding: var(--space-2) var(--space-4);
}

.btn--ghost:hover {
  background: rgba(27, 77, 92, 0.06);
  color: var(--color-forest);
}


/* ============================================================
   6. Section Titles
   ============================================================ */
.section-title {
  text-align: center;
  margin-bottom: var(--space-9);
}

.section-title h2 {
  margin-bottom: var(--space-3);
}

.section-title__line {
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-forest), var(--color-sage));
  margin: var(--space-4) auto 0;
  border-radius: 2px;
}


/* ============================================================
   7. Cards (generic)
   ============================================================ */
.card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid rgba(184, 169, 154, 0.15);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__body {
  padding: var(--space-5) var(--space-6);
}

.card__tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: rgba(45, 90, 61, 0.08);
  color: var(--color-forest);
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: 50px;
  margin-bottom: var(--space-3);
}

.card__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-3);
  color: var(--color-deep-teal);
}

.card__excerpt {
  font-size: var(--fs-sm);
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  color: var(--color-taupe);
}


/* ============================================================
   8. Footer
   ============================================================ */
.footer {
  background: var(--color-deep-teal);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-10) 0 var(--space-6);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer__brand-name {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.footer__brand-desc {
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  max-width: 360px;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-5);
}

.footer__link {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--fs-sm);
  padding: var(--space-1) 0;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-white);
}

.footer__social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  transition: all var(--transition-base);
}

.footer__social-link:hover {
  background: var(--color-forest);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer__social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--space-6);
  text-align: center;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    text-align: center;
  }

  .footer__brand-desc {
    margin: 0 auto;
  }

  .footer__social {
    justify-content: center;
  }
}


/* ============================================================
   9. Page Header (for inner pages)
   ============================================================ */
.page-header {
  padding: calc(var(--nav-height) + var(--space-10)) 0 var(--space-9);
  background: linear-gradient(135deg, var(--color-ivory) 0%, var(--color-cream) 50%, var(--color-sand) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(122, 155, 126, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.page-header h1 {
  margin-bottom: var(--space-4);
}

.page-header__line {
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-forest), var(--color-sage));
  margin: 0 auto;
  border-radius: 2px;
}


/* ============================================================
   10. Scroll Animations (lightweight, CSS-only triggers via JS)
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.fade-in.visible {
  opacity: 1;
}

/* Stagger delay for children */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 100ms; }
.stagger > *:nth-child(3) { transition-delay: 200ms; }
.stagger > *:nth-child(4) { transition-delay: 300ms; }
.stagger > *:nth-child(5) { transition-delay: 400ms; }
.stagger > *:nth-child(6) { transition-delay: 500ms; }


/* ============================================================
   11. Global Responsive
   ============================================================ */
@media (max-width: 480px) {
  :root {
    --nav-height: 60px;
    --nav-height-shrunk: 52px;
  }

  .container {
    padding: 0 var(--space-4);
  }
}
