/* ==========================================================================
   Emerald Media & Entertainment
   Layout is mobile-first; the reference desktop composition kicks in at 900px.
   ========================================================================== */

:root {
  --red-900: #4a050d;
  --red-800: #5c0710;
  --red-700: #6f0a14;
  --red-600: #8c0f1b;
  --red-500: #c2101c;
  --red-400: #e6202f;
  --red-300: #f43a47;
  --flame: #f4321f;
  --crimson: #c9201f;
  --magenta: #d81b73;
  --blush: #f4998c;
  --cream: #fbe6e4;
  --cream-dim: rgba(251, 230, 228, 0.78);
  --ink: #2a0206;

  --shell: min(1140px, 100% - 3rem);
  --radius: 6px;
  --font-display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  /* Fixed header height, so anchor targets are not hidden under it. */
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--cream);
  background-color: var(--red-800);
  background-image:
    radial-gradient(120% 80% at 78% 4%, rgba(230, 32, 47, 0.42) 0%, transparent 58%),
    radial-gradient(90% 60% at 12% 46%, rgba(140, 15, 27, 0.6) 0%, transparent 62%),
    linear-gradient(178deg, #6d0a14 0%, #4d060e 44%, #74111c 100%);
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--cream);
  color: var(--ink);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------- Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(42, 2, 6, 0.12);
}

.site-header__inner {
  width: var(--shell);
  margin-inline: auto;
  min-height: 4.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.logo {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo__mark {
  width: 2.5rem;
  height: auto;
  filter: drop-shadow(0 1px 2px rgba(120, 8, 18, 0.4));
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo__text strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.14em;
}

.logo__text span {
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: rgba(42, 2, 6, 0.66);
}

.nav-primary {
  display: none;
}

.nav-primary__list {
  display: flex;
  gap: 1.75rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.nav-primary__list a {
  position: relative;
  padding-block: 0.35rem;
  color: var(--red-600);
  font-weight: 600;
  transition: color 0.18s var(--ease);
}

.nav-primary__list a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0.1rem;
  height: 2px;
  background: var(--red-400);
  transition: right 0.24s var(--ease);
}

.nav-primary__list a:hover,
.nav-primary__list a:focus-visible {
  color: var(--red-400);
}

.nav-primary__list a:hover::after,
.nav-primary__list a:focus-visible::after {
  right: 0;
}

.site-header__end {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.social {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.social__link {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}

.social__link:hover,
.social__link:focus-visible {
  transform: translateY(-2px);
}

.social--header {
  display: none;
  color: var(--red-500);
}

.nav-toggle {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--red-600);
  cursor: pointer;
}

.mobile-nav {
  border-top: 1px solid rgba(42, 2, 6, 0.12);
  padding: 1rem 0 1.5rem;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav__list,
.mobile-nav .social {
  width: var(--shell);
  margin-inline: auto;
}

.mobile-nav__list {
  display: grid;
  gap: 0.2rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
}

.mobile-nav__list a {
  display: block;
  padding: 0.55rem 0;
  color: var(--red-600);
  font-weight: 600;
  border-bottom: 1px solid rgba(42, 2, 6, 0.08);
}

.mobile-nav .social {
  margin-top: 1.1rem;
  color: var(--red-500);
}

/* ----------------------------------------------------------------- Hero --- */

main {
  display: block;
}

.hero {
  position: relative;
  width: var(--shell);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem);
  display: grid;
  gap: clamp(1.5rem, 4vw, 2rem);
}

.hero__art {
  order: -1;
  justify-self: center;
  width: min(92%, 30rem);
}

.hero__gem {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 26px 60px rgba(28, 1, 5, 0.6));
  animation: gem-float 9s ease-in-out infinite;
}

@keyframes gem-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(-0.7deg);
  }
}

.hero__title {
  font-size: clamp(2.4rem, 8.5vw, 4.6rem);
  letter-spacing: 0.005em;
}

.hero__line {
  display: block;
}

