/* SOMA's website. Colours, type, spacing and motion come from the app's design tokens
 * (tokens.css, copied from web/src/ui by build.mjs); this file only lays them out.
 * The final look follows the desktop-first redesign. */

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--type-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  margin: 0 0 var(--space-3);
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.625rem;
  line-height: 1.25;
}

h3 {
  font: var(--type-headline);
  font-size: 1.125rem;
}

p {
  margin: 0 0 var(--space-3);
}

.frame {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: var(--space-3);
  top: -4rem;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border-radius: var(--radius-md);
}

.skip:focus {
  top: var(--space-3);
}

/* Top bar and footer */
.top {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.top-row,
.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.top-row {
  min-height: 3.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  text-decoration: none;
}

nav {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--text);
}

nav a.signin {
  color: var(--brass);
  font-weight: 600;
}

.foot {
  margin-top: var(--space-6);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font: var(--type-footnote);
}

/* Bands */
.band {
  padding-top: calc(var(--space-6) * 1.5);
}

.narrow {
  max-width: calc(var(--prose-max, 42rem) + 2 * var(--gutter));
}

.center {
  text-align: center;
}

.eyebrow {
  color: var(--brass);
  font: var(--type-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 36rem;
}

.small {
  font: var(--type-footnote);
}

.muted {
  color: var(--text-muted);
}

/* Hero */
.hero {
  padding: calc(var(--space-6) * 2) 0 var(--space-6);
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-6);
}

.hero-art {
  display: flex;
  justify-content: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-3);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  min-height: var(--control);
  padding: 0 var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--dur-quick) var(--ease-standard);
}

.button:hover {
  background: var(--hover);
}

.button.primary {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--brass-contrast);
}

.button.primary:hover {
  background: var(--brass-hover);
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.card {
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

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

.platform {
  margin-bottom: var(--space-4);
}

.soon {
  color: var(--brass);
  font-weight: 600;
}

/* How it works */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-6);
}

.steps {
  margin: 0;
  padding-left: 1.25rem;
}

.steps li {
  margin-bottom: var(--space-4);
  padding-left: var(--space-2);
}

.art img {
  display: block;
  width: 100%;
  max-width: 20rem;
  height: auto;
  margin: 0 auto;
}

/* Questions */
.faq details {
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  margin: var(--space-2) 0 0;
  color: var(--text-muted);
}

.cta {
  text-align: center;
}

.prose h2 {
  font-size: 1.25rem;
  margin-top: var(--space-5);
}

/* The assistant: the app's presence head (web/src/ui/Presence), blinking now and then. */
.presence {
  width: min(16rem, 60vw);
  height: auto;
  overflow: visible;
}

.presence .halo {
  fill: var(--brass-soft);
  opacity: 0.55;
}

.presence .body {
  fill: var(--brass-soft);
}

.presence .nucleus {
  fill: var(--brass);
}

.presence .eyes rect {
  fill: var(--brass-contrast);
}

.presence .look,
.presence .eyes,
.presence .lids {
  transform-box: fill-box;
  transform-origin: center;
}

.presence .look {
  transition: transform var(--follow-ease) cubic-bezier(0.3, 0.7, 0.3, 1);
}

.presence .lids {
  transform-origin: 50% 60%;
}

@media (prefers-reduced-motion: no-preference) {
  .presence.blinking .lids {
    animation: blink var(--blink-duration) cubic-bezier(0.45, 0, 0.55, 1) 1;
  }
}

@keyframes blink {
  0%,
  100% {
    transform: scaleY(1);
  }
  45%,
  55% {
    transform: scaleY(0.12);
  }
}

/* Narrow windows */
@media (max-width: 52rem) {
  .hero-row,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

  .presence {
    width: 9rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

.card.wide {
  padding: var(--space-6);
}

.card.wide h2 {
  margin-bottom: var(--space-3);
}
