/* ==========================================================
   livr — Demos home page
   Single page, fluid layout. No framework required.
   ========================================================== */

:root {
  /* Colour */
  --green: #20543D;          /* brand accent: buttons, card links */
  --green-deep: #0B2A20;     /* fallback behind the background image */
  --white: #FFFFFF;
  --ink: #111318;            /* card titles */
  --ink-muted: #3B4A42;      /* card body text */
  --mint-100: #E6F2ED;       /* body text on the dark background */
  --card-border: #E3E8E4;
  --scrim: rgba(5, 20, 15, 0.42); /* darkens the background image for legibility */

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Layout */
  --max-width: 1200px;
  --gutter: clamp(20px, 4vw, 32px);
  --radius-card: 28px;
  --radius-pill: 999px;
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--white);
  background: var(--green-deep);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid #9FE3C4;
  outline-offset: 3px;
}

/* ---------- Page shell + background ---------- */

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--green-deep);
  background-image:
    linear-gradient(var(--scrim), var(--scrim)),
    url("assets/background.jpg");
  background-size: cover;
  background-position: center;
}

.site-header,
.hero,
.site-footer {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: clamp(28px, 3.5vw, 44px);
  padding-bottom: 12px;
}

.logo {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.logo img {
  height: clamp(40px, 4vw, 56px);
  width: auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.btn--outline {
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--white);
}
.btn--outline:hover { background: rgba(255, 255, 255, 0.12); }

.btn--solid {
  align-self: flex-start;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px 0 8px;
  margin-top: 8px;
  background: var(--white);
  color: var(--green);
  font-size: 16px;
}
.btn--solid:hover { transform: translateY(-1px); }

.btn__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: var(--green);
  color: var(--white);
}

/* ---------- Hero (intro + cards) ---------- */

.hero {
  flex: 1 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding-block: clamp(24px, 5vw, 64px);
}

.hero__intro {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero__title {
  margin: 0;
  max-width: 14ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero__lead {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.55;
  color: var(--mint-100);
}

/* ---------- Demo cards ---------- */

.demos {
  flex: 999 1 560px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.3);
}

.card__image {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-bottom: 1px solid var(--card-border);
  transition: transform .5s ease;
}

.card:hover .card__image { transform: scale(1.03); }

.card__body {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 26px 26px;
  background: var(--white);
  position: relative; /* keeps body above the scaled image */
}

.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.card__text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: auto;       /* pins the link to the bottom so both cards align */
  padding-top: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--green);
}

.card__link svg { transition: transform .2s ease; }
.card:hover .card__link svg { transform: translateX(4px); }

/* ---------- Footer ---------- */

.site-footer {
  padding-top: 12px;
  padding-bottom: 20px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  color: var(--white);
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* ---------- Motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