.hero__line--accent {
  color: var(--red-300);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  border: 1px solid rgba(251, 230, 228, 0.35);
  border-radius: 999px;
  background: rgba(251, 230, 228, 0.14);
  backdrop-filter: blur(3px);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-pill:hover,
.btn-pill:focus-visible {
  background: rgba(251, 230, 228, 0.24);
  border-color: var(--cream);
}

.btn-pill__icon {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: var(--red-400);
  color: var(--cream);
}

.btn-pill__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.btn-pill:hover .btn-pill__icon {
  transform: translateX(2px);
  transition: transform 0.2s var(--ease);
}

/* -------------------------------------------------------------- Gallery --- */

.gallery {
  width: var(--shell);
  margin-inline: auto;
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.gallery__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(15rem, 78%);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.gallery__track::-webkit-scrollbar {
  display: none;
}

.gallery__item {
  scroll-snap-align: start;
}

.gallery__item figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(30, 2, 6, 0.42);
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.gallery__item figure:hover img {
  transform: scale(1.05);
}

.gallery__item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.75rem 0.9rem 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  background: linear-gradient(to top, rgba(30, 2, 6, 0.88), transparent);
}

.gallery__controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.gallery__arrow {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(251, 230, 228, 0.3);
  border-radius: 999px;
  background: transparent;
  color: var(--red-300);
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.gallery__arrow:hover,
.gallery__arrow:focus-visible {
  background: var(--red-400);
  color: var(--cream);
}

/* -------------------------------------------------------- Text sections --- */

.section-title {
  font-size: clamp(2rem, 6vw, 3.4rem);
}

.prose {
  margin-top: 1.4rem;
  max-width: 34rem;
  color: var(--cream-dim);
}

.prose p {
  margin: 0 0 1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--cream);
  font-weight: 700;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: rgba(244, 58, 71, 0.7);
  text-underline-offset: 3px;
}

.text-section,
.services-block,
.projects,
.contact {
  width: var(--shell);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.text-section--art {
  position: relative;
}

/* Purely decorative, and there is no room for it beside the copy on phones. */
.text-section__art {
  display: none;
}

.text-section__gem {
  width: 100%;
  filter: drop-shadow(0 20px 50px rgba(24, 1, 4, 0.55));
}

/* --------------------------------------------------------- Service grid --- */

.service-grid {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2rem, 5vw, 3.25rem);
  grid-template-columns: 1fr;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.6rem 1.4rem;
  border-radius: var(--radius);
  color: var(--cream);
  text-align: center;
  box-shadow: 0 16px 34px rgba(30, 2, 6, 0.35);
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(30, 2, 6, 0.48);
}

.service-card--flame {
  background: linear-gradient(160deg, #ff4a24 0%, var(--flame) 100%);
}

.service-card--crimson {
  background: linear-gradient(160deg, #d92a26 0%, var(--crimson) 100%);
}

.service-card--magenta {
  background: linear-gradient(160deg, #ea2183 0%, var(--magenta) 100%);
}

.service-card--blush {
  background: linear-gradient(160deg, #f8ab9e 0%, var(--blush) 100%);
  color: #5c0710;
}

.service-card__icon {
  display: grid;
  place-items: center;
  margin-inline: auto;
  width: 3.25rem;
  height: 3.25rem;
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card__title {
  font-size: 0.98rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
}

.service-card__body {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  opacity: 0.92;
}

/* -------------------------------------------------------------- Projects --- */

.projects__head .prose {
  margin-inline: 0;
}

.project-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  grid-template-columns: 1fr;
}

.project-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(251, 230, 228, 0.07);
  border: 1px solid rgba(251, 230, 228, 0.14);
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 58, 71, 0.6);
}

.project-card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.project-card__body {
  padding: 1.1rem 1.2rem 1.4rem;
}

.project-card__client {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-300);
}

.project-card__title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0;
}

.project-card__desc {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--cream-dim);
}

/* --------------------------------------------------------------- Contact --- */

.contact {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.contact__list {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  font-size: 0.95rem;
}

.contact__list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact__list svg {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--red-300);
}

.contact__list a:hover,
.contact__list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------------- Footer --- */

.site-footer {
  margin-top: clamp(2rem, 6vw, 4rem);
  padding-bottom: 2rem;
}

.site-footer__inner {
  width: var(--shell);
  margin-inline: auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(251, 230, 228, 0.28);
  display: grid;
  gap: 1.75rem;
}

.site-footer__tagline {
  margin: 0;
  max-width: 22rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.site-footer__tagline em {
  font-style: normal;
  color: var(--red-300);
}

.site-footer__end {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer__nav {
  display: grid;
  gap: 0.2rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.07em;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus-visible {
  color: var(--red-300);
}

.site-footer__copy {
  width: var(--shell);
  margin: 2.5rem auto 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--cream-dim);
}

/* ------------------------------------------------------------- Desktop --- */

@media (min-width: 900px) {
  .nav-primary,
  .social--header {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }

  .site-header__inner {
    grid-template-columns: 1fr auto 1fr;
    min-height: 5rem;
  }

  .nav-primary {
    grid-column: 1;
  }

  .logo {
    grid-column: 2;
    justify-self: center;
  }

  .site-header__end {
    justify-self: end;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    padding-block: clamp(3rem, 6vw, 6rem) 3rem;
  }

  .hero__art {
    order: 0;
    grid-column: 2;
    width: 100%;
  }

  .hero__copy {
    grid-column: 1;
    grid-row: 1;
  }

  .gallery__track {
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .gallery__controls {
    display: none;
  }

  .text-section--art {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 2rem;
  }

  .text-section--art .text-section__art {
    display: block;
    width: 100%;
    grid-column: 1;
    opacity: 0.9;
    pointer-events: none;
  }

  .text-section--art .text-section__copy {
    grid-column: 2;
    text-align: right;
  }

  .text-section--art .prose {
    margin-left: auto;
  }

  .services-block .text-section__copy {
    text-align: right;
  }

  .services-block .prose {
    margin-left: auto;
  }

  .service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }

  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .site-footer__end {
    justify-content: flex-end;
    gap: 3rem;
  }
}

/* Reveal-on-scroll, opt-in via JS so no-JS visitors see everything. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media print {
  .js-reveal .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js-reveal .reveal {
    opacity: 1;
    transform: none;
  }
}
