/* ============================================
   COMPONENTS
   BEM component styles that extend style.css.
   Uses new design system variables throughout.
   ============================================ */

/* ── NAV ── */
.nav__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: 0.02em;
  border-bottom: 2px solid var(--coral);
  padding-bottom: 1px;
  transition: color 0.3s ease;
}

nav.scrolled .nav__logo { color: var(--navy); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
}

.nav__links li { list-style: none; }
.nav__links li::before { content: none; }

.nav__links a {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  transition: color 0.3s ease, opacity 0.3s ease;
  letter-spacing: 0.03em;
}

.nav__links a:hover { opacity: 0.7; }
nav.scrolled .nav__links a { color: var(--navy); }

.nav__cta {
  background: var(--coral);
  color: #fff !important;
  padding: 0.5rem 1.3rem;
  border-radius: var(--radius-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.nav__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232, 84, 42, 0.3);
  opacity: 1 !important;
}

nav.scrolled .nav__cta { color: #fff !important; }

/* Current page link: coral underline, matching the logo */
.nav__links a[aria-current="page"] {
  border-bottom: 2px solid var(--coral);
  padding-bottom: 1px;
}

/* Nav on light pages (dark text from the start). Also used by the homepage. */
.nav--onlight .nav__logo { color: var(--navy); }
.nav--onlight .nav__links a { color: var(--navy); }

/* ── HERO ── */
.hero {
  padding: 0;   /* override section tag padding */
  position: relative;
  height: 100svh;
  min-height: 600px;
  background:
    url('https://images.unsplash.com/photo-1505118380757-91f5f5632de0?w=1600&q=80')
    center center / cover no-repeat;
  display: flex;
  align-items: flex-end;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 15, 28, 0.82) 0%,
    rgba(10, 15, 28, 0.45) 55%,
    rgba(10, 15, 28, 0.15) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: var(--section-padding-h);
  padding-bottom: clamp(60px, 8vw, 110px);
  max-width: var(--max-width);
  margin-inline: auto;
  width: 100%;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
}

.tag {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.75rem;
}

.hero__headline {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1.08;
  color: #fff;
  max-width: 14ch;
  margin-bottom: 2rem;
  letter-spacing: -0.5px;
}

.hero__subline {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--coral);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

.hero__scroll {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
}

/* ── HERO FADE-UP ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.8s ease forwards;
  animation-delay: var(--delay, 0s);
}

/* ── LOGO STRIP ── */
.logo-strip {
  background: var(--navy);
  padding-block: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-strip__label {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--text-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.5);
  text-align: center;
  margin-bottom: 2rem;
}

.logo-strip__track-wrap {
  overflow: hidden;
}

.logo-strip__track {
  display: flex;
  align-items: center;
  gap: 80px;
  width: max-content;
  animation: logoScroll 30s linear infinite;
}

.logo-strip__track-wrap:hover .logo-strip__track {
  animation-play-state: paused;
}

.logo-strip__logo {
  height: auto;
  width: auto;
  max-height: 38px;
  max-width: 128px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  opacity: 0.75;
  transition: opacity 0.2s ease;
  object-fit: contain;
}

.logo-strip__logo:hover { opacity: 1; }

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

/* ── MARQUEE ── */
.marquee {
  background: var(--navy);
  overflow: hidden;
  white-space: nowrap;
  padding-block: 1rem;
}

.marquee__track {
  display: inline-flex;
  animation: scroll linear infinite;
}

.marquee--fast .marquee__track  { animation-duration: 28s; }
.marquee--slow .marquee__track  { animation-duration: 55s; }

.marquee--fast span {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  padding-right: 1rem;
}

.marquee--display span {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: rgba(255,255,255,0.18);
  padding-right: 1rem;
}

.coral-star {
  color: var(--coral);
  font-style: normal;
  opacity: 1;
}

.marquee--display { padding-block: 2.5rem; }

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

/* ── ABOUT ── */
.about {
  background: var(--cream);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  max-width: var(--max-width);
  margin-inline: auto;
}

.about__text { display: flex; flex-direction: column; gap: 1.4rem; }

.about__headline {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.18;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.about__body {
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--navy);
  opacity: 0.85;
  max-width: 46ch;
}

.about__link {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  width: fit-content;
  transition: opacity 0.3s ease;
}

.about__link:hover { opacity: 0.7; }

.about__image-wrap {
  position: relative;
  height: clamp(440px, 55vw, 680px);
  border-radius: var(--radius-md);
  overflow: visible;
}

.about__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.about__badge {
  position: absolute;
  bottom: -1rem;
  right: -1rem;
  background: var(--coral);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* ── WORK ── */
.work {
  background: var(--warm-white);
}

.work__header {
  max-width: var(--max-width);
  margin-inline: auto;
  margin-bottom: clamp(40px, 5vw, 70px);
}

.work__headline {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--navy);
  margin-top: 0.5rem;
  letter-spacing: -0.5px;
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  max-width: var(--max-width);
  margin-inline: auto;
}

/* Work card: image panel on top, text below. Whole card is the link.
   Per-card crop controls (tweak these to adjust each screenshot):
     --shot-pos   object-position of the screenshot inside its frame
     --shot-zoom  scale applied from --shot-pos (1 = no zoom)          */
.work-card {
  --shot-pos: 0% 0%;
  --shot-zoom: 1;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  color: var(--navy);
  text-decoration: none;
  /* reset the legacy .work-card rule in style.css */
  overflow: visible;
  background: transparent;
}

