/*
 * DotMaze site — shared styles.
 *
 * Colours are lifted straight from the app so the pages and the product read as
 * one thing: the navy is the icon and splash background (`app.json`), the accent
 * hues are FLOW_COLORS from `src/constants/flow-theme.ts`, and the 800px column
 * is MaxContentWidth from `src/constants/theme.ts`.
 */

:root {
  --navy: #011d47;
  --navy-deep: #010f26;
  --navy-raised: #0a2a5e;
  --text: #f4f6f8;
  --text-secondary: #a8b6cd;
  --line: rgba(255, 255, 255, 0.1);

  --red: #e5484d;
  --blue: #3c87f7;
  --amber: #e8b613;
  --green: #30a46c;
  --orange: #f76b15;
  --cyan: #00a2c7;
  --magenta: #d6409f;
  --violet: #8e4ec6;

  --content: 800px;
  --radius: 18px;

  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The faint grid behind the icon's dots, continued onto the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

/* Inline-only padding, so an element that is both `.wrap` and `section` keeps
 * the section's vertical rhythm — a `padding` shorthand here would win on
 * specificity and silently flatten it. */
.wrap {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding-inline: 24px;
}

/* ---------------------------------------------------------------- header --- */

.site-header {
  padding: 32px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: block;
}

.brand span {
  font-family: var(--rounded);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.4px;
}

/* ------------------------------------------------------------------ hero --- */

.hero {
  text-align: center;
  padding-block: 48px 8px;
}

.hero-icon {
  width: 152px;
  height: 152px;
  border-radius: 34px;
  display: block;
  margin: 0 auto 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

h1 {
  font-family: var(--rounded);
  font-size: clamp(38px, 8vw, 58px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1.6px;
  margin: 0 0 16px;
}

.tagline {
  font-size: clamp(18px, 3.4vw, 21px);
  color: var(--text-secondary);
  max-width: 30ch;
  margin: 0 auto 32px;
}

/* Underlines the noun in the tagline with a flow-coloured pipe. */
.pipe {
  color: var(--text);
  box-shadow: inset 0 -0.36em 0 var(--amber);
  border-radius: 3px;
  padding: 0 2px;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 26px;
  font-family: var(--rounded);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--text);
  color: var(--navy);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line);
  color: var(--text);
}

.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.note {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 14px;
}

/* -------------------------------------------------------------- sections --- */

section {
  padding-block: 56px;
}

h2 {
  font-family: var(--rounded);
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.9px;
  line-height: 1.15;
  margin: 0 0 16px;
}

h3 {
  font-family: var(--rounded);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 32px 0 8px;
}

p {
  margin: 0 0 16px;
}

.lede {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 62ch;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 10px;
}

a {
  color: var(--text);
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--text);
}

/* ----------------------------------------------------------------- cards --- */

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

.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

/* A flow-coloured endpoint dot, the app's own vocabulary. */
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: block;
  margin-bottom: 14px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.09);
}

/* ----------------------------------------------------------- screenshots --- */

.shots {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}

.shots figure {
  margin: 0;
  max-width: 240px;
  flex: 1 1 200px;
}

.shots img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--line);
  display: block;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

.shots figcaption {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 12px;
}

/* ------------------------------------------------------------ prose page --- */

.prose {
  max-width: 68ch;
}

.prose ul {
  padding-left: 20px;
  margin: 0 0 16px;
}

.prose li {
  margin-bottom: 8px;
}

.prose strong {
  font-weight: 700;
}

.updated {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Question-and-answer block on the support page. */
.qa {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 22px;
}

.qa h3 {
  margin-top: 0;
}

.qa p:last-child {
  margin-bottom: 0;
}

.callout {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 28px 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- footer --- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 56px;
  margin-top: 40px;
  font-size: 14px;
  color: var(--text-secondary);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
}

.site-footer a {
  color: var(--text-secondary);
}

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

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