/* ===== CUSTOM PROPERTIES ===== */
:root {
  --bg: #0F1219;
  --accent: #22C55E;
  --accent-glow: #4ADE80;
  --text: #F1F3F5;
  --text-dim: #8B95A5;
  --text-muted: rgba(241, 243, 245, 0.42);
  --surface: #171D28;
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(34, 197, 94, 0.2);
  --glow: rgba(34, 197, 94, 0.15);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
body.home-page {
  overflow: hidden;
  height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

/* ===== FILM GRAIN OVERLAY ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.03;
  filter: url(#grain);
  width: 100%;
  height: 100%;
}

/* ===== UTILITIES ===== */
.accent { color: var(--accent); }

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ===== REVEAL ANIMATION ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease-out);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PAGE LOADER ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease);
}
.loader.hide {
  opacity: 0;
  pointer-events: none;
}
.loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.loader__bar {
  width: 120px;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.loader__bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  animation: loaderBar 1.8s var(--ease) forwards;
}
@keyframes loaderBar {
  to { width: 100%; }
}
.loader__text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
}

/* ===== NAVBAR ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  background: rgba(15, 18, 25, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s;
}
.nav__link:hover,
.nav__link--active {
  color: var(--text);
}
.nav__cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
  color: var(--accent);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.nav__cta:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 24px var(--glow);
}

/* ===== HERO ===== */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 5rem 2rem 2rem;
}
.hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero__text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hero__headline {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1.15;
  overflow: hidden;
}
.hero__line {
  display: block;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease-out);
}
.hero__line.revealed {
  opacity: 1;
  transform: translateY(0);
}
.hero__body {
  color: var(--text-dim);
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 480px;
  line-height: 1.7;
}
.hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  transition: all 0.3s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.btn--solid {
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
}
.btn--solid:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.3);
}
.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}

/* Hero Visual */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero__photo-wrapper {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 9 / 10;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease-out);
}
.hero__visual.revealed .hero__photo-wrapper {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Floating Cards */
.hero__card {
  position: absolute;
  background: rgba(23, 29, 40, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease-out);
  white-space: nowrap;
}
.hero__visual.revealed .hero__card { opacity: 1; transform: translateY(0); }
.hero__visual.revealed .hero__card--1 { transition-delay: 0.6s; }
.hero__visual.revealed .hero__card--2 { transition-delay: 0.9s; }
.hero__card-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero__card-value {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text);
}
.hero__card--1 { top: 12%; left: -10%; }
.hero__card--2 { bottom: 10%; right: -10%; }

