/* ==========================================================================
   Tommaso Pardini — Mare Fecunditatis
   Mobile-first CSS. Breakpoints: 768px (tablet), 1024px (desktop).
   Figma reference: 1728px desktop.
   ========================================================================== */

/* --- Design Tokens -------------------------------------------------------- */
:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-gray: #8c8c8c;
  --color-line: #1a1a1a;
  --color-line-mid: #dcdcdc;
  --color-accent: #f5e000;

  /* Mobile spacing (scaled down) */
  --sp-2xs: 4px;
  --sp-xs: 6px;
  --sp-sm: 8px;
  --sp-m: 12px;
  --sp-l: 16px;
  --sp-l2: 20px;
  --sp-xl: 24px;
  --sp-2xl: 32px;
  --sp-3xl: 40px;
  --sp-4xl: 48px;
  --sp-5xl: 64px;
  --sp-6xl: 80px;
  --sp-7xl: 80px;
  --sp-8xl: 100px;

  --page-pad: 20px;
  --grid-gap: 32px;
}

@media (min-width: 768px) {
  :root {
    --sp-2xs: 6px;
    --sp-xs: 8px;
    --sp-sm: 12px;
    --sp-m: 16px;
    --sp-l: 24px;
    --sp-l2: 28px;
    --sp-xl: 32px;
    --sp-2xl: 48px;
    --sp-3xl: 64px;
    --sp-4xl: 80px;
    --sp-5xl: 120px;
    --sp-6xl: 160px;
    --sp-7xl: 180px;
    --sp-8xl: 220px;

    --page-pad: 36px;
    --grid-gap: 48px;
  }
}

@media (min-width: 1024px) {
  :root {
    --page-pad: 48px;
    --grid-gap: 48px;
  }
}

/* --- Reset / Base --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "neue-haas-grotesk-display-pro", sans-serif;
  font-weight: 450;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.56px;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
ul,
ol {
  list-style: none;
}

/* --- Typography ----------------------------------------------------------- */
.t-brand {
  font-family: "new-science", sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.65px;
  line-height: 1;
  text-transform: uppercase;
}

.t-nav {
  font-family: "ocr-a-std", monospace;
  font-weight: 400;
  font-size: 11px;
  line-height: 1;
  color: var(--color-gray);
}

.t-project {
  font-family: "baskerville-urw", serif;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 2px;
  line-height: 1;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .t-project {
    font-size: 16px;
    letter-spacing: 2.24px;
  }
}

.t-section {
  font-family: "new-science", sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1px;
  line-height: 1.3;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .t-section {
    font-size: 26px;
    letter-spacing: 1.3px;
  }
}

.t-vessel {
  font-family: "new-science", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  line-height: 1;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .t-vessel {
    font-size: 16px;
    letter-spacing: 2.24px;
  }
}

.t-highlight {
  font-family: "ocr-a-std", monospace;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.48px;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .t-highlight {
    font-size: 14px;
    letter-spacing: 0.56px;
  }
}

.t-body {
  font-family: "neue-haas-grotesk-display-pro", sans-serif;
  font-weight: 450;
  font-size: 14px;
  letter-spacing: 0.56px;
  line-height: 1.6;
}

.t-statement {
  font-family: "baskerville-urw", serif;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.85px;
  line-height: 1.3;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .t-statement {
    font-size: 21px;
    letter-spacing: 1.05px;
  }
}

.t-caption {
  font-family: "ocr-a-std", monospace;
  font-weight: 400;
  font-size: 10px;
  line-height: 2;
}

.t-label {
  font-family: "OCR A Std", monospace;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 2px;
  line-height: 1;
  text-transform: uppercase;
}

.t-mono-sm {
  font-family: "ocr-a-std", monospace;
  font-weight: 400;
  font-size: 11px;
  line-height: 1;
}

/* --- Layout --------------------------------------------------------------- */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  margin: 0 auto;
}

/* --- Nav ------------------------------------------------------------------ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-l) var(--page-pad);
}

@media (min-width: 768px) {
  .nav {
    padding: var(--sp-2xl) var(--page-pad) var(--sp-l);
  }
}

.nav__links {
  display: flex;
  gap: var(--sp-xl);
}

@media (min-width: 768px) {
  .nav__links {
    gap: var(--sp-2xl);
  }
}

.nav__links a {
  transition: color 0.2s;
}
.nav__links a:hover {
  color: var(--color-text);
}

/* --- Hero ----------------------------------------------------------------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5xl) var(--page-pad) var(--sp-3xl);
  margin-inline: calc();
}

@media (min-width: 768px) {
  .hero {
    padding: var(--sp-5xl) var(--page-pad) var(--sp-4xl);
  }
}

/* --- Hero Image ----------------------------------------------------------- */
.hero-image {
  width: 100%;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 5;
}

