/* Copied verbatim from castup-platform apps/web/src/styles/tokens.css (DESIGN.md §10.2); only the
 * tokens this page uses. The last group is this page's own, with no tokens.css equivalent. */
:root {
  --castup-bg: #080D1E;
  --castup-surface: #0D1533;
  --castup-primary-subtle: #161D3B;
  --castup-primary-text: #A3B4FF;
  --castup-text-primary: #FAFBFD;
  --castup-text-secondary: #CBD5E1;
  --castup-text-muted: #94A3B8;
  --castup-border: #222B4F;
  --castup-gradient-surface-wash: radial-gradient(120% 80% at 50% 0%, #161D3B 0%, #080D1E 65%);
  --castup-gradient-brand: linear-gradient(90deg, #4B6BFF 0%, #22D3EE 55%, #8B7CFF 100%);

  --castup-font-display: 'Noto Sans Thai', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --castup-font-body: 'Noto Sans Thai', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --castup-font-numeral: 'Noto Sans Thai', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --castup-leading-thai: 1.625;
  --castup-type-display-xl-size: 64px;
  --castup-type-display-xl-leading: 1.15;
  --castup-type-display-xl-weight: 700;
  --castup-type-display-md-size: 36px;
  --castup-type-display-md-leading: 1.3;
  --castup-type-display-md-weight: 600;
  --castup-type-title-size: 20px;
  --castup-type-title-leading: 1.45;
  --castup-type-title-weight: 600;
  --castup-type-body-lg-size: 18px;
  --castup-type-body-lg-leading: 1.65;
  --castup-type-body-lg-weight: 400;
  --castup-type-body-md-size: 16px;
  --castup-type-body-md-leading: 1.625;
  --castup-type-body-sm-size: 14px;
  --castup-type-body-sm-leading: 1.6;
  --castup-type-body-sm-weight: 400;
  --castup-type-caption-size: 12px;
  --castup-type-caption-leading: 1.6;
  --castup-type-caption-weight: 400;

  --castup-radius-full: 9999px;
  --castup-icon-md: 24px;
  --castup-icon-lg: 32px;
  --castup-size-top-bar: 64px;
  --castup-size-mark-hero: 96px;
  --castup-z-sticky: 10;

  --castup-space-0: 0;
  --castup-space-1: 4px;
  --castup-space-2: 8px;
  --castup-space-3: 12px;
  --castup-space-4: 16px;
  --castup-space-6: 24px;
  --castup-space-16: 64px;
  --castup-container-prose: 720px;
  --castup-container-landing: 1280px;

  --castup-motion-instant: 100ms;
  --castup-motion-page: 500ms;
  --castup-motion-brand: 800ms;
  --castup-motion-stagger: 120ms;
  --castup-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --castup-ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Page-only values. The grid veil's cell and line follow DESIGN.md §4.2. */
  --castup-size-hairline: 1px;
  --castup-size-accent-rule: 3px;
  --castup-size-grid-veil: 48px;
  --castup-grid-veil-line: color-mix(in srgb, var(--castup-border) 30%, transparent);

  color-scheme: dark;
}

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

html,
body {
  min-height: 100%;
}

body {
  margin: var(--castup-space-0);
  background-color: var(--castup-bg);
  color: var(--castup-text-primary);
  font-family: var(--castup-font-body);
  font-size: var(--castup-type-body-md-size);
  line-height: var(--castup-leading-thai);
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: break-word;
}

p,
h1 {
  margin: var(--castup-space-0);
}

img {
  display: block;
}

.numeral {
  font-family: var(--castup-font-numeral);
  font-variant-numeric: tabular-nums;
}

.page {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background-image: var(--castup-gradient-surface-wash);
  background-repeat: no-repeat;
}

/* DESIGN.md §4.2 grid veil. */
.page::before {
  content: "";
  position: absolute;
  inset: var(--castup-space-0);
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--castup-grid-veil-line) var(--castup-size-hairline), transparent var(--castup-size-hairline)),
    linear-gradient(to bottom, var(--castup-grid-veil-line) var(--castup-size-hairline), transparent var(--castup-size-hairline));
  background-size: var(--castup-size-grid-veil) var(--castup-size-grid-veil);
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 0%, transparent 100%);
}

/* DESIGN.md §4.4 shared top bar, with only the brand: there is no app to link to yet. */
.top-bar {
  position: sticky;
  top: var(--castup-space-0);
  z-index: var(--castup-z-sticky);
  border-bottom: var(--castup-size-hairline) solid var(--castup-border);
  background-color: var(--castup-surface);
}

.top-bar-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--castup-container-landing);
  min-height: var(--castup-size-top-bar);
  margin-inline: auto;
  padding: var(--castup-space-2) var(--castup-space-4);
}

.top-bar-brand {
  display: flex;
  align-items: center;
  gap: var(--castup-space-3);
}

.top-bar-mark {
  flex-shrink: 0;
  width: var(--castup-icon-lg);
  height: var(--castup-icon-lg);
}

.top-bar-name {
  font-family: var(--castup-font-display);
  font-size: var(--castup-type-title-size);
  font-weight: var(--castup-type-title-weight);
  line-height: var(--castup-type-title-leading);
  white-space: nowrap;
  color: var(--castup-text-primary);
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Also the hero mark's clear space: 29% of its ~84px visible height is ~24px (§1.3). */
  gap: var(--castup-space-6);
  width: 100%;
  max-width: var(--castup-container-landing);
  margin-inline: auto;
  padding: var(--castup-space-16) var(--castup-space-6);
  text-align: center;
}

