/* clinly.com.mx: hand-written, no build (T16.5). Tokens copied from DESIGN.md / packages/ui. */
@font-face {
  font-family: 'Public Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/public-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/public-sans-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  --color-ink: #14181f;
  --color-paper: #ffffff;
  --color-ground: #eef1f4;
  --color-border: #c9d0d8;
  --color-text: #14181f;
  --color-text-muted: #4a5563;
  --line-magenta: #e2007a;
  --line-amber: #f7a600;
  --line-blue: #0072bc;
  --line-green: #00a650;
  --color-focus: var(--line-blue);
  --font-sans: 'Public Sans Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 4px;
  --station-ring: 4px;
  --rail: 4px;
  /* Where the rail runs, from the content's left edge. */
  --rail-x: 0.75rem;
  --gutter: 3rem;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  font-feature-settings: 'tnum';
  color: var(--color-text);
  background: var(--color-ground);
}

h1,
h2,
h3,
p,
figure,
ol,
ul {
  margin: 0;
}

/* Selection is a state: the focus blue at 25% (DESIGN.md). */
::selection {
  background: rgb(0 114 188 / 0.25);
}

a {
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: underline 2px var(--color-border);
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-color: var(--color-ink);
}
a:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--color-paper);
  border-radius: var(--radius);
}
.skip:focus {
  top: 1rem;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-block: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand svg {
  width: 2.5rem;
  height: 2.5rem;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}
.top nav .live {
  color: var(--color-text-muted);
}

/* Hero */
.hero {
  padding-block: 2rem 4rem;
}
.hero h1 {
  max-width: 22ch;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.hero .lede {
  max-width: 40rem;
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--color-text-muted);
}
.hero figure {
  margin-top: 3rem;
}

.shot {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-paper);
  overflow: hidden;
}
figcaption {
  margin-top: 0.75rem;
  max-width: 36rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
figcaption strong {
  color: var(--color-text);
  font-weight: 600;
}

/* The Metro line: each section is a stretch of one line, each heading a station on it. */
.line {
  --line: var(--color-ink);
  position: relative;
  padding: 0 0 4rem var(--gutter);
}
.line::before {
  content: '';
  position: absolute;
  left: calc(var(--rail-x) - var(--rail) / 2);
  top: 0;
  bottom: 0;
  width: var(--rail);
  background: var(--line);
}
.line.green {
  --line: var(--line-green);
}
.line.magenta {
  --line: var(--line-magenta);
}
.line.blue {
  --line: var(--line-blue);
}
/* The terminus: the blue line ends at the contact station. */
.line.end {
  --line: var(--line-blue);
}
.line.end::before {
  bottom: auto;
  height: 1.25rem;
}

.station {
  position: relative;
}
.station::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--color-paper);
  border: var(--station-ring) solid var(--line);
}
h2.station {
  padding-top: 0.25rem;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  text-wrap: balance;
}
h2.station::before {
  width: 2rem;
  height: 2rem;
  left: calc(var(--rail-x) - var(--gutter) - 1rem);
  top: 0.25rem;
}
.end h2.station::before {
  background: var(--line);
}
h3.station {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  text-wrap: balance;
}
h3.station::before {
  width: 1.25rem;
  height: 1.25rem;
  left: calc(var(--rail-x) - var(--gutter) - 0.625rem);
  top: 0.0625rem;
}
/* The tabular figures make 1ch wide, so measures are in rem (~70 characters). */
.intro {
  max-width: 36rem;
  margin-top: 1rem;
  color: var(--color-text-muted);
}

.stops {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding: 0;
  list-style: none;
}
.stops p {
  max-width: 36rem;
  margin-top: 0.5rem;
}
.stops .tech {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.gallery {
  display: grid;
  gap: 3rem;
  margin-top: 2.5rem;
}
/* A UI capture needs width to be legible: image wide, caption beside it. */
@media (min-width: 56rem) {
  .gallery figure {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(12rem, 2fr);
    gap: 2rem;
    align-items: start;
  }
  .gallery figcaption {
    margin-top: 0;
    font-size: 1rem;
  }
}

/* Offline flow: a route map, read top to bottom. */
.route {
  max-width: 24rem;
  margin-top: 1.5rem;
}
.route svg {
  display: block;
  width: 100%;
  height: auto;
}
.route text {
  font-family: var(--font-sans);
}

.contact .person {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}
.contact .links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0;
  list-style: none;
}
/* Icon-only links: a 44px target around a 24px icon. */
.contact .links a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-paper);
}
.contact .links a:hover {
  border-color: var(--color-ink);
}
.contact .links svg {
  width: 1.5rem;
  height: 1.5rem;
}

.foot {
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

@media (max-width: 40rem) {
  :root {
    --gutter: 2.25rem;
    --rail-x: 0.5rem;
  }
  .wrap {
    padding: 0 1rem;
  }
  h2.station {
    font-size: 1.625rem;
  }
  h2.station::before {
    width: 1.5rem;
    height: 1.5rem;
    left: calc(var(--rail-x) - var(--gutter) - 0.75rem);
    top: 0.3125rem;
  }
}

/* Pull a lone last word back up. */
p,
figcaption {
  text-wrap: pretty;
}

/* Small nav text, full-size touch target (WCAG 2.5.8). */
.top nav a,
.contact a,
.foot a {
  display: inline-block;
  padding-block: 0.625rem;
}

.zoom {
  display: block;
  border-radius: var(--radius);
  text-decoration: none;
}
.zoom:hover .shot {
  border-color: var(--color-ink);
}
