/* ===========================
   Jacob Rangel Productions
   Cooper × egg white
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&display=swap');

:root {
  --bg:       #F5F0E8;
  --ink:      #1a1a1a;
  --ink-soft: #3a3530;
  --teal:     #3DBFB8;
  --teal-dim: #2da8a2;
  --warm:     #c8b89a;
  --paper:    #EDE8DE;

  /* Cooper Black / Cooper Light stack */
  --font-display: 'Cooper Black', 'Cooper Std', 'Cooper BT', 'Bookman Old Style', Georgia, serif;
  --font-display-light: 'Cooper Light', 'Cooper BT Light', 'Cooper Std Light', 'Bookman', Georgia, serif;
  --font-hand: 'Cooper Black', 'Cooper Std', Georgia, serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  min-height: 100vh;
  /* Subtle paper grain */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  display: flex;
  flex-direction: column;
}

/* ── NAV ─────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 3rem;
  border-bottom: 1.5px solid var(--ink);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  /* Slightly roughen border */
  border-image: none;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.5px;
  line-height: 1;
  transition: color 0.2s;
}
.nav-logo:hover { color: var(--teal); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-family: var(--font-display-light);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1.5px;
  background: var(--teal);
  transition: width 0.25s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ── HOME PAGE ─────────────── */
.page-home main.home-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 3rem 4rem;
  width: 100%;
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 820px;
  width: 100%;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 0.15s;
}

.home-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.2rem;
}

.title-name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.title-prod {
  font-family: var(--font-display-light);
  font-size: clamp(0.95rem, 1.8vw, 1.5rem);
  font-weight: 300;
  line-height: 1.3;
  color: var(--ink-soft);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ── HERO IMAGE ─────────────── */
.hero-image-wrap {
  width: 100%;
  max-width: 700px;
  margin: 2rem 0 1.8rem;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.4s;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}


.home-body {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 1.6rem;
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.6s;
}

.bridge-tagline {
  font-family: var(--font-display-light);
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: 0.5px;
  line-height: 1.4;
  margin-bottom: 2.2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.75s;
}

.home-cta {
  display: flex;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.9s;
}

.btn-sketch {
  font-family: var(--font-display-light);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 0.6rem 1.8rem;
  border: 2px solid var(--ink);
  border-radius: 3px;
  position: relative;
  transition: all 0.2s;
  clip-path: polygon(0 3px, 3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px));
}
.btn-sketch:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn-text {
  font-family: var(--font-display-light);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  transition: letter-spacing 0.2s;
}
.btn-text:hover { letter-spacing: 2.5px; }

/* ── ABOUT PAGE ─────────────── */
.page-about {
  background-color: var(--bg);
}

.about-main {
  flex: 1;
  padding: 3rem 3rem 4rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.about-header {
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards 0.1s;
}

.pipeline-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display-light);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--teal);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--ink);
}
.about-title em {
  font-style: italic;
  font-weight: 300;
  font-family: var(--font-display-light);
  color: var(--teal-dim);
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.8rem;
}

.project-card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 1.6rem 1.6rem 1.4rem;
  display: flex;
  gap: 1rem;
  position: relative;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  transition: transform 0.2s, box-shadow 0.2s;
  clip-path: polygon(0 4px, 4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px));
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 4px 4px 0 var(--ink);
}
.project-card:nth-child(1) { animation-delay: 0.15s; }
.project-card:nth-child(2) { animation-delay: 0.22s; }
.project-card:nth-child(3) { animation-delay: 0.29s; }
.project-card:nth-child(4) { animation-delay: 0.36s; }
.project-card:nth-child(5) { animation-delay: 0.43s; }
.project-card:nth-child(6) { animation-delay: 0.50s; }
.project-card:nth-child(7) { animation-delay: 0.57s; }

.project-card--featured {
  border-color: var(--teal);
  grid-column: span 2;
}

.card-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--warm);
  line-height: 1;
  flex-shrink: 0;
  width: 2.5rem;
}

.card-body { flex: 1; }

.card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 0.3rem;
  color: var(--ink);
}

.card-type {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--teal-dim);
  margin-bottom: 0.65rem;
  letter-spacing: 0.3px;
}

.card-desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.card-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.card-tools span {
  font-family: var(--font-display-light);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--warm);
  border-radius: 2px;
}

.card-link {
  font-family: var(--font-display-light);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.5px;
  color: var(--teal);
  text-decoration: none;
  transition: letter-spacing 0.18s;
}
.card-link:hover { letter-spacing: 1.5px; }

.card-sketch {
  flex-shrink: 0;
  width: 90px;
  opacity: 0.85;
  align-self: flex-end;
}
.card-sketch svg { width: 100%; height: auto; }

/* ── CONTACT PAGE ─────────────── */
.page-contact {
  background-color: var(--bg);
}

.contact-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem 2rem;
  text-align: center;
  gap: 1rem;
}

.contact-content {
  opacity: 0;
  animation: fadeUp 0.9s ease forwards 0.2s;
}

.contact-quote {
  margin-bottom: 1.8rem;
}
.quote-line {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.9;
  letter-spacing: 0.2px;
}

.contact-question {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 1.8rem;
}

.contact-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.cta-label {
  font-family: var(--font-display-light);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal);
}

.email-svg {
  width: 300px;
  height: auto;
  /* Prevent selection entirely */
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.octopus-wrap {
  margin-top: 1rem;
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.55s;
}

/* ── CHEST SCENE ─────────────── */
.chest-scene {
  position: relative;
  display: inline-block;
  margin-top: 1.5rem;
  cursor: pointer;
  opacity: 0;
  animation: fadeUp 1s ease forwards 0.55s;
}

.octopus-img {
  width: 340px;
  height: auto;
  max-width: 90vw;
  display: block;
  transition: transform 0.3s ease;
}

.chest-scene:hover .octopus-img {
  transform: scale(1.02);
}

.chest-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.chest-particle {
  position: absolute;
  display: block;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0.5);
  }
  15% {
    opacity: 1;
    transform: translateY(-20px) translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-140px) translateX(var(--drift)) scale(0.8);
  }
}

/* ── FOOTER ─────────────── */
.footer {
  text-align: center;
  padding: 1.2rem;
  font-family: var(--font-display-light);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 1px;
  color: var(--warm);
  border-top: 1px solid var(--warm);
  margin-top: auto;
}

/* ── ANIMATIONS ─────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── RESPONSIVE ─────────────── */
@media (max-width: 768px) {
  .nav { padding: 1rem 1.5rem; }

  .page-home main.home-main {
    padding: 3rem 1.5rem 2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card--featured {
    grid-column: span 1;
  }

  .about-main {
    padding: 2rem 1.5rem 3rem;
  }

  .contact-main {
    padding: 2.5rem 1.5rem 2rem;
  }
}

@media (max-width: 480px) {
  .nav-links { gap: 1.4rem; }
  .nav-links a { font-size: 1rem; }
  .card-sketch { display: none; }
}
