/* ============================================
   Chris Reinberg — Personal Site
   Fonts: Aboreto (display), Brandon Grotesque (body)
   ============================================ */

/* --- Font Loading --- */
/* Aboreto loaded via <link> in HTML for non-blocking render */

/* Brandon Grotesque — WOFF2 with OTF fallback */
@font-face {
  font-family: 'Brandon Grotesque';
  src: url('../fonts/BrandonGrotesque-Regular.woff2') format('woff2'),
       url('../fonts/BrandonGrotesque-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Brandon Grotesque';
  src: url('../fonts/BrandonGrotesque-Medium.woff2') format('woff2'),
       url('../fonts/BrandonGrotesque-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Brandon Grotesque';
  src: url('../fonts/BrandonGrotesque-Light.woff2') format('woff2'),
       url('../fonts/BrandonGrotesque-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Variables --- */
:root {
  --bg: #F3F1EC;
  --bg-dark: #4A4540;
  --text: #3D3426;
  --text-light: #6B5D4F;
  --accent: #9E7E5A;
  --accent-light: #C4A882;
  --accent-hover: #7A6244;
  --white: #FDFAF6;
  --font-display: 'Aboreto', 'Didot', 'Georgia', serif;
  --font-body: 'Brandon Grotesque', 'Gill Sans', 'Segoe UI', system-ui, sans-serif;
  --max-width: 1200px;
  --content-width: 560px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.44;
  letter-spacing: normal;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

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

/* --- Typography (matched to chrisreinberg.com) --- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
}

h2 {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 4px;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

p {
  margin-bottom: 20px;
  font-size: 20px;
}

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

/* --- Diamond Divider --- */
.diamond {
  display: block;
  text-align: center;
  color: var(--accent);
  font-size: 1.2rem;
  margin: var(--spacing-sm) 0 var(--spacing-md);
}

/* --- Section Tags (the colored keyword labels) --- */
.section-tags {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin-bottom: var(--spacing-xs);
}

/* ============================================
   SITE HEADER — fully transparent, no background ever
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  pointer-events: none; /* let content behind be clickable */
}

/* Re-enable pointer events on interactive children */
.site-header a,
.site-header nav,
.site-header .header-subscribe {
  pointer-events: auto;
}

.site-header a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

.site-header a:hover {
  color: var(--accent);
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-back svg {
  stroke: currentColor;
}

.header-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* --- Inline subscribe (nav.al style) --- */
.header-subscribe {
  display: none; /* hidden by default, toggled via JS */
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  gap: 12px;
}

.header-subscribe-form {
  display: flex;
  align-items: center;
  gap: 0;
  border: none;
  border-bottom: 2px solid var(--text);
}

.header-subscribe-form input[type="email"] {
  background: transparent;
  border: none;
  border-radius: 0;
  outline: none;
  padding: 6px 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  width: 200px;
  letter-spacing: 0.02em;
}

.header-subscribe-form input[type="email"]::placeholder {
  color: var(--accent);
}

.header-subscribe-form button {
  background: transparent;
  border: none;
  padding: 0 0 0 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.header-subscribe-form button svg {
  width: 20px;
  height: 20px;
  stroke: var(--text);
  transition: stroke 0.2s;
}

.header-subscribe-form button:hover svg {
  stroke: var(--accent);
}


/* ============================================
   HOMEPAGE — HERO
   Matched to original: 40px top padding, image close to top
   ============================================ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 32px var(--spacing-xl);
}

.hero-image {
  max-width: 520px;
  width: 80%;
  margin-bottom: 40px;
  /* WebGL parallax replaces this img with a canvas at runtime */
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: normal;
  line-height: 1.44;
  color: var(--text);
  max-width: 750px;
}

.hero-tagline a {
  color: var(--accent);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-links {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: normal;
}

.hero-links a {
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-location {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 300;
  color: var(--text);
}

/* ============================================
   HOMEPAGE — SECTIONS
   ============================================ */
.section {
  padding: var(--spacing-xl) 32px;
  text-align: center;
}

.section h2 {
  margin-bottom: 4px;
}

.section-body {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  font-size: 20px;
  line-height: 1.44;
}

.section-body a {
  font-weight: 400;
}

/* --- Beliefs --- */
.beliefs-list {
  list-style: none;
  padding: 0;
  max-width: 560px;
  margin: 0 auto;
}

.beliefs-list li {
  font-size: 20px;
  font-weight: 300;
  line-height: 1.44;
  padding: 0.5em 0;
}

/* --- EST. 1993 Image --- */
.est-image {
  max-width: 375px;
  margin: 0 auto;
}

/* ============================================
   ARTICLES LISTING — CARD GRID
   ============================================ */
/* --- Sculpture Gallery --- */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  align-content: center;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  padding: var(--spacing-md);
}

.gallery-piece {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  width: 340px;
  -webkit-tap-highlight-color: transparent;
}

.gallery-piece:hover {
  color: var(--text);
}

.gallery-sculpture {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-piece:hover .gallery-sculpture {
  transform: translateY(-6px);
}

.gallery-plaque {
  padding-top: 1.2rem;
}

.gallery-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.gallery-idea {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1.5;
}

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-header {
  padding: calc(var(--spacing-xxl) + 2rem) var(--spacing-md) var(--spacing-md);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.article-meta {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--spacing-md);
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: var(--spacing-md);
}

.article-subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.5;
  color: var(--text);
  max-width: 640px;
  margin: 0 auto;
}

.article-hero-image {
  max-width: 600px;
  width: 100%;
  margin: var(--spacing-lg) auto;
  padding: 0 var(--spacing-md);
  display: block;
}

.article-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 var(--spacing-md) 6rem;
}

.article-content p {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 1.4em;
  font-weight: 400;
}

.article-content h2 {
  font-size: 28px;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.article-content blockquote {
  border-left: 2px solid var(--accent);
  padding-left: var(--spacing-md);
  margin: var(--spacing-md) 0;
  font-style: italic;
  color: var(--text-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Large desktop (1400px+) */
@media (min-width: 1400px) {
  :root {
    --max-width: 1320px;
    --content-width: 520px;
  }
  .hero-image { max-width: 580px; }
}

/* Tablet landscape */
@media (max-width: 1024px) {
  .hero-image { max-width: 420px; }
  .gallery-piece { width: 260px; }
}

/* Tablet portrait */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
  }

  p { font-size: 19px; }
  .hero-tagline, .hero-links, .hero-location,
  .section-body, .beliefs-list li { font-size: 19px; }
  .article-content p { font-size: 19px; }

  h2 { font-size: 32px; }

  .hero {
    padding: 50px 28px var(--spacing-xl);
  }
  .hero-image { max-width: 400px; width: 80%; }

  .section { padding: var(--spacing-xl) 28px; }

  .est-image { max-width: 280px; }

  .gallery {
    padding-top: 80px;
    padding-bottom: 60px;
  }
  .gallery-piece { width: 240px; }

  .site-header {
    padding: 18px 24px;
  }

  .header-subscribe {
    right: 24px;
  }

  .header-subscribe-form input[type="email"] {
    width: 170px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --spacing-lg: 2rem;
    --spacing-xl: 2.5rem;
    --spacing-xxl: 3.5rem;
  }

  /* Match live site mobile text sizes — 19px body text */
  p { font-size: 19px; }
  .hero-tagline, .hero-links, .hero-location,
  .section-body, .beliefs-list li { font-size: 19px; }
  .article-content p { font-size: 19px; }

  h2 { font-size: 32px; }

  .section-tags { font-size: 17px; }
  .diamond { font-size: 0.6rem; }

  .hero {
    padding: 60px 24px var(--spacing-xl);
  }
  /* Larger hero image on mobile to match live site proportions */
  .hero-image { max-width: 100%; width: 100%; margin-bottom: 32px; }

  .hero-tagline { line-height: 1.55; }
  .hero-links { margin-top: 14px; }
  .hero-location { margin-top: 14px; }

  .section { padding: var(--spacing-xl) 24px; }

  .est-image { max-width: 220px; }

  .section-body { max-width: 100%; }
  .beliefs-list { max-width: 100%; }

  .article-subtitle { font-size: 18px; }
  .article-hero-image { margin: 1rem auto var(--spacing-lg); }

  .article-header {
    padding-left: 20px;
    padding-right: 20px;
  }

  .article-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .gallery {
    padding: 80px 20px 60px;
    gap: 2rem;
    min-height: auto;
  }
  .gallery-piece { width: 100%; max-width: 280px; }
  .gallery-title { font-size: 1.5rem; }

  .header-nav {
    gap: 8px;
  }

  .site-header {
    padding: 16px 20px;
  }

  .site-header a {
    font-size: 13px;
  }

  .header-subscribe {
    right: 20px;
  }

  .header-subscribe-form input[type="email"] {
    width: 140px;
    font-size: 16px; /* must be 16px+ to prevent iOS auto-zoom on focus */
  }
}

/* ============================================
   Wonders & Kevinski Galleries
   ============================================ */
.wonders-gallery {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 2rem 60px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.wonders-img {
  width: 100%;
  display: block;
  border-radius: 16px;
  object-fit: cover;
}

.wonders-full {
  width: 100%;
}

.wonders-row-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.wonders-row-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .wonders-gallery {
    padding: 80px 16px 40px;
  }
}

@media (max-width: 480px) {
  .wonders-gallery {
    padding: 70px 12px 30px;
    gap: 0.75rem;
  }

  .wonders-row-4 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .wonders-row-2 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .wonders-img {
    border-radius: 10px;
  }
}
