/* ================================================
   DISARM — Reusable Components
   Header, navigation, section bars, project cards,
   brand logos, footer
   ================================================ */

/* ============================================
   SITE HEADER / NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
  padding: 40px var(--container-padding) 28px;
  transition: background-color var(--transition-base),
              box-shadow var(--transition-base);
}

.site-header.is-scrolled {
  background-color: transparent;
  box-shadow: none;
}

/* Desktop: the header is a transparent strip over the content, so only its
   logo and links take clicks — anything showing through stays clickable.
   (Mobile gives the header a solid backing; see css/mobile.css.) */
@media (min-width: 961px) {
  .site-header { pointer-events: none; }
  .header-brand,
  .header-nav,
  .nav-toggle { pointer-events: auto; }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin-inline: auto;
  height: auto;
}

/* ---- Brand (logo + text) ---- */
.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-logo-icon {
  width: 42px;
  height: auto;
  flex-shrink: 0;
}

.header-brand-text {
  font-family: var(--font-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ---- Nav Links ---- */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-right: 4vw;
}

.nav-link {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--weight-thin);
  color: var(--color-nav-idle);
  transition: color var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.nav-link:hover {
  color: var(--color-nav-idle-hover);
}

.nav-link.active {
  color: var(--color-4);
  font-weight: var(--weight-medium);
}

/* Views not built yet: visible, but inert (no hover, no click) */
.nav-link.is-disabled {
  pointer-events: none;
  cursor: default;
}

.nav-separator {
  color: var(--color-text-muted);
  font-size: var(--text-small);
  user-select: none;
}

.slash {
  display: inline-block;
  transform: skewX(-20deg);
  color: var(--color-4);
  margin-right: 4px;
}

/* ---- Mobile Hamburger Toggle ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 4px;
  width: 32px;
  height: 32px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-6);
  border-radius: 1px;
  transition: transform var(--transition-base),
              opacity var(--transition-base);
  transform-origin: center;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ============================================
   SECTION BAR (top bar in about / experience)
   ============================================ */
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: var(--space-3xl);
}

.section-bar__left {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.section-bar__icon {
  width: 18px;
  height: auto;
}

.section-bar__text {
  font-family: var(--font-primary);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.section-bar__page {
  font-family: var(--font-primary);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
}


/* ============================================
   TITLE SLASH — decorative "/" before headings
   ============================================ */
.title-slash {
  display: inline-block;
  color: var(--color-accent);
  margin-right: var(--space-xs);
  font-weight: var(--weight-light);
}


/* ============================================
   PROJECT CARD
   ============================================ */
.project-card {
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg-card);
  border-radius: var(--radius-sm);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow),
              filter var(--transition-slow);
}

.project-card:hover img {
  transform: scale(1.05);
}

/* Subtle overlay on hover — prepared for Phase 2 link/info */
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13, 20, 28, 0.4) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.project-card:hover::after {
  opacity: 1;
}


/* ============================================
   BRAND / CLIENT LOGO ITEM
   ============================================ */
.brand-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  opacity: 0.65;
  transition: opacity var(--transition-fast);
}

.brand-item:hover {
  opacity: 1;
}

.brand-item img {
  width: 100%;
  max-width: 75px;
  height: auto;
  /* Make dark SVGs visible on dark backgrounds */
  filter: brightness(0) invert(1);
}


/* ============================================
   SITE FOOTER
   ============================================ */
.site-footer {
  position: relative;
  background-color: transparent; /* Changed for the sliding cyan background */
  overflow: hidden;
  display: flex;
  min-height: 280px;
  margin-top: 0;
}

.footer-bg-cyan {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4efce0; /* Bright cyan from the design */
  z-index: 0;
  overflow: hidden;
}

.footer-bg-left {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 25%;
  background-color: #17212b; /* Dark navy */
  clip-path: polygon(0 0, 100% 0, 65% 100%, 0 100%);
  z-index: 2;
}

.footer-marquee-container {
  position: absolute;
  top: 0px;
  left: 0;
  width: 100%;
  overflow: hidden;
  z-index: 1;
}

