/* startups-list static city sites */
:root {
  --bg: #f4f4f4;
  --card: #fff;
  --ink: #222;
  --muted: #777;
  --line: #e2e2e2;
  --accent: #0ac930;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
a { color: #1a73c8; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; border: 0; }

/* ---------- header ---------- */
header.city {
  position: relative;
  background-color: #333;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 48px 24px 0;
  min-height: 300px;
}
header.city::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.72));
}
header.city > * { position: relative; z-index: 1; }
header.city h1.title {
  margin: 0 0 8px;
  font-size: 44px;
  line-height: 1.1;
  font-weight: 700;
  text-shadow: 0 2px 14px rgba(0,0,0,.6);
}
header.city h1.title a { color: #fff; text-decoration: none; }
header.city p.lead {
  margin: 0 0 24px;
  max-width: 720px;
  font-size: 18px;
  color: #f0f0f0;
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
}
header.city p.lead a { color: #fff; text-decoration: underline; }
.city-switch {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
  max-width: 190px;
  padding: 6px 8px;
  border: 0;
  border-radius: 3px;
  background: rgba(255,255,255,.9);
  color: #222;
  font: inherit;
  font-size: 13px;
}

/* ---------- nav ---------- */
nav.main {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 8px;
}
nav.main a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 3px 3px 0 0;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  background: rgba(0,0,0,.28);
}
nav.main a:hover { background: rgba(0,0,0,.5); text-decoration: none; }
nav.main a.active { background: var(--bg); color: var(--ink); }

/* ---------- filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 18px 24px 6px;
}
.filters a.pill,
.filters button.pill {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: #444;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.filters a.pill:hover,
.filters button.pill:hover { border-color: #bbb; text-decoration: none; }
.filters .pill.on { background: #333; border-color: #333; color: #fff; }
.filters .pill i { font-style: normal; color: var(--muted); margin-left: 4px; }
.filters .pill.on i { color: #ddd; }
.filters .more-facets { display: none; }
.filters.expanded .more-facets { display: contents; }

/* ---------- cards ---------- */
/* .c = card (startup), .c.p = person, .s = social row, .t = tag row.
   Class names are deliberately one character: they are paid for once per card
   and the largest pages carry ~8,000 of them. */
.wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding: 14px 24px 40px;
  align-items: start;
}
.c {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 14px;
  color: var(--ink);
  overflow: hidden;
}
.c:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.c.hidden { display: none; }
.c > img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  float: left;
  margin: 0 12px 8px 0;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.c.p > img { border-radius: 50%; object-fit: cover; }
