/* ==========================================================================
   Rives Creative — Global Styles
   Palette: Muted / Miami
   ========================================================================== */

:root {
  --navy: #282849;      /* Brickell Midnight */
  --lavender: #cdcbeb;  /* Neon Breeze */
  --mint: #bbd1c9;      /* Mint Deco */
  --cream: #efeeea;     /* Vizcaya Stone */
  --teal: #5c8d8e;      /* Marlin Teal */

  --ink: var(--navy);
  --bg: var(--cream);
  --muted: #6b6b7a;

  --font-head: "Jost", "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --max: 1240px;
  --pad: clamp(20px, 5vw, 64px);
}

* { 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.6;
  -webkit-font-smoothing: antialiased;
  cursor: url("../images/cursor-flamingo.png") 2 4, auto;
}

input, textarea, select { cursor: text; }
button, .btn, a[href], .tile, .nav-toggle, .skip-link { cursor: pointer; }

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--muted); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1em;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.95em 1.8em;
  border-radius: 999px;
  border: 1px solid var(--navy);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: var(--teal); border-color: var(--teal); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--cream); transform: translateY(-2px); }
.btn-light { border-color: var(--cream); color: var(--cream); }
.btn-light:hover { background: var(--cream); color: var(--navy); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(239, 238, 234, 0.92);
  backdrop-filter: blur(8px);
  padding: 14px 0;
  box-shadow: 0 1px 0 rgba(40,40,73,0.08);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }

.logo {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}
.site-header.on-dark:not(.is-scrolled) .logo,
.site-header.on-dark:not(.is-scrolled) .nav a,
.site-header.on-dark:not(.is-scrolled) .nav-toggle span {
  color: var(--cream);
}

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: currentColor;
  transition: width 0.25s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 24px; height: 1.5px; background: var(--navy); display: block; }

@media (max-width: 820px) {
  .nav-toggle { display: flex; z-index: 101; position: relative; }
  .nav {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--navy);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }
  .nav.is-open { transform: translateX(0); }
  .nav a { color: var(--cream) !important; font-size: 1.1rem; }
  .site-header.on-dark .nav-toggle span { background: var(--cream); }
  .nav-toggle[aria-expanded="true"] span { background: var(--cream) !important; }
}

html.nav-open, html.nav-open body { overflow: hidden; height: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  overflow: hidden;
  background: url("../images/hero.jpg") center/cover no-repeat, var(--navy);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }

/* Full-bleed self-hosted background video */
.hero-video-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
}
.hero-video-wrap video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(40,40,73,0.35) 0%, rgba(40,40,73,0.75) 100%);
}
.hero .wrap { position: relative; padding-bottom: 90px; padding-top: 140px; }
.hero h1 { max-width: 15ch; }
.hero-sub { color: rgba(239,238,234,0.85); max-width: 44ch; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 1.5em; }
.scroll-cue {
  position: absolute; bottom: 28px; left: var(--pad);
  font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(239,238,234,0.7);
  display: flex; align-items: center; gap: 10px;
}
.scroll-cue::after { content: ""; width: 1px; height: 28px; background: currentColor; animation: scrollcue 1.8s ease-in-out infinite; }
@keyframes scrollcue { 0%,100%{opacity:.2} 50%{opacity:1} }

/* ---------- Sections ---------- */
section { padding: clamp(70px, 10vw, 130px) 0; }
.section-head { max-width: 640px; margin-bottom: 3em; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.bg-navy { background: var(--navy); color: var(--cream); }
.bg-navy p { color: rgba(239,238,234,0.75); }
.bg-navy .eyebrow { color: var(--mint); }
.bg-mint { background: var(--mint); }
.bg-lavender { background: var(--lavender); }

/* ---------- Portfolio grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.grid.masonry .tile:nth-child(3n+2) { transform: translateY(28px); }
@media (max-width: 900px) { .grid.masonry .tile { transform: none !important; } }

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4/5;
  background: var(--navy);
}
.tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.tile:hover img { transform: scale(1.06); }
.tile-caption {
  position: absolute; inset: auto 0 0 0;
  padding: 22px 22px 18px;
  background: linear-gradient(0deg, rgba(40,40,73,0.85) 0%, rgba(40,40,73,0) 100%);
  color: var(--cream);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.tile:hover .tile-caption { opacity: 1; transform: translateY(0); }
.tile-caption .cat { font-family: var(--font-head); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mint); display: block; margin-bottom: 4px; }
.tile-caption .title { font-family: var(--font-head); font-size: 1.05rem; }

.tile-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, var(--navy) 0%, #1c1c33 100%);
}
.tile-placeholder-content { text-align: center; color: var(--mint); }
.tile-placeholder-content svg { width: 42px; height: 42px; margin-bottom: 12px; opacity: 0.85; }
.tile-placeholder-content .ph-label {
  display: block; font-family: var(--font-head); font-size: 0.72rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: rgba(239,238,234,0.55);
}

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 2.5em;
}
.filter-bar button {
  font-family: var(--font-head);
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.6em 1.3em; border-radius: 999px;
  border: 1px solid rgba(40,40,73,0.25); background: transparent; color: var(--navy);
  cursor: pointer; transition: all 0.2s ease;
}
.filter-bar button:hover, .filter-bar button.active { background: var(--navy); color: var(--cream); border-color: var(--navy); }

/* ---------- Services / cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--cream);
  border: 1px solid rgba(40,40,73,0.1);
  border-radius: 8px;
  padding: 2.2em 2em;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(40,40,73,0.08); }
.card .num { font-family: var(--font-head); color: var(--teal); font-size: 0.8rem; letter-spacing: 0.14em; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat b { display: block; font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--teal); }
.stat span { font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.bg-navy .stat span { color: rgba(239,238,234,0.6); }

/* ---------- About split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.split img { border-radius: 6px; }

/* ---------- Testimonial ---------- */
.testimonial { max-width: 780px; margin: 0 auto; text-align: center; }
.testimonial blockquote { font-family: var(--font-head); font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 500; margin: 0 0 1em; color: var(--navy); }
.bg-navy .testimonial blockquote { color: var(--cream); }
.testimonial cite { font-style: normal; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.4em; }
.field label { display: block; font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5em; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.9em 1em; border-radius: 4px;
  border: 1px solid rgba(40,40,73,0.25); background: #fff;
  font-family: var(--font-body); font-size: 1rem; color: var(--navy);
}
.field textarea { min-height: 130px; resize: vertical; }
.contact-info dt { font-family: var(--font-head); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin-top: 1.6em; }
.contact-info dd { margin: 0.3em 0 0; font-size: 1.05rem; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 1em; }
.form-status { font-size: 0.9rem; margin-top: 1em; min-height: 1.2em; }
.form-status.success { color: var(--teal); }
.form-status.error { color: #b3423d; }
.contact-form button[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--cream); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint); }
.site-footer p, .site-footer a { color: rgba(239,238,234,0.75); }
.site-footer nav a { display: block; margin-bottom: 0.6em; font-size: 0.95rem; }
.footer-bottom { border-top: 1px solid rgba(239,238,234,0.15); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; color: rgba(239,238,234,0.55); }
.social-row { display: flex; gap: 16px; }

/* ---------- Utility ---------- */
.reveal { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s ease; }
.js-reveal .reveal { opacity: 0; transform: translateY(24px); }
.js-reveal .reveal.in { opacity: 1; transform: translateY(0); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: var(--cream); padding: 10px 16px; z-index: 999; }
.skip-link:focus { left: 10px; top: 10px; }
