/*
 * anex.sh homepage: the video gallery look.
 *
 * Loaded by index.html alone, and on its own: the homepage takes nothing from
 * base.css or landing.css, so the docs, blog and console keep the house style
 * while this page is dark, white and video-led.
 */

/*
 * The homepage sets type in three faces: Space Grotesk for headings, big
 * numbers and the logo, Inter for body copy (both declared in footer.css,
 * which every public page loads), and JetBrains Mono for the hero's small
 * labels, declared here. All served from our own origin (see base.css for why
 * not from Google's CDN), as the variable files Google serves, cut to latin
 * and latin-ext, under the licences in /static/fonts.
 */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/static/fonts/jetbrains-mono-variable-latin-ext.woff2) format('woff2');
  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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/static/fonts/jetbrains-mono-variable-latin.woff2) format('woff2');
  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;
}

:root {
  --bg: #08080B;
  --text: #EDEDF2;
  --muted: #A3A3B2;
  --muted-2: #8A8A99;
  --card: #111117;
  --line: #1F1F28;
  --white: #FFFFFF;

  /* Secondary colours, used very sparingly. The main colour is white. */
  --yellow: #FFD447;     /* the logo's "anex" and the sign-up buttons only */
  --on-yellow: #16132B;  /* text on yellow */
  --pink: #FF4FA3;       /* the logo's ".sh" only */
  --turquoise: #38E0C8;  /* accent: model labels, the anex.sh price column, links, the "0" stat */

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--turquoise); }
a:hover { color: #8EF0E1; }
:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--white); color: var(--bg); padding: 10px 14px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.shell {
  display: block;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 26px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
}

/* ---- buttons ---------------------------------------------------------- */
.btn-yellow {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  background: var(--yellow);
  color: var(--on-yellow);
  font-weight: 600;
  text-decoration: none;
  transition: filter .2s ease;
}
.btn-yellow:hover { color: var(--on-yellow); filter: brightness(1.08); }
.btn-pill { font-size: 15px; padding: 12px 18px; border-radius: 999px; }
.btn-large { font-size: 16px; padding: 15px 24px; margin-top: 8px; }

/* ---- hero ------------------------------------------------------------- */
.hero {
  position: relative;
  height: 900px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero-video, .hero-scrim { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-video { object-fit: cover; }
.hero-scrim {
  background: linear-gradient(180deg, rgba(8,10,14,.55) 0%, rgba(8,10,14,.15) 30%,
                              rgba(8,10,14,.25) 65%, #08080B 100%);
}

.topbar {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.logo-name { color: var(--yellow); }
.logo-tld { color: var(--pink); }
.topbar-links { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.topbar-links a, .topbar-signin {
  color: rgba(255,255,255,.86);
  text-decoration: none;
  font-size: 15px;
  padding: 10px 4px;
}
.topbar-links a:hover, .topbar-signin:hover { color: var(--white); }
.topbar-actions { display: flex; gap: 12px; align-items: center; }

.hero-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 0 24px;
  text-align: center;
}
/* Each letter is its own span: an outline the video shows through, which
   fills solid white under the pointer. */
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(84px, 17vw, 260px);
  line-height: .88;
  letter-spacing: -0.03em;
  color: var(--white);
  cursor: default;
}
.hl {
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 3px var(--white);
  transition: color .2s ease;
}
.hl:hover { color: var(--white); }
.hero-sub {
  margin: 0;
  max-width: 560px;
  font-size: 21px;
  line-height: 1.5;
  color: rgba(255,255,255,.92);
}
.hero-credit {
  position: absolute;
  right: 32px;
  bottom: 32px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(255,255,255,.78);
}

/* ---- sections --------------------------------------------------------- */
.section { padding: 40px 0 80px; }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--white);
}
.section-sub { margin: 0; font-size: 17px; line-height: 1.6; color: var(--muted); }
.note { margin: 0; font-size: 13px; color: var(--muted-2); }

/* ---- stats ------------------------------------------------------------ */
.stats {
  padding: 72px 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.stat { padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--white);
}
.stat-accent { color: var(--turquoise); }
.stat-text { font-size: 15px; line-height: 1.5; color: var(--muted); }

/* ---- gallery ---------------------------------------------------------- */
.gallery { padding: 56px 0 80px; display: flex; flex-direction: column; gap: 24px; }
.gallery-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  font: 500 13px/1 var(--font-body);
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #2A2A35;
  background: transparent;
  color: #C9C9D6;
  cursor: pointer;
}
.filter:hover { border-color: #4A4A58; color: var(--white); }
.filter[aria-pressed="true"] { background: var(--white); border-color: var(--white); color: var(--bg); }

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 12px;
}
.tile {
  position: relative;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #15151B;
}
.tile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.tile:hover video { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .tile video { transition: none; }
  .tile:hover video { transform: none; }
}
/* A soft shade under the caption keeps white text readable on a bright frame. */
.tile-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 14px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  font-size: 13px;
  color: var(--white);
  background: linear-gradient(0deg, rgba(8,8,11,.55) 0%, rgba(8,8,11,0) 100%);
}
.tag { font-size: 11px; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.glass {
  background: rgba(16,16,22,.55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.14);
}
/* The play button phones and touch screens get in place of autoplay (home.js):
   the whole tile is the target, with a round icon in the middle that steps
   aside while the clip plays. */
.tile-play {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: transparent; cursor: pointer;
}
/* The triangle's box sits a little right of the circle's centre (in the
   path, not the padding): a play triangle centred by its box looks pushed
   left, because most of its weight is on its flat side. */
.tile-play svg {
  width: 48px; height: 48px; padding: 12px; border-radius: 999px;
  fill: #FFFFFF;
  background: rgba(16,16,22,.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  transition: opacity .2s ease;
}
.tile.is-playing .tile-play svg { opacity: 0; }
.tile-play:focus-visible { outline: 2px solid var(--turquoise); outline-offset: -4px; border-radius: 18px; }
.w2 { grid-column: span 2; }
.h2 { grid-row: span 2; }
.tile[hidden] { display: none; }

/* ---- models ----------------------------------------------------------- */
.models {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.model { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.model-kind {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--turquoise);
}
.model h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--white); }
.model p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.model-spec { font-size: 12px; color: var(--muted-2); }

/* ---- pricing ---------------------------------------------------------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 12px;
}
.pricing-art { min-height: 420px; }
.pricing-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8,8,11,.85) 0%, rgba(8,8,11,.1) 60%);
}
.pricing-claim {
  position: absolute;
  left: 28px; right: 28px; bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-big {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(56px, 7vw, 104px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: .9;
  color: var(--white);
}
.pricing-claim p { margin: 0; font-size: 18px; color: var(--white); }
.pricing-card {
  padding: 8px 8px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.pricing-card .note { padding: 0 20px; }
.table-scroll { overflow-x: auto; }
.price-table { width: 100%; min-width: 340px; border-collapse: collapse; }
.price-table th, .price-table td { padding: 16px 20px; text-align: right; font-size: 16px; }
.price-table thead th { font-size: 13px; font-weight: 500; color: var(--muted); }
.price-table th:first-child { text-align: left; }
.price-table thead .price-us-head { font-weight: 600; color: var(--turquoise); }
.price-table tbody th, .price-table tbody td { border-top: 1px solid var(--line); }
.price-table tbody th { font-weight: 400; color: var(--white); }
.price-them { color: var(--muted-2); text-decoration: line-through; }
.price-us { color: var(--white); font-weight: 600; }

/* ---- compliance ------------------------------------------------------- */
/* Three cards under the section's title. A fixed three columns, because an
   auto-fit grid keeps an empty fourth column the title spans. */
.compliance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.compliance-title { grid-column: 1 / -1; margin-bottom: 12px; }
.compliance-item { padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.compliance-item h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--white); }
.compliance-item p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---- API -------------------------------------------------------------- */
.api {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 40px;
  align-items: center;
}
.api-copy { display: flex; flex-direction: column; gap: 14px; }
.api .section-title { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.08; }
.api-links { margin: 0; display: flex; flex-wrap: wrap; gap: 20px; font-size: 15px; }
.code {
  margin: 0;
  padding: 26px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: #D9D9E3;
}