.footer-marquee {
  display: flex;
  gap: 40px;
  width: fit-content;
}

.footer-inner-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 40px var(--container-padding);
  display: flex;
  flex-direction: column;
  margin-top: 120px; /* Space for the marquee behind it */
  pointer-events: none; /* So it doesn't block clicking things behind, though everything interactive is here */
}

.footer-bottom {
  pointer-events: auto;
}

.footer-huge-text {
  font-family: var(--font-callout);
  font-size: clamp(40px, 8vw, 120px);
  font-weight: 700;
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px #0d141c;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.footer-bottom {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  align-items: start;
}

.footer-col--logo {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.footer-logo {
  width: 40px;
  height: auto;
  filter: brightness(0); /* Make black */
}

.footer-col-title {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: var(--weight-bold);
  color: #0d141c;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-list li,
.footer-list a {
  font-family: var(--font-primary);
  font-size: 12px;
  color: #0d141c;
  text-decoration: none;
  font-weight: var(--weight-regular);
}

.footer-indent {
  margin-left: 20px;
}

.footer-icon {
  stroke: #0d141c;
  width: 12px;
  height: 12px;
}

.footer-back-to-top {
  display: flex;
  justify-content: flex-end;
  height: 100%;
}

/* Phone-only "back to top" link inside the footer (shown by css/mobile.css) */
.footer-top-mobile {
  display: none;
}

.back-to-top-btn {
  display: flex;
  align-items: flex-end; /* Alinear texto al fondo de la barra */
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.btt-icon-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 2px; /* Para alinear visualmente mejor con la base del texto */
}

.btt-shape {
  width: 12px;
  height: 74px; /* a touch taller per client ref */
  background-color: #0d141c;
  transform: skewY(45deg);
}

.btt-lines {
  width: 12px;
  height: 12px;
  background-image: repeating-linear-gradient(
    to bottom,
    #0d141c 0px,
    #0d141c 2px,
    transparent 2px,
    transparent 4px
  );
  transform: skewY(45deg);
}

.back-to-top-btn span {
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: var(--weight-bold);
  color: #0d141c;
  letter-spacing: 0.15em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}


/* ============================================
   RESPONSIVE — COMPONENTS
   ============================================ */
@media (max-width: 768px) {
  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(26, 37, 50, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-3xl) var(--space-xl);
    gap: var(--space-lg);
    transition: right var(--transition-base);
  }

  .header-nav.is-open {
    right: 0;
  }

  .nav-separator {
    display: none;
  }

  .nav-link {
    font-size: var(--text-body);
  }

  .header-brand-text {
    display: none;
  }

  /* Footer responsiveness */
  .footer-bottom {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-col--logo {
    justify-content: flex-start;
  }
  
  .footer-huge-text {
    margin-left: 0;
  }
  
  .footer-back-to-top {
    justify-content: flex-start;
    height: auto;
    margin-top: 20px;
  }
  
  .back-to-top-btn {
    writing-mode: horizontal-tb;
    transform: none;
    flex-direction: row-reverse;
  }
  
  .btt-shape {
    transform: rotate(90deg);
  }
}

/* ============================================
   PAGE PROGRESS INDICATOR
   ============================================ */
.page-progress {
  position: fixed;
  right: calc(var(--container-padding) + 35px);
  bottom: 15%;
  z-index: var(--z-header);
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.progress-step {
  position: relative;
  width: 45px;
  height: 2px;
  cursor: pointer; /* click jumps to that section (see js/main.js, js/projects.js) */
}

/* The step itself is only 2px tall — give it a real click target that spans
   the slant, the tick and the number, and tiles exactly with its neighbours
   (24px gap + 2px step = 26px pitch). */
.progress-step::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  width: 64px;
  height: 26px;
}

.progress-step:hover .progress-slant {
  background-color: var(--color-4);
}
.page-progress.is-over-mint .progress-step:hover .progress-slant {
  background-color: #0d141c;
}

.progress-slant {
  position: absolute;
  top: -5px;
  left: 0;
  width: 20px;
  height: 3px;
  background-color: var(--color-text-muted);
  transform: skewY(45deg);
  transform-origin: 0 0;
  transition: background-color 0.4s var(--ease-out);
}

.progress-slant-cyan {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 1px;
  background-color: var(--color-4);
  transform: skewY(45deg);
  transform-origin: 0 0;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.progress-step.is-active .progress-slant-cyan {
  opacity: 1;
}

.progress-step.is-active .progress-slant,
.progress-step.is-past .progress-slant {
  background-color: var(--color-4);
}

.progress-horiz {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 0px;
  height: 1px;
  background-color: var(--color-4);
  opacity: 0;
  transition: width 0.4s var(--ease-out) 0.1s, opacity 0.4s var(--ease-out) 0.1s;
}

.progress-step.is-active .progress-horiz {
  opacity: 1;
  width: 32px;
}

.progress-num {
  position: absolute;
  top: 7px;
  left: 30px;
  font-family: var(--font-secondary);
  font-size: 10px;
  font-weight: var(--weight-medium);
  color: var(--color-4);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s var(--ease-out) 0.3s;
  white-space: nowrap;
}

.progress-step.is-active .progress-num {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   OVER A LIGHT PANEL  (.is-over-mint)
   The #about section slides a mint panel under the right-edge
   rail. js/main.js flags it and we flip every lit part to dark
   ink so the rail stays readable — same trick the projects page
   uses over its mint panels.
   ============================================ */
.page-progress.is-over-mint .progress-slant {
  background-color: rgba(13, 20, 28, 0.3);
}
.page-progress.is-over-mint .progress-step.is-active .progress-slant,
.page-progress.is-over-mint .progress-step.is-past .progress-slant,
.page-progress.is-over-mint .progress-step.is-active .progress-slant-cyan,
.page-progress.is-over-mint .progress-step.is-active .progress-horiz {
  background-color: #0d141c;
}
.page-progress.is-over-mint .progress-step.is-active .progress-num {
  color: #0d141c;
}

/* ---- Last step: "06" + LET'S TALK? tag ----
   The tag is a parallelogram whose bottom edge sits exactly on the
   .progress-horiz line (top 20px, 1px tall → bottom at 21px), and the line
   runs on underneath it, so line and tag read as one continuous shape. */
.progress-step--talk .progress-num {
  top: calc(21px - var(--talk-h));
  height: var(--talk-h);
  display: flex;
  align-items: center;
  --talk-h: 13px;
}

.progress-step--talk.is-active .progress-horiz {
  width: 64px; /* reaches under the tag; the tag covers the overlap */
}

.progress-talk-text {
  display: block;
  height: var(--talk-h);
  line-height: var(--talk-h);
  margin-left: 7px;
  padding: 0 11px 0 7px;
  font-family: var(--font-primary);
  font-size: 8px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.18em;
  white-space: nowrap;
  background-color: var(--color-4);
  color: var(--color-bg);
  /* square left side, short slanted cut on the right */
  clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}
.page-progress.is-over-mint .progress-talk-text {
  background-color: #0d141c;
  color: var(--color-3);
}

/* Back to Top state in page-progress */
.page-progress.is-footer-active .progress-step {
  opacity: 0;
  pointer-events: none;
}

.progress-step {
  transition: opacity var(--transition-base);
}

.progress-back-to-top {
  position: absolute;
  /* The rail sits 15% above the viewport bottom; cancel that so the link's
     lower edge lands 40px above the bottom of the footer instead. */
  bottom: calc(40px - 15vh);
  right: 0;
  display: flex;
  align-items: flex-end;
  gap: 3px; /* pull the label tight against the bar */
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.page-progress.is-footer-active .progress-back-to-top {
  opacity: 1;
  pointer-events: auto;
}

.progress-back-to-top span {
  font-family: var(--font-primary);
  font-size: 8px;
  font-weight: var(--weight-bold);
  color: #0d141c;
  letter-spacing: 0.1em;
  line-height: 1; /* no extra cross-axis spacing in vertical text */
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
