/* ============================================================
   NANOFİLT — styles.css
   Brand: amber #e9a23b · green #4a9d8e
   Fonts: Instrument Serif (display) · Hanken Grotesk (body)
   SSOT: light-dark() tokens · previous bg/contrast fixes preserved
   ============================================================ */

/* ─────────── RESET ─────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─────────── CUSTOM PROPERTIES (SSOT) ─────────── */
:root {
  color-scheme: light dark;

  /* Brand palette */
  --amber: #e9a23b;
  --amber-dim: #c9862a;
  --green: #4a9d8e;
  --green-dim: #3a7d70;

  /* Light-dark token SSOT — previous bg/contrast fixes preserved */
  --bg: light-dark(#faf8f4, #0f0e0c);
  --bg-card: light-dark(#f5f2eb, #1a1815);
  --bg-elevated: light-dark(#ffffff, #22201c);
  --text: light-dark(#1a1815, #e8e4dc);
  --text-secondary: light-dark(#5c5548, #a09888);
  --muted: light-dark(#8a8274, #7a7264);
  --border: light-dark(#e0d8cc, #2e2a24);
  --amber-bg: light-dark(#fef6e8, #2a2210);
  --green-bg: light-dark(#eef7f4, #0f221e);

  /* Typography */
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-xs: 0.4rem;
  --space-sm: 0.8rem;
  --space-md: 1.2rem;
  --space-lg: 2rem;
  --space-xl: 3.2rem;
  --space-2xl: 5rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Layout max-width */
  --content-max: 1200px;
}

/* ─────────── BASE ─────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--amber);
}

/* ─────────── GRAIN OVERLAY ─────────── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ─────────── NAV ─────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  max-width: var(--content-max);
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img {
  display: block;
  width: 180px;
  height: 50px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--amber);
}

.nav-cta {
  background: var(--amber);
  color: #1a1815 !important;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.nav-cta:hover {
  background: var(--amber-dim) !important;
  color: #1a1815 !important;
}

/* ─────────── SECTIONS (generic block) ─────────── */
.block {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.block-head {
  max-width: 720px;
  margin-bottom: var(--space-xl);
}

.section-index {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: var(--space-xs);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.section-lede {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ─────────── HERO ─────────── */
.hero {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  min-height: 70vh;
}

.hero-copy {
  flex: 1 1 50%;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--space-sm);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: var(--amber);
  color: #1a1815;
  border-color: var(--amber);
}
.btn-primary:hover {
  background: var(--amber-dim);
  border-color: var(--amber-dim);
  color: #1a1815;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* Metrics row */
.metrics {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
.metrics div {
  display: flex;
  flex-direction: column;
}
.metrics dt {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--green);
  line-height: 1.2;
}
.metrics dd {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Hero media — aspect-ratio: 1/1 square, object-fit: cover, max-width */
.hero-media {
  flex: 1 1 50%;
  max-width: 540px;
  margin: 0;
}
.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* ─────────── BENEFIT GRID ─────────── */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.benefit-grid article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.benefit-grid h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--amber);
  margin-bottom: var(--space-xs);
}

.benefit-grid p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─────────── STEPS (Nasıl Çalışır / Faydalar) ─────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  position: relative;
}

.step-card span:first-child {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: var(--space-xs);
}

.step-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Step icon — small stable box, decorative */
.step-icon {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: var(--space-sm);
}

/* ─────────── COMPARISON TABLE ─────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  background: var(--bg-card);
  font-weight: 600;
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 2px solid var(--border);
  color: var(--text);
}

tbody th {
  font-weight: 500;
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-secondary);
  white-space: nowrap;
}

tbody td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tbody td strong {
  color: var(--green);
  font-weight: 600;
}

tbody tr:hover {
  background: var(--bg-card);
}

/* COP31 principles figure */
.cop-card {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.cop-note {
  flex: 1 1 280px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  position: relative;
  padding-left: 0.8rem;
  border-left: 2px solid var(--green);
}

.principles-figure {
  flex: 0 0 auto;
  max-width: 200px;
  margin: 0;
}
.principles-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 515 / 528;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* ─────────── CATALOG ─────────── */
.catalog-cover {
  margin: 0 0 var(--space-lg);
}
.catalog-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1080 / 882;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* Landscape gallery — 16/10 aspect-ratio grid */
.gallery-landscape {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.gallery-landscape figure {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.gallery-landscape img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Portrait gallery — 3/4 aspect-ratio grid */
.gallery-portrait {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.gallery-portrait figure {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.gallery-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* Full-page catalog figure */
.catalog-full {
  margin: 0;
}
.catalog-full img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2481 / 3506;
  object-fit: cover;
  max-height: 90vh;
  border-radius: var(--radius-md);
}

/* ─────────── CONTACT ─────────── */
.contact-card {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  max-width: 800px;
  margin: 0 auto;
}

.contact-card .wide {
  grid-column: 1 / -1;
}

.contact-card .label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-xs);
}

.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
}

.contact-card p,
.contact-card a {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─────────── FOOTER ─────────── */
.footer {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border-top: 1px solid var(--border);
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.footer-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ─────────── MOBILE ─────────── */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: var(--space-sm) var(--space-md);
    position: static;
  }

  .brand {
    align-self: center;
  }

  .nav-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    width: 100%;
    row-gap: 0.45rem;
  }

  .hero {
    flex-direction: column;
    padding: var(--space-xl) var(--space-md);
    min-height: auto;
  }

  .hero-media {
    max-width: 100%;
    width: 100%;
  }

  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .block {
    padding: var(--space-xl) var(--space-md);
  }

  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  /* Gallery → single column on mobile */
  .gallery-landscape {
    grid-template-columns: 1fr;
  }
  .gallery-portrait {
    grid-template-columns: 1fr;
  }

  .cop-card {
    flex-direction: column;
  }

  .principles-figure {
    max-width: 100%;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .metrics {
    gap: var(--space-md);
  }
}

/* ─────────── ACCESSIBILITY ─────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ─────────── PRINT ─────────── */
@media print {
  .grain {
    display: none;
  }
  .nav {
    position: static;
  }
  .hero {
    min-height: auto;
  }
}
