/* ============================================
   ONYX — Design Tokens
   ============================================ */
:root {
  --bg: #F5F4EF;
  --bg-alt: #ECEAE2;
  --surface: #FFFFFF;
  --ink: #15161A;
  --ink-soft: #55565E;
  --ink-faint: #9A9A94;
  --border: rgba(21, 22, 26, 0.10);
  --border-strong: rgba(21, 22, 26, 0.16);
  --teal: #2F6E6A;
  --teal-deep: #234F4C;
  --yellow: #D8C167;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-soft: 0 1px 2px rgba(21,22,26,0.04), 0 12px 32px rgba(21,22,26,0.06);
  --shadow-lift: 0 8px 20px rgba(21,22,26,0.08), 0 24px 48px rgba(21,22,26,0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* subtle paper grain, keeps flat colour fields from feeling sterile */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 14px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.section-sub {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 520px;
  line-height: 1.6;
  margin: 0 0 48px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  background: var(--teal-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-small {
  padding: 10px 20px;
  font-size: 13.5px;
}

/* ============================================
   Nav
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(245, 244, 239, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--ink); }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 168px 32px 100px;
  display: flex;
  align-items: center; /* Keeps text centered vertically */
  justify-content: space-between;
  gap: 40px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-logo-container {
  flex-shrink: 0;
  width: 166px; /* 2/3rds of the previous 250px */
  align-self: flex-end; /* Aligns just the logo to the bottom */
}

.hero-logo-container img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 26px;
  white-space: nowrap; /* Forces one line */
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--teal-deep);
}

.hero-title:first-of-type {
  margin-bottom: -5px; /* Adjust this value to control the spacing */
}

.hero-sub {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 560px;
  line-height: 1.65;
  margin: 0 0 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-faint);
}

.hero-tag::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--border-strong);
}

@media (max-width: 850px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 100px 22px 72px;
  }
  .hero-content {
    margin: 0 auto;
  }
  .hero-title {
    white-space: normal; /* Allows wrapping on small screens */
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-logo-container {
    order: -1;
    margin-bottom: 30px;
    width: 120px;
    align-self: center;
  }
}

/* ============================================
   Process
   ============================================ */
.process {
  max-width: 1120px;
  margin: 0 auto;
  padding: 100px 32px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.process-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.process-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.step-index {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--teal-deep);
  margin-bottom: 18px;
}

.process-step h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  margin: 0 0 10px;
}

.process-step p {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 860px) {
  .process-grid { grid-template-columns: 1fr; }
  .process { padding: 72px 22px; }
}

/* ============================================
   Work / Gallery
   ============================================ */
.work {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 32px 100px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  max-width: 996px;
  margin: 0 auto;
}

.gallery-grid-secondary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 674px;
  margin: 0 auto;
}

.secondary-intro {
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-faint);
  margin: 48px 0 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.issue-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.issue-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}
.issue-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.issue-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-alt);
}
.issue-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.issue-card:hover .issue-cover img { transform: scale(1.045); }

/* corner fold — the signature "issue" motif */
.issue-cover::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 34px;
  height: 34px;
  background: linear-gradient(225deg, var(--bg) 50%, var(--surface) 50.5%);
  box-shadow: -3px 3px 6px rgba(0, 0, 0, 0.15);
  border-bottom-left-radius: 4px;
}

.issue-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.issue-watermark span {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.55);
  transform: rotate(-32deg);
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.issue-meta {
  padding: 18px 20px 22px;
}
.issue-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.issue-number {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12.5px;
  color: var(--teal-deep);
}
.issue-status {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.issue-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
}

@media (max-width: 860px) {
  .gallery-grid, .gallery-grid-secondary { grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 100%; }
}
@media (max-width: 560px) {
  .gallery-grid, .gallery-grid-secondary { grid-template-columns: 1fr; max-width: 100%; }
  .work { padding: 24px 22px 72px; }
}

/* ============================================
   Themes
   ============================================ */
.themes {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 32px 110px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.chip:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  color: var(--ink);
}
.chip-done {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.chip-done:hover { color: var(--bg); }
.chip-add {
  border-style: dashed;
  color: var(--teal-deep);
  font-style: italic;
  font-family: var(--font-display);
}

/* ============================================
   About
   ============================================ */
.about {
  background: var(--bg-alt);
  padding: 100px 32px;
}
.about-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-facts li {
  display: flex;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.5;
}
.about-facts li:last-child { border-bottom: 1px solid var(--border); }
.about-facts li span {
  flex: 0 0 120px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 2px;
}

@media (max-width: 780px) {
  .about-grid { grid-template-columns: 1fr; }
  .about { padding: 72px 22px; }
  .about-facts li span { flex: 0 0 92px; }
}

/* ============================================
   Footer / Contact
   ============================================ */
.footer {
  max-width: 700px;
  margin: 0 auto;
  padding: 120px 32px 80px;
  text-align: center;
}

.footer-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.5vw, 44px);
  margin: 0 0 16px;
}

.footer-sub {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0 0 32px;
}

.footer-bottom {
  margin-top: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-faint);
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.footer-bottom a { transition: color 0.25s var(--ease); }
.footer-bottom a:hover { color: var(--ink); }

@media (max-width: 560px) {
  .footer { padding: 88px 22px 56px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 15, 17, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
  padding: 24px;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-inner {
  background: var(--bg);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.35s var(--ease);
  box-shadow: var(--shadow-lift);
}
.lightbox.open .lightbox-inner { transform: translateY(0) scale(1); }

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  z-index: 5;
  transition: transform 0.25s var(--ease);
}
.lightbox-close:hover { transform: rotate(90deg); }

.lightbox-header {
  padding: 26px 28px 4px;
}
.lightbox-issue {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--teal-deep);
  margin-bottom: 4px;
}
.lightbox-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
}

.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
}

.lightbox-image-wrap {
  position: relative;
  flex: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: 3 / 4;
  max-height: 58vh;
}
.lightbox-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-alt);
  display: block;
}

.watermark-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  pointer-events: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.42);
  text-transform: uppercase;
  transform: rotate(-28deg) scale(1.3);
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.lightbox-nav {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.lightbox-nav:hover { background: var(--ink); color: var(--bg); }
.lightbox-nav:disabled { opacity: 0.3; pointer-events: none; }

.lightbox-footer {
  padding: 6px 28px 26px;
}
.lightbox-footer #lightboxCount {
  font-size: 12.5px;
  color: var(--ink-faint);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lightbox-note {
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.5;
  margin: 10px 0 0;
}

@media (max-width: 560px) {
  .lightbox-image-wrap { max-height: 46vh; }
  .lightbox-header { padding: 22px 20px 4px; }
  .lightbox-footer { padding: 6px 20px 22px; }
}
