/* ============================================================
   ABA COLLECTIONS — MAIN STYLESHEET
   Design reference: PDF designs (Home, About, Contact)
   ============================================================ */

/* ── FONT FACES ─────────────────────────────────────────── */
@font-face {
  font-family: 'Calibri';
  src: url('../assets/fonts/Calibri.woff2') format('woff2'),
       url('../assets/fonts/Calibri.woff') format('woff'),
       url('../assets/fonts/Calibri.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Calibri';
  src: url('../assets/fonts/Calibri-Italic.woff2') format('woff2'),
       url('../assets/fonts/Calibri-Italic.woff') format('woff'),
       url('../assets/fonts/Calibri-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Calibri';
  src: url('../assets/fonts/Calibri-Bold.woff2') format('woff2'),
       url('../assets/fonts/Calibri-Bold.woff') format('woff'),
       url('../assets/fonts/Calibri-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Calibri';
  src: url('../assets/fonts/Calibri-BoldItalic.woff2') format('woff2'),
       url('../assets/fonts/Calibri-BoldItalic.woff') format('woff'),
       url('../assets/fonts/Calibri-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --color-bg:        #0E0E0E;
  --color-text:      #ffffff;
  --color-text-dim:  rgba(255,255,255,0.85);
  --color-nav-link:  #ffffff;
  --color-nav-link-active: #ffffff;

  --font-family:     'Calibri', Arial, sans-serif;

  /* Navigation */
  --nav-font-size:   14px;
  --nav-letter-spacing: 0.12em;

  /* Body text */
  --body-font-size:  13px;
  --body-line-height: 1.4;

  /* Layout */
  --split-left:      50%;    /* left dark panel width on desktop */
  --header-height:   60px;
  --content-padding-x: 24px; /* left panel text left margin */
  --content-padding-y: 40px;
  --text-block-width: 370px; /* approx text column width in left panel */
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
img, svg {
  display: block;
  max-width: 100%;
}

/* ── HEADER / NAV ───────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 28px 0 24px;
  /* Header spans the full width, overlaying both panels */
}

.site-logo {
  display: block;
  width: 88px;   /* ~same proportion as in PDF (logo roughly 95px wide) */
  flex-shrink: 0;
}
.site-logo svg,
.site-logo img {
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  padding-top: 4px;
}
.site-nav a {
  font-family: var(--font-family);
  font-size: var(--nav-font-size);
  font-weight: 400;
  letter-spacing: var(--nav-letter-spacing);
  text-transform: uppercase;
  color: var(--color-nav-link);
  opacity: 0.9;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.site-nav a:hover {
  opacity: 1;
}
.site-nav a.active {
  opacity: 1;
}

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 1px;
  width: 100%;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── SPLIT LAYOUT ───────────────────────────────────────── */
/*
  The design uses a split-screen layout:
  - LEFT HALF: black background, text content positioned at bottom-left
  - RIGHT HALF: full-bleed photograph
  Both panels share equal height (100vh on desktop).
*/
.page-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.split-left {
  position: relative;
  width: var(--split-left);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;   /* content sits near bottom */
  padding: var(--header-height) var(--content-padding-x) var(--content-padding-y) var(--content-padding-x);
  /* Extra top padding so content clears the fixed header */
  padding-top: calc(var(--header-height) + 16px);
}

.split-right {
  position: relative;
  width: calc(100% - var(--split-left));
  overflow: hidden;
}
.split-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

/* ── TEXT BLOCK (inside left panel) ────────────────────── */
.text-block {
  max-width: var(--text-block-width);
}
.text-block p {
  font-family: var(--font-family);
  font-size: var(--body-font-size);
  line-height: var(--body-line-height);
  color: var(--color-text-dim);
  margin-bottom: 1.4em;
}
.text-block p:last-child {
  margin-bottom: 0;
}

/* ── CONTACT BLOCK ──────────────────────────────────────── */
.contact-block {
  max-width: var(--text-block-width);
}
.contact-block .contact-label {
  font-family: var(--font-family);
  font-size: var(--nav-font-size);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 18px;
}
.contact-block .contact-info {
  font-family: var(--font-family);
  font-size: var(--body-font-size);
  line-height: 1.4;
  color: var(--color-text-dim);
}
.contact-block .contact-info a {
  color: var(--color-text-dim);
  border-bottom: 1px solid rgba(255,255,255,0.3);
  transition: border-color 0.2s, color 0.2s;
}
.contact-block .contact-info a:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.8);
}

/* ── COLLECTIONS PAGE (placeholder — add content here) ─── */
/*
  TODO: When collections-page design is received, build:
  - .collections-grid for rug cards
  - .rug-card component
  - .rug-card__image, .rug-card__title, .rug-card__details
  - Filter bar / category nav if needed
  See collections.html for placeholder structure.
*/

/* ── MOBILE NAV OVERLAY ─────────────────────────────────── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
}
.mobile-nav-overlay.open {
  display: flex;
}
.mobile-nav-overlay a {
  font-family: var(--font-family);
  font-size: 22px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.85;
}
.mobile-nav-overlay a:hover,
.mobile-nav-overlay a.active {
  opacity: 1;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  :root {
    --split-left: 100%;
  }

  /* Stack: tekst boven, foto onder */
  .page-split {
    flex-direction: column;
    min-height: auto;
  }

  .split-left {
    width: 100%;
    min-height: auto;
    padding: calc(var(--header-height) + 80px) 20px 36px 20px;
    justify-content: flex-start;
    background: var(--color-bg);
  }

  /* Foto onder de tekst, vaste hoogte */
  .split-right {
    display: block;
    width: 100%;
    height: 56vw;
    min-height: 240px;
    max-height: 420px;
  }
  .split-right img {
    object-position: center 40%;
  }

  .text-block {
    max-width: 100%;
  }
  .contact-block {
    max-width: 100%;
  }

  .site-nav {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 14px 16px 0 16px;
  }
  .site-logo {
    width: 72px;
  }
}

/* ══════════════════════════════════════════════════════════
   PAGE TRANSITION OVERLAY
   ══════════════════════════════════════════════════════════ */
#page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.38s ease;
}
#page-transition.fade-out {
  opacity: 0;
}


/* ══════════════════════════════════════════════════════════
   ELEMENT INFADE — staggered reveal on page load
   ══════════════════════════════════════════════════════════ */
.will-infade {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.will-infade.infaded {
  opacity: 1;
  transform: translateY(0);
}

/* Header slides down instead of up */
.site-header.will-infade {
  transform: translateY(-8px);
}
.site-header.infaded {
  transform: translateY(0);
}

/* Collection panels fade in place (no translate) */
.collection-panel.will-infade {
  transform: none;
  transition: opacity 0.7s ease;
}
