/* ============================================
   ADJ Design — Portfolio
   Palette: white base, sunset gradients
   Type: Bodoni Moda (display) + Jost (body)
============================================ */

/* Fonts are loaded by a <link> in each page's <head>, not by @import here.
   An @import forces the browser to download and parse this file before it
   can even start fetching the fonts; a <link> lets both start at once. */

:root {
  --white: #ffffff;
  --off-white: #fafaf8;
  --ink: #1a1a1a;
  --ink-light: #6b6b6b;

  --sunrise: #f97316;
  --dusk: #e11d48;
  --twilight: #7c3aed;
  --golden: #fbbf24;

  --gradient-sunset: linear-gradient(135deg, var(--golden) 0%, var(--sunrise) 30%, var(--dusk) 65%, var(--twilight) 100%);
  --gradient-soft: linear-gradient(135deg, #fff7ed 0%, #fce7f3 50%, #ede9fe 100%);

  --nav-height: 96px;
  --max-width: 1200px;
  --section-gap: 160px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: transparent;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 48px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

nav.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  position: fixed;
  left: 24px;
  top: 8px;
  z-index: 102;
  pointer-events: all;
}

.nav-logo-img {
  height: 80px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-light);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--ink); }

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 60px) 48px 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 40px;
}

.hero-text {
  flex: none;
  min-width: 0;
}

.hero-logo-wrap {
  order: -1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-float {
  width: 116px;
  height: auto;
  animation: float 8s ease-in-out infinite;
  filter: drop-shadow(0 20px 60px rgba(249,115,22,0.25));
}

@keyframes float {
  0%   { transform: translateY(0px) rotate(0deg) scale(1); }
  15%  { transform: translateY(-22px) rotate(3deg) scale(1.03); }
  35%  { transform: translateY(-10px) rotate(-2deg) scale(0.97); }
  50%  { transform: translateY(-30px) rotate(4deg) scale(1.05); }
  65%  { transform: translateY(-8px) rotate(-3deg) scale(0.98); }
  80%  { transform: translateY(-25px) rotate(2deg) scale(1.02); }
  100% { transform: translateY(0px) rotate(0deg) scale(1); }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0.6;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: drift 8s ease-in-out infinite alternate;
  z-index: 0;
}

.hero-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--golden), var(--sunrise));
  top: -100px; right: -80px;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--dusk), var(--twilight));
  bottom: -80px; right: 200px;
  animation-delay: -3s;
}

.hero-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--sunrise), var(--dusk));
  top: 40%; left: -60px;
  animation-delay: -5s;
}

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.08); }
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'Bodoni Moda', serif;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
  color: var(--ink);
}

.hero-title em {
  font-style: italic;
  background: var(--gradient-sunset);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--ink-light);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

/* ---- SECTIONS ---- */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

.portfolio-section {
  padding-top: 100px;
  padding-bottom: 120px;
  border-top: 1px solid rgba(0,0,0,0.06);
  position: relative;
}

/* Soft, cloudy colour wash fading in toward the bottom of each section.
   Uses the hero's soft palette; white at the top -> gentle sunset clouds
   at the bottom. The mask makes it diffuse rather than a hard band. */
.portfolio-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: var(--gradient-soft);
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 100%);
  pointer-events: none;
  z-index: 0;
}

.portfolio-section > .container {
  position: relative;
  z-index: 1;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  margin-bottom: 56px;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 8px;
}

.section-title {
  font-family: 'Bodoni Moda', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--ink);
}

.section-title span {
  font-style: italic;
  background: var(--gradient-sunset);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-link {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.2s;
  white-space: nowrap;
}

.section-link:hover { color: var(--sunrise); }

/* ---- HERO IMAGE ---- */
.hero-project {
  width: 100%;
  aspect-ratio: 16/7;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
}

.hero-project .placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bodoni Moda', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.1em;
}