@media (min-width: 768px) {
  .hero-image {
    aspect-ratio: auto;
    height: clamp(400px, 45.5vw, 900px);
  }
}

.hero-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% + 50vh);
  object-fit: cover;
  object-position: top center;
  will-change: transform;
}

/* --- Hero Carousel (Swiper) ---------------------------------------------- */
.hero-carousel {
  width: 100%;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

@media (min-width: 768px) {
  .hero-carousel {
    aspect-ratio: auto;
    height: clamp(400px, 45.5vw, 900px);
  }
}

.hero-carousel .swiper {
  width: 100%;
  height: 100%;
}

.hero-carousel .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* --- Intro (2-column section) --------------------------------------------- */
.intro {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
  padding: var(--sp-5xl) var(--page-pad) var(--sp-6xl);
}

@media (min-width: 1024px) {
  .intro {
    flex-direction: row;
    gap: var(--grid-gap);
    align-items: flex-end;
    padding: var(--sp-7xl) var(--page-pad) var(--sp-8xl);
  }

  .intro--reversed {
    flex-direction: row-reverse;
  }
}

.intro--reversed .intro__body {
  text-align: left;
}

@media (min-width: 1024px) {
  .intro--reversed .intro__body {
    text-align: right;
  }

  .intro--reversed .intro__highlight {
    justify-content: flex-end;
  }
}

.intro__title-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-l2);
}

@media (min-width: 1024px) {
  .intro__title-col {
    width: 380px;
    flex-shrink: 0;
  }
}

.intro__title-col--right {
  align-items: flex-start;
  text-align: left;
}

@media (min-width: 1024px) {
  .intro__title-col--right {
    align-items: flex-end;
    text-align: right;
  }
}

.intro__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-l);
}

.intro__highlight {
  display: flex;
  align-items: center;
  padding: var(--sp-xs) 0;
}

@media (min-width: 768px) {
  .intro__highlight {
    padding: var(--sp-xs) 0 var(--sp-xs) 0;
  }
}

.intro__highlight .slash {
  color: var(--color-text);
}
.intro__highlight .spacer {
  color: var(--color-accent);
  white-space: pre;
}

.line {
  height: 1px;
  width: 100%;
  background: var(--color-line);
}

.line--mid {
  background: var(--color-line-mid);
}

/* --- Collection ----------------------------------------------------------- */
.collection {
  padding: var(--sp-4xl) var(--page-pad) var(--sp-5xl);
}

@media (min-width: 768px) {
  .collection {
    padding: var(--sp-4xl) var(--page-pad) var(--sp-6xl);
  }
}

.collection__inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xl);
}

@media (min-width: 1024px) {
  .collection__inner {
    flex-direction: row;
    gap: var(--grid-gap);
    align-items: stretch;
  }
}

.collection__header {
  display: flex;
  flex-direction: column;
  gap: var(--sp-l2);
}

@media (min-width: 1024px) {
  .collection__header {
    width: clamp(160px, 20vw, 380px);
    flex-shrink: 0;
    justify-content: flex-end;
  }
}

.collection__list {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-l);
}

/* --- Vessel item (collapsible) -------------------------------------------- */
.vessel__header {
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: var(--sp-xl);
  padding-bottom: var(--sp-l);
}

@media (min-width: 768px) {
  .vessel__header {
    gap: 69px;
  }
}

.vessel__number {
  font-family: "ocr-a-std", monospace;
  font-size: 11px;
  flex-shrink: 0;
  width: 20px;
  position: relative;
  top: 0.5px;
}

.vessel__name {
  font-family: "new-science", sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.65px;
  text-transform: uppercase;
  flex: 1;
  min-width: 0;
}

.vessel__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .vessel__icon {
    width: 32px;
    height: 32px;
  }
}

.vessel.is-open .vessel__icon {
  transform: rotate(90deg);
}

.vessel__line {
  height: 1px;
  background: var(--color-line-mid);
}

/* Vessel expanded content */
.vessel__content {
  height: 0;
  overflow: hidden;
  transition: height 0.65s cubic-bezier(0.64, 0.37, 0.37, 0.94);
}

.vessel__detail {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
  padding: var(--sp-l) 0 var(--sp-2xl);
}

@media (min-width: 1024px) {
  .vessel__detail {
    flex-direction: row;
    justify-content: space-between;
    gap: var(--grid-gap);
  }
}

