﻿:root {
  --wrap: 1140px;
}

/* Shared reset and base typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}

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

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

p {
  margin: 0;
}

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

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 6px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* Shared header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}

.site-header.is-stuck {
  box-shadow: 0 10px 24px rgba(26, 26, 26, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.logo__mark {
  display: block;
  width: 40px;
  height: auto;
  flex: none;
}

.site-footer .logo__mark {
  filter: var(--logo-mark-footer, var(--logo-mark, none));
}

.logo__name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav a {
  position: relative;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a:hover::after,
.nav a:focus-visible::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.btn-contact {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.btn-contact:hover,
.btn-contact:focus-visible {
  background: var(--green-dark);
}

.nav-toggle {
  display: none;
  flex: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Shared page hero */
.hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}

.hero__title {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(3rem, 9vw, 10rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.hero__title__page {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(3rem, 7vw, 10rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}


.hero--article .hero__title {
  max-width: none;
  font-size: clamp(2.25rem, 5vw, 5rem);
  line-height: 1.05;
}

.hero--article-image .hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.8fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero__image {
  display: block;
  width: 100%;
  max-height: 340px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
}

.hero__subtitle {
  margin-top: 22px;
  max-width: 56ch;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--muted);
}

.hero--mobilitat {
  position: relative;
  display: flex;
  padding: 0;
  overflow: hidden;
}

.hero--mobilitat .hero__inner {
  position: relative;
  display: flex;
  align-items: center;
}

.hero--mobilitat .hero__copy {
  position: relative;
  z-index: 2;
  width: min(74%, 820px);
  padding: 64px 0;
}

.hero--mobilitat .hero__title {
  max-width: none;
}

.hero__bike {
  position: absolute;
  z-index: 1;
  top: -57px;
  right: -110px;
  width: clamp(400px, 48vw, 500px);
  aspect-ratio: 1;
  pointer-events: none;
}

.hero__bike img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  opacity: 0.8;
}

.hero__bike::after {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.42);
  content: "";
}

/* Prototype-specific layout primitives */
.section {
  padding: clamp(56px, 9vw, 100px) 0;
  border-bottom: 1px solid var(--line);
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 5vw, 48px);
}

.section__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(28px, 6vw, 80px);
}

.intro__body {
  display: grid;
  gap: 16px;
  color: var(--muted);
}

/* Prototype-specific objectives and achievements */
.grid-objectives {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
}

.objective__icon {
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  color: var(--green);
}

.objective__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.objective__text {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 34px) clamp(28px, 5vw, 64px);
}

.work__item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.work__num {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1;
  color: var(--green);
}

.work__text {
  font-size: 0.95rem;
  color: var(--muted);
}

.work__text b {
  color: var(--ink);
  font-weight: 600;
}

.achievements {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.8fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.mini-title {
  margin: 0 0 22px;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--green);
  text-transform: uppercase;
}

.rich-list {
  display: grid;
  gap: 14px;
}

.rich-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.95rem;
  color: var(--muted);
}

.rich-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--green);
}

.rich-list b {
  color: var(--ink);
  font-weight: 600;
}

.achievements__panel {
  background: var(--green-dark);
  color: #fff;
  padding: clamp(24px, 3vw, 32px);
  border-radius: 10px;
}

.achievements__panel .mini-title {
  color: #fff;
}

.achievements__panel .rich-list li {
  color: #fff;
}

.achievements__panel .rich-list li::before {
  background: #fff;
}

/* Prototype-specific gallery and lightbox */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.gallery__item {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery__item:hover,
.gallery__item:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(26, 26, 26, 0.16);
}

body.has-lightbox {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 40px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 24, 0.92);
}

.lightbox__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.lightbox__frame {
  position: relative;
  width: 100%;
}

.lightbox__image {
  width: 100%;
  height: min(76vh, 780px);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__close {
  top: 0;
  right: 0;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 0;
}

.lightbox__nav--next {
  right: 0;
}

.lightbox__close:hover,
.lightbox__close:focus-visible,
.lightbox__nav:hover,
.lightbox__nav:focus-visible {
  background: var(--green);
  color: #fff;
}

.lightbox__counter {
  color: rgba(247, 245, 240, 0.7);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

/* Prototype-specific contact and news panels */
.cta {
  background: var(--green);
  border-bottom: 1px solid var(--line);
}

.cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(40px, 6vw, 64px) 0;
  color: white;
}

.cta__copy {
  display: grid;
  gap: 14px;
  color: white;
}

.cta__text {
  color: var(--muted);
  font-size: 0.95rem;
  color: white;
}

.cta__contact {
  display: grid;
  gap: 16px;
  justify-items: start;
  color: white;
}

.cta__item {
  display: grid;
  gap: 4px;
  color: white;
}

.cta__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--green);
  color: white;
  text-transform: uppercase;
}

.cta__item a {
  display: inline-flex;
  align-items: center;
  color: white;
  gap: 10px;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.cta__item a:hover,
.cta__item a:focus-visible {
  color: white;
}

.cta__item svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: white;
}

.news {
  display: grid;
  grid-template-columns: 32% minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.news__media {
  min-height: 240px;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
}

.news__body {
  display: grid;
  gap: 10px;
}

.news__title {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.news__date {
  font-size: 0.82rem;
  color: var(--muted);
}

.news__excerpt {
  color: var(--muted);
  font-size: 0.95rem;
}

.news__link {
  margin-top: 6px;
  justify-self: start;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: border-color 0.2s ease;
}

.news__link:hover,
.news__link:focus-visible {
  border-color: var(--green);
}

/* Shared footer base */
.site-footer {
  background: var(--green-dark);
  color: #f7f5f0;
  padding: clamp(40px, 6vw, 64px) 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

.footer-nav a {
  font-size: 0.82rem;
  color: rgba(247, 245, 240, 0.75);
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #fff;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(247, 245, 240, 0.65);
}

/* Responsive prototype layout */
@media (max-width: 1000px) {
  .nav {
    gap: 16px;
  }

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero--mobilitat .hero__copy {
    width: 100%;
    padding: 56px 0;
  }

  .hero--mobilitat .hero__title {
    font-size: clamp(3.5rem, 10vw, 6rem);
  }

  .hero--mobilitat .hero__bike {
    display: none;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(26, 26, 26, 0.08);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.3s ease, visibility 0.3s ease;
  }

  .nav.is-open {
    max-height: 420px;
    visibility: visible;
  }

  .nav a {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav a::after {
    display: none;
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .hero__title {
    max-width: none;
  }

  .hero--article-image .hero__inner {
    grid-template-columns: 1fr;
  }

  .intro__grid,
  .work__grid,
  .achievements,
  .news,
  .cta__inner {
    grid-template-columns: 1fr;
  }

  .cta__inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .news__media {
    min-height: 220px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 20px;
  }

  .footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .grid-objectives {
    grid-template-columns: 1fr;
  }

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

  .btn-contact {
    display: none;
  }

  .section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}