/* ==========================================================================
   swissmacro — shared styles for every page
   Change a colour or font here and it updates on all pages.
   ========================================================================== */

/* ---------- Fonts (stored in the /fonts folder, no outside services) ---------- */
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("fonts/sora-latin.woff") format("woff");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Colours and fonts ---------- */
:root {
  --bg: #FAF9F5;          /* warm off-white page */
  --ink: #141413;         /* near-black text */
  --muted: #5B5A55;       /* grey text */
  --muted-2: #6A6964;     /* lighter grey (email) */
  --green: #DCEFD6;       /* light green buttons */
  --green-hover: #CFE8C6; /* green when the mouse is over it */
  --card: #FFFFFF;
  --card-border: #E7E4DB;
  --panel: #F4F2EC;       /* background behind card drawings */
  --dot-off: #D6D3CA;     /* inactive carousel dots */

  --font-main: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-action: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

/* Text only screen readers hear (e.g. the full stop behind the big dot) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* One full-height page: header on top, content in the middle, credit at the bottom */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 36px 56px 44px;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
}

.wordmark {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

/* The big round dot used after headings */
.dot {
  display: inline-block;
  width: 0.26em;
  height: 0.26em;
  margin-left: 0.085em;
  border-radius: 50%;
  background: currentColor;
  vertical-align: baseline;
}

/* ---------- Footer (credit on every page) ---------- */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.credit-name { font-size: 15px; font-weight: 500; }
.credit-role { font-size: 14px; color: var(--muted); }
.credit-email {
  font-size: 12.5px;
  color: var(--muted-2);
  letter-spacing: 0.01em;
}
.credit-email a { text-decoration: none; }
.credit-email a:hover { text-decoration: underline; }

/* ---------- Green button (landing page, 404 page) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 56px;
  padding: 0 26px 0 28px;
  border-radius: 14px;
  background: var(--green);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-action);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--green-hover); }
.btn svg { display: block; flex-shrink: 0; width: 10px; height: 16px; }

/* ==========================================================================
   Landing page
   ========================================================================== */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding-top: 24px;
  padding-bottom: clamp(40px, 11.5vh, 130px); /* sits a little above the middle */
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 4.9vw, 70px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

/* Line breaks that only appear on phones */
.br-phone { display: none; }

/* ==========================================================================
   Models page
   ========================================================================== */
.models {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding-block: 28px 32px;
}

.models h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.04em;
}

/* Carousel: the row of cards plus the green arrow */
.carousel {
  display: flex;
  align-items: center;
  gap: 24px;
}

.track {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-block: 4px; /* room for keyboard focus outlines */
}
.track::-webkit-scrollbar { display: none; }

/* Wide screens: all four cards fit */
.card {
  flex: 0 0 calc((100% - 60px) / 4);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
}

.card h2 {
  margin: 0;
  min-height: 2.2em; /* room for two lines, so the drawings line up */
  font-size: 26px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.card-art {
  height: 148px;
  border-radius: 14px;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-art svg { display: block; width: 205px; height: 148px; max-width: 100%; }

.card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px; /* the blank line between text parts */
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}
.card-text p { margin: 0; }
.model-name { font-weight: 600; color: var(--ink); }

.card-group { display: flex; flex-direction: column; gap: 14px; }
.card-text ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-link,
.card-soon {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-action);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.card-link { color: var(--ink); text-decoration: none; }
.card-link svg { display: block; width: 8px; height: 13px; transition: transform 0.15s ease; }
.card-link:hover svg { transform: translateX(3px); }
.card-soon { color: var(--muted); }

/* Arrow and dots */
.controls {
  display: flex;
  align-items: center;
}

.dots { display: none; }

.next {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--green);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.next:hover { background: var(--green-hover); }
.next svg { display: block; width: 12px; height: 19px; margin-left: 3px; }

/* ==========================================================================
   404 page ("not here yet")
   ========================================================================== */
.notfound h1 { font-size: clamp(34px, 3.8vw, 54px); }
.notfound p {
  margin: 0;
  max-width: 34ch;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
}

/* ==========================================================================
   Medium screens: fewer cards at once, the next one peeks out
   ========================================================================== */
@media (max-width: 1279px) {
  .card { flex-basis: calc((100% - 40px) / 3.2); }
}

@media (max-width: 899px) {
  .page { padding: 32px 32px 40px; }
  .card { flex-basis: calc((100% - 20px) / 2.2); }
}

/* ==========================================================================
   Phones
   ========================================================================== */
@media (max-width: 600px) {
  .page { padding: 24px 20px 32px; }

  .wordmark { font-size: 20px; }

  .site-footer { gap: 4px; }
  .credit-name { font-size: 14px; }
  .credit-role { font-size: 13px; }
  .credit-email { font-size: 12px; }

  .btn {
    gap: 14px;
    min-height: 48px;
    padding: 0 20px 0 22px;
    border-radius: 12px;
    font-size: 19px;
  }
  .btn svg { width: 9px; height: 14px; }

  /* Landing page */
  .hero {
    gap: 22px;
    padding-bottom: clamp(32px, 7.6vh, 80px);
  }
  .hero h1 { font-size: 44px; line-height: 1.06; }
  .br-phone { display: inline; }

  /* Models page */
  .models { gap: 20px; padding-block: 20px 16px; }
  .models h1 { font-size: 36px; }

  .carousel {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  /* Cards run to the screen edge so the next one peeks out */
  .track {
    gap: 14px;
    margin-inline: -20px;
    padding-inline: 20px;
    scroll-padding-inline: 20px;
  }

  .card {
    flex: 0 0 min(300px, calc(100vw - 90px));
    gap: 16px;
    padding: 22px;
  }
  .card h2 { font-size: 24px; }
  .card-art { height: 136px; }
  .card-art svg { width: 189px; height: 136px; }
  .card-text { gap: 20px; font-size: 14px; }

  .controls { justify-content: space-between; }

  .dots {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot-off);
    transition: background-color 0.2s ease;
  }
  .dots span.is-active { background: var(--ink); }

  .next { width: 48px; height: 48px; }
  .next svg { width: 10px; height: 16px; margin-left: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