.placeholder-1 { background: var(--gradient-sunset); }
.placeholder-2 { background: linear-gradient(135deg, #7c3aed, #e11d48); }
.placeholder-3 { background: linear-gradient(135deg, #f97316, #fbbf24); }
.placeholder-4 { background: linear-gradient(135deg, #e11d48, #7c3aed, #f97316); }

/* ---- PROJECT GRID ---- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.project-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.project-card {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-card:hover { transform: translateY(-6px); }
.project-card:hover .card-overlay { opacity: 1; }

.card-image {
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
}

.card-image .placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bodoni Moda', serif;
  font-style: italic;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-overlay span {
  color: white;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.6);
  padding: 8px 20px;
  border-radius: 100px;
}

.card-info {
  padding: 16px 4px 4px;
}

.card-title {
  font-family: 'Bodoni Moda', serif;
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--ink-light);
  letter-spacing: 0.06em;
}

/* ---- LOGO CAROUSEL ---- */
/* Thinner section: a single auto-scrolling row of logos. */
.logo-section {
  padding-top: 64px;
  padding-bottom: 64px;
}

.logo-section .section-header {
  margin-bottom: 40px;
}

.logo-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* Fade the logos out toward both edges. */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.logo-track {
  display: flex;
  width: max-content;
  /* The track holds two identical sets of 12; shifting by -50% moves
     exactly one set, so the loop is seamless. */
  animation: logo-scroll 60s linear infinite;
}

.logo-carousel:hover .logo-track {
  animation-play-state: paused;
}

.logo-item {
  flex: 0 0 auto;
  width: 160px;
  margin: 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.logo-img {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* AMA Naturopathy logo reads large at full size; scale it down to 80%. */
.logo-item img.logo-sm {
  transform: scale(0.8);
}

.logo-name {
  margin-top: 10px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-light);
  text-align: center;
}

@keyframes logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; }
}

/* ---- SUNSET DIVIDER ---- */
.sunset-divider {
  height: 3px;
  background: var(--gradient-sunset);
  border: none;
  margin: 0;
  opacity: 0.4;
}

/* ---- FOOTER ---- */
footer {
  padding: 60px 48px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo-img {
  height: 40px;
  width: auto;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--ink-light);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-social a {
  display: inline-flex;
  color: var(--ink-light);
  transition: color 0.2s, transform 0.2s;
}

.footer-social a:hover {
  color: var(--sunrise);
  transform: translateY(-2px);
}

/* ---- STORYBOOK CAROUSEL ---- */
/* Frame matches the page spreads (3:2) so no artwork or text is cropped. */
.storybook {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #fff;
  overflow: hidden;
}

/* Portrait variant for upright artwork series (3:4). */
.storybook--portrait {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
}

/* Artwork that fills its tile edge to edge (e.g. the tarot cards) scaled
   down so it sits with a margin, in line with the framed photo beside it. */
.storybook--inset .storybook-slide img { transform: scale(0.7); }

/* A card holding a carousel shouldn't lift on hover, or the controls move
   out from under the cursor mid-click. */
.project-card--carousel { cursor: default; }
.project-card--carousel:hover { transform: none; }

.storybook-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.storybook-slide {
  min-width: 100%;
  height: 100%;
}

/* On larger screens, inset the spread within a white mat so it reads as a
   framed illustration rather than filling the full width. Vertical padding
   is 2/3 of horizontal, which keeps the inner area at the pages' 3:2. */
@media (min-width: 769px) {
  .storybook-slide { padding: 48px 72px; }
  /* Portrait mat: vertical is 4/3 of horizontal, keeping the inner area 3:4. */
  .storybook--portrait .storybook-slide { padding: 32px 24px; }
  /* Reduce the featured storybook to ~70% width on larger screens. */
  .hero-project.storybook {
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
  }
}

.storybook-slide .placeholder {
  width: 100%;
  height: 100%;
}

.storybook-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.storybook-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px -6px rgba(0,0,0,0.25);
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

.storybook-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}

.storybook-prev { left: 16px; }
.storybook-next { right: 16px; }

.storybook-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.storybook-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.storybook-dot:hover { background: rgba(0,0,0,0.38); }

.storybook-dot.active {
  background: var(--ink);
  transform: scale(1.3);
}

/* ---- LIGHTBOX ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: rgba(20, 16, 24, 0.86);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.visible {
  opacity: 1;
  visibility: visible;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 100%;
  max-height: 100%;
  transform: scale(0.96);
  transition: transform 0.3s ease;
}

.lightbox.visible .lightbox-figure {
  transform: scale(1);
}

/* Stage clips the image so zooming never spills past its frame. */
.lightbox-stage {
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.6);
  line-height: 0;
}

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  cursor: zoom-in;
  transform: scale(1);
  transform-origin: center center;
  transition: transform 0.12s ease-out;
}

.lightbox-img.zoomed {
  cursor: move;
}

.lightbox-caption {
  font-family: 'Bodoni Moda', serif;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.85);
  text-align: center;
}

.lightbox-hint {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}

.lightbox-close:hover {
  color: white;
  transform: scale(1.1);
}

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  nav { padding: 0 24px; }
  .hero { padding: calc(var(--nav-height) + 40px) 24px 60px; }
  .hero-content { flex-direction: column; gap: 40px; }
  .hero-logo-float { width: 112px; }
  .container { padding: 0 24px; }
  footer { padding: 40px 24px; flex-direction: column; gap: 24px; text-align: center; }
  .project-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .project-grid.two-col { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; gap: 16px; }
  :root { --section-gap: 72px; }
}

@media (max-width: 480px) {
  .project-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