/* ===== RESOURCES ===== */
.resources-page {
  overflow-x: hidden;
}
.resources {
  width: 100%;
  min-height: 100vh;
  padding: 9rem 2rem 5rem;
}
.resources__hero,
.resource-library {
  max-width: 1120px;
  margin: 0 auto;
}
.resources__hero {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding-bottom: 2.5rem;
}
.resources__headline {
  max-width: 760px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 4.4rem);
  line-height: 1.05;
}
.resources__intro {
  max-width: 640px;
  color: var(--text-dim);
  font-size: 1.08rem;
  font-weight: 300;
  line-height: 1.75;
}
.resource-library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
  gap: 1.5rem;
}
.resource-card {
  overflow: hidden;
  text-align: left;
  background: rgba(10, 15, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.resource-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 197, 94, 0.32);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.34), 0 0 32px rgba(34, 197, 94, 0.08);
}
.resource-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #05070C;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.resource-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.resource-card__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem;
}
.resource-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.resource-card h2,
.resource-screen h2,
.download-box h3,
.resource-screen__cta h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
}
.resource-card h2 {
  font-size: 1.75rem;
}
.resource-card p,
.resource-screen p,
.download-box p,
.resource-screen__cta p {
  color: var(--text-dim);
  font-weight: 300;
}
.resource-card p {
  font-size: 0.96rem;
  line-height: 1.65;
}
.resource-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.resource-card__tags span {
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-size: 0.82rem;
}
.resource-detail-page {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 197, 94, 0.08), transparent 28%),
    var(--bg);
}
.resource-detail-page__main {
  max-width: 1120px;
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(5.5rem, 8vw, 7rem) 2rem 5rem;
}
.resource-back {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.62rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(15, 18, 25, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.resource-back:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}
.resource-screen__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 760px;
  padding-right: 0;
  margin-bottom: 1.75rem;
}
.resource-screen h2 {
  max-width: 100%;
  font-size: clamp(2.15rem, 4vw, 3.25rem);
  overflow-wrap: break-word;
}
.resource-screen__header h1 {
  max-width: 100%;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.15rem, 4vw, 3.25rem);
  line-height: 1.15;
  overflow-wrap: break-word;
}
.resource-screen__header p {
  font-size: 1.05rem;
  line-height: 1.75;
}
.resource-screen__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.resource-screen__preview,
.download-box,
.resource-screen__cta {
  background: rgba(23, 29, 40, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
.resource-screen__preview {
  display: flex;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 34%),
    rgba(23, 29, 40, 0.74);
  padding: clamp(0.75rem, 2vw, 1rem);
}
.resource-screen__preview img {
  width: min(100%, 560px);
  height: auto;
  background: #05070C;
  border-radius: 6px;
}
.resource-note {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.35rem;
  background: rgba(23, 29, 40, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
.resource-note h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.55rem;
  line-height: 1.15;
}
.resource-note p {
  max-width: 760px;
  color: var(--text-dim);
  font-weight: 300;
  font-size: 0.98rem;
  line-height: 1.7;
}
.download-box,
.resource-screen__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.35rem;
}
.download-box h2,
.download-box h3,
.resource-screen__cta h2,
.resource-screen__cta h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  font-size: 1.55rem;
}
.download-box p,
.resource-screen__cta p {
  font-size: 0.96rem;
  line-height: 1.65;
}
.resource-screen__cta {
  border-color: var(--border-accent);
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.modal.open {
  opacity: 1;
  pointer-events: auto;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal__card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s var(--ease-out);
}
.modal.open .modal__card {
  transform: scale(1) translateY(0);
}
.modal__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.5rem;
  margin-top: 0.25rem;
}
.modal__body {
  color: var(--text-dim);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.6;
}
.modal__close {
  margin-top: 0.5rem;
  padding: 0.65rem 1.8rem;
  font-size: 0.8rem;
}
.download-modal__card {
  max-width: 460px;
}
.download-modal__link {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}
.download-modal__link:hover {
  color: var(--accent-glow);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero__inner { gap: 3rem; }
  .hero__card--1 { left: -4%; }
  .hero__card--2 { right: -4%; }
}

@media (max-width: 768px) {
  body.home-page { height: auto; overflow: auto; }
  .nav { padding: 0 1.25rem; }
  .nav__inner { height: 68px; }
  .nav__links { gap: 1rem; }
  .nav__cta { padding: 0.55rem 1rem; }
  .hero {
    height: auto;
    min-height: 100vh;
    padding: 6rem 1.5rem 3rem;
  }
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero__visual { order: -1; }
  .hero__text { align-items: center; text-align: center; }
  .hero__headline { text-align: center; }
  .hero__body { text-align: center; }
  .hero__ctas { justify-content: center; }
  .hero__card { display: none; }
  .hero__photo-wrapper { max-width: 280px; }
  .resources { padding: 8rem 1.25rem 4rem; }
  .resource-library {
    grid-template-columns: minmax(0, 1fr);
  }
  .resource-card {
    max-width: 380px;
  }
  .resource-detail-page__main {
    padding: 6rem 1.25rem 4rem;
  }
  .resource-screen__actions {
    grid-template-columns: 1fr;
  }
  .resource-screen__header {
    padding-right: 0;
  }
  .resource-screen__preview img {
    max-height: none;
  }
}

@media (max-width: 480px) {
  .hero__headline { font-size: 1.8rem; }
  .nav { padding: 0 1rem; }
  .nav__logo { font-size: 1rem; }
  .nav__links { gap: 0.75rem; }
  .nav__link { font-size: 0.68rem; }
  .nav__cta {
    font-size: 0.68rem;
    padding: 0.5rem 0.75rem;
  }
  .resource-card {
    max-width: none;
  }
  .download-box .btn,
  .resource-screen__cta .btn {
    width: 100%;
  }
}
