/* Temporal site: one dark theme, black like the app's sky. */

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/jost-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jost-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jost-latin-500-normal.woff2") format("woff2");
}

:root {
  --bg: #000000;
  --panel: #121118;
  --line: #24222c;
  --text: #e9e6f2;
  --muted: #9a95ad;
  --accent: #cfc0ff;

  /* The purple glow: a 1px lavender edge plus two wide lavender-purple glows. */
  --edge: rgba(207, 192, 255, 0.35);
  --edge-hover: rgba(207, 192, 255, 0.6);
  --glow-near: rgba(190, 165, 255, 0.22);
  --glow-far: rgba(130, 85, 235, 0.2);
  --glow-near-hover: rgba(190, 165, 255, 0.34);
  --glow-far-hover: rgba(130, 85, 235, 0.32);

  --page-max: 1080px;
  --gutter: 16px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

h1,
h2,
h3 {
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
}

h2 {
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
  color: var(--accent);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 40px;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* The Temporal wordmark: an image, since its Afronaut lettering is licensed for images only. */
.brand {
  display: block;
  flex-shrink: 0;
}

.brand img {
  display: block;
  width: auto;
  height: 28px;
  transition: filter 0.25s ease;
}

.brand:hover img {
  filter: drop-shadow(0 0 6px var(--glow-near-hover));
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@media (max-width: 560px) {
  .site-nav ul {
    gap: 2px 16px;
  }
  .site-nav a {
    font-size: 0.9rem;
  }
}

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

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  padding-top: 28px;
  padding-bottom: 36px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.site-footer p {
  margin: 0;
}

/* ---------- Sections ---------- */

.section {
  padding-top: 64px;
}

.section-lede {
  color: var(--muted);
  max-width: 40em;
}

.center {
  text-align: center;
}

.center .section-lede {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Placeholders (captures not ready yet) ---------- */

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 8px;
  border: 1px dashed rgba(154, 149, 173, 0.55);
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.3;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(36, 34, 44, 0.35) 0 10px,
      transparent 10px 20px
    );
}

.placeholder code {
  color: var(--accent);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.95em;
  word-break: break-all;
}

/* ---------- Phones ---------- */

.phone {
  display: block;
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  border-radius: clamp(10px, 8%, 28px) / clamp(10px, 4.5%, 28px);
  overflow: hidden;
  background: var(--panel);
  text-decoration: none;
  box-shadow:
    0 0 0 1px var(--edge),
    0 0 28px 2px var(--glow-near),
    0 0 80px 10px var(--glow-far);
  transition: box-shadow 0.25s ease;
}

a.phone:hover,
a.phone:focus-visible {
  box-shadow:
    0 0 0 1px var(--edge-hover),
    0 0 32px 4px var(--glow-near-hover),
    0 0 96px 16px var(--glow-far-hover);
}

.phone > img,
.phone > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone .placeholder {
  border-radius: inherit;
}

/* ---------- Pill buttons ---------- */

.pill {
  display: inline-block;
  padding: 0.5em 1.3em;
  border: 1px solid var(--edge-hover);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  box-shadow:
    0 0 14px 0 var(--glow-near),
    0 0 34px 2px var(--glow-far);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.pill:hover,
.pill:focus-visible {
  border-color: var(--accent);
  box-shadow:
    0 0 18px 1px var(--glow-near-hover),
    0 0 44px 6px var(--glow-far-hover);
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

@media (max-width: 860px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 400px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  display: block;
  padding: 20px 20px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
}

.card h3 {
  margin-bottom: 0.35em;
}

.card p {
  margin: 0;
  color: var(--muted);
}

a.card {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

a.card h3::after {
  content: " \2192";
  color: var(--accent);
}

a.card:hover,
a.card:focus-visible {
  border-color: var(--edge-hover);
  box-shadow: 0 0 24px 0 var(--glow-near);
}

/* ---------- Home page ---------- */

/* Capped at the graphic's real width so its lettering stays sharp. */
.banner {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
}

/* The feature graphic fades into the black page at its bottom and sides.
   The fades stay narrow: the wordmark starts about 2% in from the left edge
   and the tagline ends about 75% of the way down. */
.banner picture,
.banner img {
  display: block;
  width: 100%;
}

.banner img {
  aspect-ratio: 1024 / 500;
  -webkit-mask-image:
    linear-gradient(to bottom, #000 78%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 2%, #000 97%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, #000 78%, transparent 100%),
    linear-gradient(to right, transparent 0, #000 2%, #000 97%, transparent 100%);
  mask-composite: intersect;
}

/* Phones share a centered row; their buttons share the row below, so all three line up. */
.trio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.28fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: clamp(12px, 4vw, 56px);
  row-gap: clamp(16px, 3vw, 28px);
  max-width: 860px;
  margin: 40px auto 0;
  /* Room for the glow so it isn't clipped at the page edge. */
  padding: 0 clamp(0px, 2vw, 16px);
}

.trio-item {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  justify-items: center;
  min-width: 0;
}

.trio-item .phone {
  align-self: center;
}

.trio-item .pill {
  align-self: start;
}

@media (max-width: 560px) {
  .trio .pill {
    padding: 0.45em 0.7em;
    font-size: 0.78rem;
  }
  .trio .placeholder {
    font-size: 0.68rem;
    padding: 4px;
  }
}

.play-badge {
  display: inline-block;
  padding: 14px 26px;
  border: 1px solid var(--edge-hover);
  border-radius: 12px;
  color: var(--text);
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.play-note {
  margin-top: 16px;
  color: var(--muted);
}