/* Reveal fades in slowly; the hover lift uses `translate` so it stays quick */
.work-card.reveal {
  transition:
    opacity 0.75s ease var(--delay, 0s),
    transform 0.75s ease var(--delay, 0s),
    translate 0.3s ease,
    box-shadow 0.3s ease;
}

.work-card:hover {
  translate: 0 calc(var(--space-xs) * -0.5);
  box-shadow: var(--shadow-lg);
}

.work-card:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 4px;
}

/* Image panel */
.work-card__panel {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--sand);
  isolation: isolate;
}

.work-card__circle {
  position: absolute;
  top: -18%;
  right: -14%;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral);
  z-index: 0;
}

.work-card__spark {
  position: absolute;
  left: 5%;
  bottom: 6%;
  width: 9%;
  stroke: var(--coral);
  stroke-width: 1.6;
  stroke-linecap: round;
  fill: none;
  z-index: 2;
}

/* The screenshot "card": bleeds off the bottom right of the panel */
.work-card__shot {
  position: absolute;
  top: 16%;
  left: 14%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--warm-white);
  box-shadow: var(--shadow-lg);
  transform: rotate(-3deg);
  transform-origin: top left;
  transition: transform 0.4s ease;
  z-index: 1;
}

.work-card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--shot-pos);
  transform: scale(var(--shot-zoom));
  transform-origin: var(--shot-pos);
  transition: none;
}
.work-card:hover .work-card__shot img { transform: scale(var(--shot-zoom)); }

.work-card:hover .work-card__shot { transform: rotate(-1deg); }

/* Tyl: image already has its own browser frame and shadow */
.work-card--tyl {
  --shot-pos: 0% 0%;
  --shot-zoom: 1.25;
}
.work-card--tyl .work-card__shot {
  background: none;
  box-shadow: none;
}

/* Construction: blurred, with a light navy wash so details are unreadable */
.work-card--construction {
  --shot-pos: 0% 0%;
  --shot-zoom: 1.05;
}
.work-card--construction .work-card__shot img { filter: blur(3px); }
.work-card--construction .work-card__shot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--navy);
  opacity: 0.18;
}

/* Smoothwall: sliver of sidebar, concern panel + top rows; mobile view cropped out */
.work-card--smoothwall {
  --shot-pos: 25% 0%;
  --shot-zoom: 1.25;
}

/* Protected pill */
.work-card__pill {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 500;
  line-height: 1.6;
}
.work-card__pill svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* Text */
.work-card__body {
  padding: var(--space-md) var(--space-sm) var(--space-sm);
}

.work-card__tag {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: var(--space-xs);
}

.work-card__title {
  font-family: var(--font-serif);
  font-size: var(--text-h4);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.2px;
  color: var(--navy);
  margin-bottom: var(--space-xs);
}

.work-card__arrow {
  display: inline-block;
  font-family: var(--font-sans);
  transition: transform 0.3s ease;
}
.work-card:hover .work-card__arrow { transform: translateX(4px); }

.work-card__desc {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--navy);
  margin: 0;
}

@media (min-width: 901px) {
  .work-card__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-card.reveal,
  .work-card__shot,
  .work-card__arrow { transition: none; }
  .work-card:hover { translate: none; }
  .work-card:hover .work-card__shot { transform: rotate(-3deg); }
  .work-card:hover .work-card__arrow { transform: none; }
}

/* ── HOW I WORK ── */
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.how-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.how-card-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.125rem;
  color: #FFFFFF;
  line-height: 1.3;
  margin-bottom: 10px;
}

/* ── BUTTON ALIAS ── */
.btn--coral {
  background: var(--coral);
  color: var(--cream);
}

.btn--coral:hover {
  background: var(--navy);
  transform: translateY(-2px);
}

/* ── CONTACT / FOOTER ── */
.contact {
  background: var(--cream);
  text-align: center;
}

.contact__inner {
  max-width: 700px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.contact__headline {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.footer {
  margin-top: clamp(60px, 8vw, 100px);
  padding-top: 2rem;
  border-top: 1px solid rgba(28, 43, 74, 0.12);
  text-align: center;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--text-small);
  color: var(--navy);
  opacity: 0.6;
  letter-spacing: 0.03em;
}

/* ── CORAL ITALIC ── */
.coral-italic {
  font-style: italic;
  color: var(--coral);
  font-family: var(--font-serif);
}

/* ── SCROLL REVEAL COMPAT ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
  transition-delay: var(--delay, 0s);
}

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

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .work__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .how-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .nav__links { gap: 1.2rem; }
  .nav__links li:not(:last-child) { display: none; }

  .about__grid {
    grid-template-columns: 1fr;
  }
  .about__image-wrap {
    height: clamp(300px, 70vw, 440px);
    order: -1;
  }
  .about__badge {
    bottom: -0.75rem;
    right: 0.5rem;
  }

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

  .logo-strip__logo {
    max-height: 30px;
    max-width: 104px;
  }
}

@media (max-width: 480px) {
  .hero__headline { font-size: 2.2rem; }
  .about__headline { font-size: 1.6rem; }
}

/* ── EMAIL COPY (backup for visitors without a mail app) ── */
.email-copy {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: var(--navy-75);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
}
.email-copy__address { color: var(--navy); font-weight: 500; }
.email-copy__btn {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.email-copy__btn:hover { color: var(--navy); }
.email-copy__status { color: var(--navy-60); }