/* ---- FAQ -------------------------------------------------------------- */
/* Each question is a <details>, so opening one is the browser's job; the
   answers are also read out of the page into its FAQ structured data
   (landing._faq_page), so keep the markup shape. */
.faq-section .section-title { margin-bottom: 24px; }
.faq { max-width: 880px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 19px; font-weight: 500; color: var(--white);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex: none; font-size: 26px; line-height: 1; color: var(--muted);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: #FFFFFF; }
.faq-item summary:hover::after { color: var(--turquoise); }
.faq-answer { padding: 0 0 22px; max-width: 760px; }
.faq-answer p, .faq-answer li { margin: 0 0 12px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.faq-answer ul { margin: 0 0 12px; padding-left: 20px; }
.faq-answer code { font-family: var(--font-mono); font-size: 14px; color: var(--text); }

/* ---- closing band ---------------------------------------------------- */
.closing {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  padding: 140px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
.closing-art, .closing-art img, .closing-scrim { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Anchored to the top, where the anex.sh billboards and the redhead's face are. */
.closing-art img { object-fit: cover; object-position: center top; }
.closing-scrim { background: rgba(22,19,43,.72); }
.closing-title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--white);
}
.btn-closing { position: relative; font-size: 18px; padding: 16px 28px; border-radius: 12px; }

/* ---- narrow screens --------------------------------------------------- */
@media (max-width: 900px) {
  .compliance { grid-template-columns: minmax(0, 1fr); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w2, .h2 { grid-column: span 1; grid-row: span 1; }
}
@media (max-width: 640px) {
  .hero { height: 760px; }
  /* Two rows: the wordmark left and the account links right, then the
     section links centred under them. */
  .topbar {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "logo actions" "links links";
    align-items: center;
    row-gap: 10px;
    padding: 14px 16px;
  }
  .logo { grid-area: logo; }
  .topbar-actions { grid-area: actions; justify-self: end; gap: 8px; }
  .topbar-links { grid-area: links; justify-content: center; gap: 4px 18px; }
  .topbar-actions .btn-pill { font-size: 14px; padding: 10px 14px; }
  .hero-body { gap: 22px; }
  .hero-sub { font-size: 18px; }
  .hero-credit { right: 20px; left: 20px; bottom: 20px; text-align: center; }
  .hl { -webkit-text-stroke-width: 2px; }
  .shell { padding: 0 16px; }
  .bento { grid-auto-rows: 180px; gap: 8px; }
  /* On a narrow tile the pill goes under the title rather than breaking it. */
  .tile-label { flex-wrap: wrap; padding: 32px 10px 10px; }
  .tile-label > span:first-child { white-space: nowrap; }
  .closing { padding: 100px 20px; }
}