.c h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.c h2 a { color: var(--ink); }
.c p { margin: 0; font-size: 13px; color: #555; }
.c p b { display: block; font-weight: 600; color: #333; }
.c .s { clear: both; padding-top: 10px; }
/* Icons are masked external SVG files (see ICON_CSS) — the label text is kept
   in the markup as the accessible name and clipped out of the visual box. */
.c .s a {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 12px;
  overflow: hidden;
  text-indent: 100%;
  white-space: nowrap;
  vertical-align: middle;
  background-color: #9aa3ab;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 18px 18px;
  mask-size: 18px 18px;
}
.c .s a:hover { background-color: var(--ink); }
.s a.site{-webkit-mask-image:url(https://uploads2.startups-list.com/assets/icons/site.svg);mask-image:url(https://uploads2.startups-list.com/assets/icons/site.svg)}
.s a.twitter{-webkit-mask-image:url(https://uploads2.startups-list.com/assets/icons/twitter.svg);mask-image:url(https://uploads2.startups-list.com/assets/icons/twitter.svg)}
.s a.linkedin{-webkit-mask-image:url(https://uploads2.startups-list.com/assets/icons/linkedin.svg);mask-image:url(https://uploads2.startups-list.com/assets/icons/linkedin.svg)}
.s a.github{-webkit-mask-image:url(https://uploads2.startups-list.com/assets/icons/github.svg);mask-image:url(https://uploads2.startups-list.com/assets/icons/github.svg)}
.s a.angellist{-webkit-mask-image:url(https://uploads2.startups-list.com/assets/icons/angellist.svg);mask-image:url(https://uploads2.startups-list.com/assets/icons/angellist.svg)}
.c .t { clear: both; padding-top: 8px; font-size: 11px; color: var(--muted); }

/* ---------- content pages ---------- */
.content {
  max-width: 820px;
  margin: 0 auto;
  padding: 30px 24px 60px;
  background: var(--card);
}
.content h1, .content h2, .content h3 { line-height: 1.25; }
.content img { height: auto; }
.content pre { overflow-x: auto; }
.embed { padding: 24px; }
.embed iframe { width: 100%; min-height: 620px; border: 0; background: #fff; }

/* ---------- home directory ---------- */
.home-hero { padding: 48px 24px 12px; text-align: center; }
.home-hero h1 { margin: 0 0 6px; font-size: 40px; }
.home-hero p { margin: 0; color: var(--muted); font-size: 18px; }
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  padding: 24px;
}
a.citylink {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  border-radius: 3px;
  background: #555 center/cover;
  color: #fff;
  text-align: center;
  text-decoration: none;
  overflow: hidden;
}
a.citylink::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.42);
  transition: background .15s;
}
a.citylink:hover::before { background: rgba(0,0,0,.15); }
a.citylink span {
  position: relative;
  font-size: 26px;
  font-weight: 600;
  text-shadow: 0 0 12px rgba(0,0,0,.8);
}
.beta-list { padding: 0 24px 24px; display: flex; flex-wrap: wrap; gap: 6px; }
.beta-list a {
  padding: 4px 10px;
  border-radius: 3px;
  background: #ddd;
  color: #333;
  font-size: 13px;
}

/* ---------- footer ---------- */
footer.site {
  padding: 30px 24px 60px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
footer.site a { color: #555; }
.empty { padding: 40px 24px; color: var(--muted); }

/* ---------- responsive ----------
   Ported from the legacy bootstrap layout (startupslist public/css/layout.css
   @media max-width:800px, listings.css). Two things the legacy mobile view got
   right and that are reproduced here:
     1. cards stop being a grid of boxes and become full-width list rows with a
        left-floated square logo — far more readable on a phone than 260px
        cards, and it removes the horizontal gutter entirely;
     2. the hero shrinks and the heading scales down instead of overflowing.
   The legacy site also hid the filter pills and the city <select> on mobile;
   that is *not* copied — both are kept and made touch-sized instead, since
   filtering is the main reason to visit these pages. */

/* Tablet: the header type scale steps down before the layout changes. */
@media (max-width: 900px) {
  header.city h1.title { font-size: 36px; }
  header.city p.lead { font-size: 16px; }
}

@media (max-width: 700px) {
  header.city { padding: 20px 14px 0; min-height: 0; }
  header.city h1.title { font-size: 27px; }
  header.city p.lead { margin-bottom: 16px; font-size: 15px; }

  /* Full-width, non-wrapping, thumb-sized nav. */
  nav.main { gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  nav.main a { padding: 12px 14px; white-space: nowrap; font-size: 15px; }

  .city-switch {
    position: static;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0 0 14px;
    padding: 10px 8px;   /* >=44px touch target */
    font-size: 16px;     /* iOS does not zoom the page at 16px */
  }

  /* Filter pills: one scrollable row, each pill a real touch target. */
  .filters {
    gap: 8px;
    padding: 12px 14px 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filters.expanded { flex-wrap: wrap; overflow-x: visible; }
  .filters a.pill, .filters button.pill {
    padding: 9px 14px;
    font-size: 14px;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  /* Cards become list rows (legacy mobile behaviour). */
  .wrap {
    display: block;
    padding: 0 0 32px;
    background: var(--card);
  }
  .c {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: 12px 14px;
  }
  .c:hover { box-shadow: none; border-color: var(--line); border-top-color: var(--line); }
  .c > img { width: 48px; height: 48px; margin: 0 12px 6px 0; }
  .c h2 { font-size: 16px; }
  .c p {
    /* Two lines then clip — keeps rows a predictable height while scrolling. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .c .t { display: none; }          /* tag row is noise at this width */
  .c .s a { width: 22px; height: 22px; margin-right: 18px; -webkit-mask-size: 22px 22px; mask-size: 22px 22px; }

  .content, .embed { padding-left: 14px; padding-right: 14px; }
  .city-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 14px; }
  a.citylink { height: 120px; }
  a.citylink span { font-size: 20px; }
  .home-hero { padding: 28px 14px 4px; }
  .home-hero h1 { font-size: 28px; }
  .home-hero p { font-size: 16px; }
  footer.site { padding: 24px 14px 40px; }
}
