/* ==========================================================================
   Landing page (index.html) — styles for this page only.
   Same type and colours as the versions: Hanken Grotesk, Brand Blue #1C479E,
   Navy #001F3E, Light Gray #F1F3F6 (see version01/style.css).

   1. Variables
   2. Base
   3. Layout (logo, intro, footer)
   4. Version cards
   5. Responsive + motion
   ========================================================================== */


/* 1. Variables
   ========================================================================== */
:root {
  --blue: #1C479E;          /* Brand Blue */
  --blue-dark: #153677;     /* hover */
  --navy: #001F3E;          /* headings, text */
  --ink-2: #3E4A5C;         /* intro text */
  --ink-3: #6A7484;         /* small print */
  --light: #F1F3F6;         /* page background */
  --line: #DCE1E8;          /* card borders, dividers */
  --white: #FFFFFF;

  --font: 'Hanken Grotesk', system-ui, sans-serif;

  --container: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 6px;
}


/* 2. Base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html,
body { margin: 0; padding: 0; }

html { overflow-x: clip; }

body {
  min-height: 100vh;
  background: var(--light);
  color: var(--navy);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

:where(ul[class]) { margin: 0; padding: 0; list-style: none; }


/* 3. Layout
   ========================================================================== */
.landing {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.landing__top,
.landing__main,
.landing__footer {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Sizes below use svh (screen height) so the whole page fits on one screen
   without scrolling; it only scrolls where it physically can't fit (very
   short / landscape phones). */

/* Top bar: logo, centered */
.landing__top {
  display: flex;
  justify-content: center;
  padding-top: clamp(16px, 3.5svh, 32px);
  padding-bottom: clamp(8px, 2svh, 16px);
}
.landing__logo { width: auto; height: clamp(36px, 5.5svh, 52px); }

/* Centered: intro text, then the cards as a centered group */
.landing__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;          /* title + cards centered in the space */
  padding-top: clamp(12px, 3svh, 40px);
  padding-bottom: clamp(16px, 4svh, 56px);
}

/* Intro */
.landing__intro { margin-bottom: clamp(16px, 4svh, 40px); text-align: center; }
.landing__title {
  margin: 0;
  font-size: clamp(30px, min(6vw, 7svh), 56px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.02em;
}
.landing__lead {
  max-width: 560px;
  margin: clamp(8px, 1.6svh, 16px) auto 0;
  color: var(--ink-2);
  font-size: clamp(14px, 2svh, 17px);
  line-height: 1.55;
  text-wrap: balance;
}

/* Footer */
.landing__footer {
  padding-bottom: clamp(12px, 3svh, 28px);
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.landing__footer::before {           /* divider, content width */
  content: "";
  display: block;
  height: 1px;
  margin-bottom: clamp(12px, 2.5svh, 24px);
  background: var(--line);
}


/* 4. Version cards
   --------------------------------------------------------------------------
   The whole card is one link: screenshot on top, then "Version 01" with an
   arrow. Hover: the card lifts, the screenshot zooms slightly and the arrow
   nudges right.
   ========================================================================== */
.versions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 400px));
  justify-content: center;          /* any number of cards stays centered */
  gap: clamp(14px, 2.5svh, 28px) clamp(16px, 2.5vw, 28px);
}

.version-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 31, 62, .04);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s ease, border-color .3s ease;
}
.version-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 24px 48px -24px rgba(0, 31, 62, .35);
}
.version-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.version-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  max-height: 28svh;                /* shorter screens: crop, keep the page on one screen */
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--navy);
}
.version-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.version-card:hover .version-card__img { transform: scale(1.03); }

/* Label row: "Version 01" with an arrow on the right */
.version-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(10px, 2svh, 18px) clamp(16px, 2vw, 22px);
}
.version-card__num {
  font-size: clamp(17px, min(2vw, 2.6svh), 22px);
  font-weight: 700;
  letter-spacing: -.01em;
}
.version-card__arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(32px, 4.5svh, 40px);
  height: clamp(32px, 4.5svh, 40px);
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--white);
  font-size: 18px;
  transition: background-color .2s ease, transform .2s ease;
}
.version-card:hover .version-card__arrow { background: var(--blue-dark); transform: translateX(4px); }


/* 5. Responsive + motion
   ========================================================================== */
/* Phones: the two cards stack, so each screenshot gets less height. */
@media (max-width: 660px) {
  .version-card__media { max-height: 17.5svh; }
}
/* Short phones (SE / older): smaller screenshots and tighter text. */
@media (max-width: 660px) and (max-height: 700px) {
  .version-card__media { max-height: 12svh; }
  .landing__lead { font-size: 13px; line-height: 1.45; }
  .landing__intro { margin-bottom: 12px; }
  .versions { gap: 10px; }
}
@media (max-width: 660px) and (max-height: 600px) {
  .version-card__media { max-height: 10svh; }
  .landing__main { padding-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .version-card,
  .version-card__img,
  .version-card__arrow { transition: none; }
  .version-card:hover,
  .version-card:hover .version-card__img,
  .version-card:hover .version-card__arrow { transform: none; }
}