.hero-mark {
  width: var(--castup-size-mark-hero);
  height: var(--castup-size-mark-hero);
}

/* DESIGN.md §4.5 pill geometry, with a 1px inset ring so its ground holds an edge on the wash. */
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--castup-space-2);
  padding: var(--castup-space-1) var(--castup-space-3);
  border-radius: var(--castup-radius-full);
  background-color: var(--castup-primary-subtle);
  box-shadow: inset 0 0 0 var(--castup-size-hairline) var(--castup-border);
  color: var(--castup-primary-text);
  font-size: var(--castup-type-caption-size);
  font-weight: var(--castup-type-title-weight);
  line-height: var(--castup-type-caption-leading);
}

.status-dot {
  flex-shrink: 0;
  width: var(--castup-space-2);
  height: var(--castup-space-2);
  border-radius: var(--castup-radius-full);
  background-color: var(--castup-primary-text);
}

.headline {
  max-width: var(--castup-container-prose);
  font-family: var(--castup-font-display);
  font-size: var(--castup-type-display-md-size);
  font-weight: var(--castup-type-display-md-weight);
  line-height: var(--castup-type-display-md-leading);
  color: var(--castup-text-primary);
}

.tagline {
  max-width: var(--castup-container-prose);
  font-size: var(--castup-type-body-lg-size);
  font-weight: var(--castup-type-body-lg-weight);
  line-height: var(--castup-type-body-lg-leading);
  color: var(--castup-text-secondary);
  text-wrap: balance;
}

.signal {
  width: calc(var(--castup-size-mark-hero) * 2);
  max-width: 100%;
  height: var(--castup-size-accent-rule);
  border-radius: var(--castup-radius-full);
  background-image: var(--castup-gradient-brand);
}

.strap {
  font-size: var(--castup-type-body-sm-size);
  font-weight: var(--castup-type-body-sm-weight);
  line-height: var(--castup-type-body-sm-leading);
  color: var(--castup-text-muted);
  text-wrap: balance;
}

/* DESIGN.md §4.4 site footer. */
.site-footer {
  border-top: var(--castup-size-hairline) solid var(--castup-border);
  background-color: var(--castup-surface);
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--castup-space-3);
  width: 100%;
  max-width: var(--castup-container-landing);
  margin-inline: auto;
  padding: var(--castup-space-6) var(--castup-space-4);
}

.lockup {
  display: flex;
  align-items: center;
  gap: var(--castup-space-2);
}

.lockup-mark {
  flex-shrink: 0;
  width: var(--castup-icon-md);
  height: var(--castup-icon-md);
}

.lockup-name {
  font-family: var(--castup-font-display);
  font-size: var(--castup-type-body-md-size);
  font-weight: var(--castup-type-title-weight);
  line-height: var(--castup-type-body-md-leading);
  white-space: nowrap;
  color: var(--castup-text-primary);
}

.site-footer-lines {
  display: flex;
  flex-direction: column;
  gap: var(--castup-space-1);
}

.note {
  font-size: var(--castup-type-body-sm-size);
  line-height: var(--castup-type-body-sm-leading);
  color: var(--castup-text-secondary);
}

.copyright {
  font-size: var(--castup-type-caption-size);
  font-weight: var(--castup-type-caption-weight);
  line-height: var(--castup-type-caption-leading);
  color: var(--castup-text-muted);
}

/* Media queries cannot read var(): these mirror --castup-bp-md and --castup-bp-lg. */
@media (min-width: 768px) {
  .site-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .site-footer-lines {
    align-items: flex-end;
    text-align: end;
  }
}

@media (min-width: 1024px) {
  .headline {
    font-size: var(--castup-type-display-xl-size);
    font-weight: var(--castup-type-display-xl-weight);
    line-height: var(--castup-type-display-xl-leading);
  }
}

.hero-mark {
  animation: castup-mark-reveal var(--castup-motion-brand) var(--castup-ease-out-back) backwards;
}

.status,
.headline,
.tagline,
.signal,
.strap {
  animation: castup-rise var(--castup-motion-page) var(--castup-ease-out) backwards;
}

.status { animation-delay: calc(var(--castup-motion-stagger) * 1); }
.headline { animation-delay: calc(var(--castup-motion-stagger) * 2); }
.tagline { animation-delay: calc(var(--castup-motion-stagger) * 3); }
.signal { animation-delay: calc(var(--castup-motion-stagger) * 4); }
.strap { animation-delay: calc(var(--castup-motion-stagger) * 5); }

@keyframes castup-mark-reveal {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes castup-rise {
  from {
    opacity: 0;
    transform: translateY(var(--castup-space-3));
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes castup-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* DESIGN.md §7: under reduced motion nothing moves; entrances become 100ms opacity fades. */
@media (prefers-reduced-motion: reduce) {
  .hero-mark,
  .status,
  .headline,
  .tagline,
  .signal,
  .strap {
    animation: castup-fade var(--castup-motion-instant) var(--castup-ease-out) backwards;
  }
}
