/* ============================================
   ATÖLYE KENDİ'LİK — Design Tokens
   ============================================ */

:root {
  /* Type scale — fluid clamp() */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.75rem);

  /* 4px spacing system */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Fonts */
  --font-display: 'Zodiak', 'Iowan Old Style', 'Georgia', serif;
  --font-body: 'General Sans', 'Work Sans', -apple-system, sans-serif;
}

/* ---- Custom palette: warm, minimal, sage accent ---- */
:root,
[data-theme='light'] {
  --color-bg: #faf8f3;
  --color-surface: #ffffff;
  --color-surface-2: #f5f2ec;
  --color-surface-offset: #efeae1;
  --color-surface-offset-2: #e7e1d4;
  --color-surface-dynamic: #e0d9c8;
  --color-divider: #e3ddd1;
  --color-border: #d6cfc0;

  --color-text: #262320;
  --color-text-muted: #6e675c;
  --color-text-faint: #aca495;
  --color-text-inverse: #faf8f3;

  --color-primary: #5b6e4e;
  --color-primary-hover: #46573a;
  --color-primary-active: #37452d;
  --color-primary-highlight: #dce2d2;

  --color-warning: #8a5a2b;
  --color-warning-highlight: #e6dac8;
  --color-error: #93453c;
  --color-error-highlight: #e6d3ce;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 80 / 0.06);
  --shadow-md: 0 6px 20px oklch(0.2 0.02 80 / 0.09);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 80 / 0.14);
}

[data-theme='dark'] {
  --color-bg: #1b1916;
  --color-surface: #211f1b;
  --color-surface-2: #262420;
  --color-surface-offset: #2c2a25;
  --color-surface-offset-2: #33312a;
  --color-surface-dynamic: #3a372f;
  --color-divider: #34322c;
  --color-border: #423f37;

  --color-text: #ede8de;
  --color-text-muted: #a9a296;
  --color-text-faint: #6e695d;
  --color-text-inverse: #1b1916;

  --color-primary: #93a87f;
  --color-primary-hover: #7c9169;
  --color-primary-active: #647555;
  --color-primary-highlight: #33402b;

  --color-warning: #c1875a;
  --color-warning-highlight: #453b2e;
  --color-error: #c17971;
  --color-error-highlight: #453230;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.45);
}

/* ============================================
   Layout primitives
   ============================================ */

.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 5vw, var(--space-12));
}

.wrap--narrow {
  max-width: var(--content-narrow);
}
.wrap--default {
  max-width: var(--content-default);
}

section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--color-primary);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--color-text);
}

.section-head p {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* ============================================
   Header
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: oklch(from var(--color-bg) l c h / 0.88);
  backdrop-filter: blur(14px);
}
.header--scrolled {
  border-bottom-color: var(--color-divider);
}
.header--hidden {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--color-text);
}

.theme-toggle {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.theme-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-text-faint);
  background: var(--color-surface-offset);
}

.nav-toggle {
  position: relative;
  z-index: 1;
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: 1px solid var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-text-faint);
  background: var(--color-surface-offset);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  padding-block: clamp(var(--space-16), 10vw, var(--space-24)) clamp(var(--space-12), 6vw, var(--space-20));
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  align-items: center;
}
.hero-eyebrow {
  margin-bottom: var(--space-5);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.hero h1 em {
  font-style: italic;
  color: var(--color-primary);
}
.hero-lede {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}
.hero-visual {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  aspect-ratio: 4/3;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-stats {
  display: flex;
  gap: clamp(var(--space-8), 4vw, var(--space-12));
  margin-top: clamp(var(--space-12), 6vw, var(--space-20));
  padding-top: var(--space-10);
  border-top: 1px solid var(--color-divider);
}
.hero-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  font-weight: 500;
}
.hero-stat span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================
   About
   ============================================ */

.about {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  align-items: center;
}
.about-visual {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-divider);
  aspect-ratio: 4/3;
  background: var(--color-surface);
}
.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-copy h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  margin-bottom: var(--space-5);
}
.about-copy p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
}
.about-copy p:last-of-type {
  margin-bottom: 0;
}
.about-signature {
  margin-top: var(--space-8);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
  font-style: italic;
}
.about-values {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
.about-values span {
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

/* ============================================
   Writings (Yazılar)
   ============================================ */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
  height: 100%;
}
.post-card-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.post-tag {
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.post-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-3);
}
.post-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  flex: 1;
}
.post-link {
  margin-top: var(--space-5);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}
.post-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-interactive);
}
.post-card:hover .post-link svg {
  transform: translateX(3px);
}

.section-footer {
  display: flex;
  justify-content: center;
  margin-top: clamp(var(--space-10), 5vw, var(--space-16));
}

/* ============================================
   Videos
   ============================================ */

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.video-card {
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}
.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--color-surface-offset);
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: oklch(from var(--color-bg) l c h / 0.9);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play-circle {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: oklch(from var(--color-bg) l c h / 0.92);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.video-play-circle svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  margin-left: 2px;
}
.video-card-body {
  padding: var(--space-5) var(--space-6);
}
.video-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.video-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.video-notice {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: clamp(var(--space-10), 5vw, var(--space-14));
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
}
.video-notice svg {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.video-notice p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.video-notice strong {
  color: var(--color-text);
}

/* ============================================
   Books (Kitaplarım)
   ============================================ */

.books {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.book-feature {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: clamp(var(--space-10), 6vw, var(--space-16));
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 4vw, var(--space-12));
}
.book-cover {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3/4;
  border: 1px solid var(--color-divider);
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-warning);
  background: var(--color-warning-highlight);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
}
.book-info h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  margin-bottom: var(--space-3);
}
.book-info > p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
.book-info-foot {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.book-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}


/* ============================================
   CTA band
   ============================================ */

.cta-band {
  text-align: center;
}
.cta-band .wrap {
  max-width: 620px;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
}
.cta-band p {
  margin-top: var(--space-5);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}
.cta-band .hero-actions {
  justify-content: center;
  margin-top: var(--space-8);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-12);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.footer-brand svg {
  width: 22px;
  height: 22px;
  color: var(--color-primary);
}
.footer-brand span {
  font-family: var(--font-display);
  font-size: var(--text-base);
}
.footer-links {
  display: flex;
  gap: var(--space-6);
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--color-text);
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ============================================
   Scroll reveal
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  .hero-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-visual {
    order: -1;
  }
  .posts-grid,
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .book-feature {
    grid-template-columns: 1fr;
  }
  .book-cover {
    max-width: 240px;
    margin-inline: auto;
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) clamp(var(--space-5), 5vw, var(--space-12));
    transform: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity var(--transition-interactive),
      visibility var(--transition-interactive);
  }
  .nav-links a {
    padding: var(--space-3) 0;
    width: 100%;
    font-size: var(--text-2xl);
  }
  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .posts-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    gap: var(--space-8);
    flex-wrap: wrap;
  }
  .notify-form {
    flex-direction: column;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