/* Vessel images — mobile: horizontal scroll, desktop: Figma layout */
.vessel__images {
  display: flex;
  gap: var(--sp-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

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

@media (min-width: 1024px) {
  .vessel__images {
    overflow: visible;
    scroll-snap-type: none;
    flex-shrink: 0;
  }
}

.vessel__main-image {
  width: 75vw;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  flex-shrink: 0;
  scroll-snap-align: start;
  border-radius: 2px;
}

@media (min-width: 1024px) {
  .vessel__main-image {
    max-width: none;
    width: clamp(160px, 28vw, 380px);
  }
}

.vessel__thumbs {
  display: flex;
  flex-direction: row;
  gap: var(--sp-sm);
}

@media (min-width: 1024px) {
  .vessel__thumbs {
    flex-direction: column;
    align-self: stretch;
  }
}

.vessel__thumb {
  width: 75vw;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  flex-shrink: 0;
  scroll-snap-align: start;
  border-radius: 2px;
}

@media (min-width: 1024px) {
  .vessel__thumb {
    width: 120px;
    aspect-ratio: 4 / 5;
    max-width: none;
    flex-shrink: 0;
    cursor: pointer;
  }
}

.vessel__info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

@media (min-width: 1024px) {
  .vessel__info {
    max-width: 500px;
    flex: 1;
  }
}

.vessel__main-image.is-fading,
.vessel__thumb.is-fading {
  animation: fadeWhite 0.5s ease;
}

.vessel__thumb--placeholder {
  display: none;
  background: #ffffff;
  border-radius: 2px;
  cursor: default;
}

@media (min-width: 1024px) {
  .vessel__thumb--placeholder {
    display: block;
  }
}

@keyframes fadeWhite {
  0% {
    opacity: 1;
  }
  40% {
    opacity: 0;
  }
  60% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* --- Statement ------------------------------------------------------------ */
.statement {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5xl) var(--page-pad) var(--sp-6xl);
  text-align: center;
}

@media (min-width: 768px) {
  .statement {
    padding: 100px var(--sp-5xl) var(--sp-7xl);
  }
}

.statement__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-text);
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .statement__dot {
    margin-bottom: 31px;
  }
}

.statement__text {
  max-width: 656px;
}

/* --- Footer --------------------------------------------------------------- */
.footer {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
  padding: var(--sp-l) var(--page-pad);
  border-top: 1px solid var(--color-line-mid);
  margin-top: auto;
  line-height: 1.6;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xs);
}

@media (min-width: 1024px) {
  .footer {
    position: relative;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }

  .footer__phrase {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .footer__links {
    flex-direction: row;
    gap: var(--sp-l);
    align-items: center;
  }
}

/* --- About page ----------------------------------------------------------- */
.about-hero {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xl);
  padding: var(--sp-2xl) var(--page-pad) var(--sp-3xl);
}

@media (min-width: 1024px) {
  .about-hero {
    flex-direction: row;
    gap: var(--sp-3xl);
    padding: var(--sp-4xl) var(--page-pad);
  }
}

.about-hero__portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

@media (min-width: 1024px) {
  .about-hero__portrait {
    width: 40%;
    max-width: 480px;
    aspect-ratio: auto;
    height: auto;
    max-height: 640px;
    flex-shrink: 0;
  }
}

.about-hero__bio {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-l);
  margin-bottom: var(--sp-4xl);
}

@media (min-width: 1024px) {
  .about-hero__bio {
    padding-top: var(--sp-l);
    margin-bottom: 0;
  }
}

.about-hero__contact {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xs);
  padding-top: var(--sp-xs);
  line-height: 1.6;
}

/* Exhibitions list */
.exhibitions {
  padding: var(--sp-3xl) var(--page-pad) var(--sp-5xl);
}

@media (min-width: 768px) {
  .exhibitions {
    padding: var(--sp-4xl) var(--page-pad) var(--sp-6xl);
  }
}

.exhibitions__header {
  padding-bottom: var(--sp-l);
}

.exhibition {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: var(--sp-xs) var(--sp-l);
  padding: var(--sp-m) 0;
  border-top: 1px solid var(--color-line-mid);
  align-items: baseline;
}

.exhibition:last-child {
  border-bottom: 1px solid var(--color-line-mid);
}

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

.exhibition__title {
  grid-row: 1;
  grid-column: 2;
}

.exhibition__meta {
  grid-row: 2;
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2xl);
  color: var(--color-gray);
}

@media (min-width: 1024px) {
  .exhibition {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
  }

  .exhibition__meta {
    grid-row: 1;
    grid-column: 3;
    justify-content: flex-end;
  }
}
