/* ============================================================
   SILURA GROUP — style.css
   Adjust the variables in :root to retheme the entire site.
   All colours, fonts, and sizes live here as single-line edits.
   ============================================================ */

:root {
  /* --- Colours ------------------------------------------- */
  --color-bg:           #ffffff;           /* Page background */
  --color-text:         #071722;           /* Primary text: dark navy */
  --color-gold:         #c7954a;           /* Accent / decorative underline */
  --color-caption:      #071722;           /* Vessel caption text */
  --color-footer-text:  #071722;           /* Footer text */
  --color-footer-border:rgba(7,23,34,0.18);/* Thin rule above footer */

  /* --- Typography ----------------------------------------- */
  --font-family:        'Inter', Helvetica, Arial, sans-serif;
  --weight-light:       300;
  --weight-normal:      400;

  /* --- Wordmark ------------------------------------------- */
  /* "silura" font size: scales with viewport, min 64px, max 110px */
  --wordmark-size:      clamp(64px, 9.5vw, 110px);
  /* "GROUP" font size: ~38% of silura */
  --wordmark-sub-size:  clamp(24px, 3.6vw, 42px);
  /* Silura letter-spacing: slightly tighter than default */
  --wordmark-ls:        -0.03em;
  /* GROUP letter-spacing: wide-spaced uppercase */
  --wordmark-sub-ls:    0.35em;

  /* --- Layout --------------------------------------------- */
  --max-width:          1200px;
  --page-pad:           clamp(20px, 4vw, 48px);
  --vessel-gap:         clamp(16px, 2vw, 24px);
  /* Tight vertical rhythm so layout fits in a 16:9 viewport */
  --section-gap:        clamp(16px, 2.5vh, 36px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-weight: var(--weight-light);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============================================================
   HERO — WORDMARK
   ============================================================ */

.hero {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--section-gap) var(--page-pad) calc(var(--section-gap) * 0.65);
  flex-shrink: 0;
}

.wordmark-img {
  height: clamp(100px, 14vh, 180px);
  width: auto;
  display: block;
}

/* Container sizes to its widest child ("silura") so the
   underline and GROUP align within the silura text block */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

/* "silura" — lowercase, tight tracking, light weight */
.wordmark__silura {
  display: block;
  font-size: var(--wordmark-size);
  font-weight: var(--weight-light);
  letter-spacing: var(--wordmark-ls);
  line-height: 1;
  color: var(--color-text);
}

/* Gold decorative rule — spans the full "silura" width */
.wordmark__line {
  width: 100%;
  height: 2px;
  background-color: var(--color-gold);
  margin-top: 10px;
  margin-bottom: 12px;
}

/* "GROUP" — spaced uppercase, same light weight */
.wordmark__sub {
  display: block;
  font-size: var(--wordmark-sub-size);
  font-weight: var(--weight-light);
  letter-spacing: var(--wordmark-sub-ls);
  line-height: 1;
  color: var(--color-text);
  text-transform: uppercase;
  /* Compensate for letter-spacing adding trailing space on right */
  margin-right: calc(var(--wordmark-sub-ls) * -1);
}

/* ============================================================
   VESSEL IMAGES — clickable anchor blocks
   ============================================================ */

.vessels {
  width: 100%;
  max-width: var(--max-width);
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
  padding-bottom: clamp(12px, 1.5vh, 24px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--vessel-gap);
}

/* Vessel is an <a> — strip link defaults, contain the hover scale */
.vessel {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  cursor: pointer;
}

.vessel img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity 0.3s ease, transform 0.35s ease;
}

/* Subtle lift on hover — opacity dimming + very slight zoom */
.vessel:hover img,
.vessel:focus-visible img {
  opacity: 0.88;
  transform: scale(1.03);
}

/* Caption: small spaced uppercase, matches brand nav style */
.vessel__caption {
  flex-shrink: 0;
  margin-top: 12px;
  font-size: clamp(10px, 1vw, 12px);
  font-weight: var(--weight-normal);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-caption);
  transition: opacity 0.3s ease;
}

.vessel:hover .vessel__caption,
.vessel:focus-visible .vessel__caption {
  opacity: 0.6;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  width: 100%;
  max-width: var(--max-width);
  padding: clamp(14px, 2vh, 28px) var(--page-pad) clamp(18px, 2.5vh, 36px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: clamp(10px, 1vw, 12px);
  font-weight: var(--weight-normal);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-top: 1px solid var(--color-footer-border);
  flex-shrink: 0;
}

.footer__email {
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__email:hover,
.footer__email:focus-visible {
  color: var(--color-gold);
  outline: none;
}

.footer__copy {
  color: var(--color-footer-text);
}

/* ============================================================
   DESKTOP: lock entire page to viewport height (fits 16:9+)
   Images flex-fill the remaining height — no fixed aspect ratio.
   ============================================================ */

@media (min-width: 481px) {
  html, body {
    height: 100dvh;
    overflow: hidden;
  }

  .vessels {
    flex: 1;
    min-height: 0;
    /* Single grid row stretches to fill all available height */
    grid-template-rows: 1fr;
  }

  .vessel {
    min-height: 0;
  }

  /* Remove square constraint — images fill remaining vertical space.
     height: 0 + flex: 1 + min-height: 0 is the reliable flex-fill trick. */
  .vessel img {
    aspect-ratio: unset;
    flex: 1;
    min-height: 0;
    height: 0;
  }
}

/* ============================================================
   RESPONSIVE — Tablet (≤720px)
   ============================================================ */

@media (max-width: 720px) {
  .vessel__caption {
    font-size: 10px;
    letter-spacing: 0.14em;
  }
}

/* ============================================================
   RESPONSIVE — Mobile (≤480px)
   Restore scroll, stack vessels vertically, square images.
   ============================================================ */

@media (max-width: 480px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  .vessels {
    flex: none;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding-bottom: clamp(28px, 5vh, 48px);
  }

  .vessel {
    min-height: auto;
  }

  /* Restore square aspect ratio for stacked mobile view */
  .vessel img {
    flex: none;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .footer {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}
