/* woxpas.ai: one stylesheet for every page. System fonts, light and dark. */

:root {
  color-scheme: light dark;
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --text: #0c0c0e;
  --muted: #55555d;
  --border: rgb(12 12 14 / 0.09);
  --border-strong: rgb(12 12 14 / 0.18);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 12px 32px -16px rgb(0 0 0 / 0.16);
  --shadow-hover: 0 1px 2px rgb(0 0 0 / 0.05), 0 24px 48px -20px rgb(0 0 0 / 0.24);
  --dot: rgb(12 12 14 / 0.07);

  /* Brand: Woxpas teal. Project pages override these. */
  --brand: #0f766e;          /* text and buttons: 5.2:1 on --bg */
  --brand-vivid: #14b8a6;    /* glows and decoration */
  --on-brand: #ffffff;

  --radius: 20px;
  --wrap: 68rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --surface: #111114;
    --surface-2: #17171b;
    --text: #f5f5f6;
    --muted: #a1a1aa;
    --border: rgb(255 255 255 / 0.08);
    --border-strong: rgb(255 255 255 / 0.18);
    --shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 12px 32px -16px rgb(0 0 0 / 0.6);
    --shadow-hover: 0 1px 0 rgb(255 255 255 / 0.06) inset, 0 24px 48px -20px rgb(0 0 0 / 0.8);
    --dot: rgb(255 255 255 / 0.06);
    --brand: #2dd4bf;
    --brand-vivid: #2dd4bf;
    --on-brand: #04211f;
  }
}

/* Project colours, from each logo. */
.theme-starryeyes {
  --brand: #2b59b8;
  --brand-vivid: #3b6fd8;
  --on-brand: #ffffff;
}

.theme-depart {
  --brand: #975a04;
  --brand-vivid: #ffb800;
  --on-brand: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .theme-starryeyes {
    --brand: #7fb2ff;
    --brand-vivid: #7fb2ff;
    --on-brand: #0b1630;
  }

  .theme-depart {
    --brand: #ffb800;
    --brand-vivid: #ffb800;
    --on-brand: #1a1200;
  }
}

/* Base */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(56rem 28rem at 50% -12rem, color-mix(in srgb, var(--brand-vivid) 16%, transparent), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header (project pages) */

.site-header {
  padding-block: 1.25rem;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

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

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(3.5rem, 11vw, 7rem) clamp(2.5rem, 7vw, 4.5rem);
}

/* A faint dot grid that fades out behind the hero. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero-logo {
  display: block;
  margin-bottom: 1.75rem;
  border-radius: 16px;
  box-shadow: 0 12px 40px -12px color-mix(in srgb, var(--brand-vivid) 55%, transparent);
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.lede {
  margin-top: 1.25rem;
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* Tags */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.625rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 550;
  line-height: 1.6;
  white-space: nowrap;
}

.tag-brand {
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  background: color-mix(in srgb, var(--brand-vivid) 10%, transparent);
  color: var(--brand);
}

.tag-dev::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgb(245 158 11 / 0.2);
}

/* Sections */

.section {
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}

.section-label {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  max-width: 24ch;
  margin-bottom: 2rem;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 680;
  letter-spacing: -0.03em;
}

/* Project cards (hub) */

.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--brand-vivid) 45%, var(--border));
}

.card-media {
  position: relative;
  display: grid;
  place-items: end center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 50% 100%, color-mix(in srgb, var(--brand-vivid) 28%, transparent), transparent 70%),
    #000;
  border-bottom: 1px solid var(--border);
}

.card-media .screen {
  display: block;
  width: 62%;
  max-width: 17rem;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
  margin-bottom: -18%;
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.14), 0 -8px 40px -8px color-mix(in srgb, var(--brand-vivid) 50%, transparent);
  transition: transform 0.4s ease;
}

.card:hover .card-media .screen {
  transform: translateY(-6px);
}

.card-media .flow {
  align-self: center;
}

/* The diagram sets its own height. */
.card-feature .card-media {
  aspect-ratio: auto;
  place-items: center;
}

@media (min-width: 46rem) {
  .projects {
    grid-template-columns: 1fr 1fr;
  }

  .card-feature {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1.1fr;
    grid-template-rows: auto;
  }

  .card-feature .card-media {
    order: 2;
    aspect-ratio: auto;
    min-height: 18rem;
    border-bottom: 0;
    border-left: 1px solid var(--border);
  }
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 1.5rem 1.375rem;
}

.card-feature .card-body {
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.card-icon {
  flex: none;
  border-radius: 11px;
  box-shadow: 0 0 0 1px var(--border);
}

.card h3 {
  font-size: 1.375rem;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.card-feature h3 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.03em;
}

.card h3 a {
  color: var(--text);
  text-decoration: none;
}

/* The project link covers the whole card; other links sit above it. */
.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}

.card h3 a:focus-visible {
  outline: none;
}

.card h3 a:focus-visible::after {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

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

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.more {
  color: var(--brand);
}

.more::after,
.arrow::after {
  content: "→";
  display: inline-block;
  margin-left: 0.375rem;
  transition: transform 0.25s ease;
}

.card:hover .more::after {
  transform: translateX(4px);
}

.card-foot a {
  position: relative;
  z-index: 2;
  color: var(--muted);
}

.card-foot a:hover {
  color: var(--text);
}

/* Memory flow diagram: sources → Memory → agents */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 2rem 1.25rem;
  color: #e4e4e7;
  font-size: 0.8125rem;
  font-weight: 550;
}

.flow-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.flow-col:last-child {
  align-items: flex-end;
}

.chip {
  position: relative;
  padding: 0.3125rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.05);
  white-space: nowrap;
}

.flow-core {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0.125rem;
  padding: 1.125rem 1rem;
  border: 1px solid color-mix(in srgb, var(--brand-vivid) 60%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--brand-vivid) 14%, #000);
  box-shadow: 0 0 56px -8px color-mix(in srgb, var(--brand-vivid) 65%, transparent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
}

/* Connector lines either side of the core. */
.flow-core::before,
.flow-core::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.75rem;
  height: 1px;
  background: linear-gradient(90deg, rgb(255 255 255 / 0.1), color-mix(in srgb, var(--brand-vivid) 80%, transparent));
}

.flow-core::before {
  right: 100%;
}

.flow-core::after {
  left: 100%;
  transform: scaleX(-1);
}

.flow-core small {
  color: #a1a1aa;
  font-size: 0.75rem;
  font-weight: 500;
}

@media (max-width: 30rem) {
  .flow {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1rem;
  }

  .flow-col,
  .flow-col:last-child {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  .flow-core::before,
  .flow-core::after {
    display: none;
  }
}

/* Project pages */

.project-hero {
  display: grid;
  overflow-x: clip; /* the screen's glow must not widen the page on phones */
  gap: clamp(3rem, 7vw, 4rem);
  align-items: center;
}

@media (min-width: 52rem) {
  .project-hero {
    grid-template-columns: 1.05fr 1fr;
  }
}

.app-icon {
  display: block;
  margin-bottom: 1.75rem;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px var(--border),
    0 16px 48px -16px color-mix(in srgb, var(--brand-vivid) 70%, transparent);
}

.project-hero .intro {
  max-width: 38rem;
  margin-top: 1.5rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.375rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 650;
  text-decoration: none;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.2) inset,
    0 10px 28px -12px color-mix(in srgb, var(--brand-vivid) 80%, transparent);
  transition: transform 0.2s ease, filter 0.2s ease, background-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.button-quiet {
  background: transparent;
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border-strong) inset;
}

.button-quiet:hover {
  filter: none;
  background: var(--surface-2);
}

.note {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* A 600×600 glasses display, shown as a framed black square. */
.display {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
}

.display::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-vivid) 32%, transparent), transparent);
  pointer-events: none;
}

.display > img,
.display > .flow-panel {
  display: block;
  width: 100%;
  border-radius: 28px;
  background: #000;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.1),
    0 0 0 8px color-mix(in srgb, var(--text) 6%, transparent),
    0 40px 80px -32px rgb(0 0 0 / 0.55);
}

.display figcaption,
.gallery figcaption {
  margin-top: 1.125rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.flow-panel {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background:
    radial-gradient(70% 70% at 50% 50%, color-mix(in srgb, var(--brand-vivid) 16%, transparent), transparent 70%),
    #000 !important;
}

/* Feature grid */

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

@media (min-width: 40rem) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 60rem) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.features li {
  padding: 1.625rem 1.5rem;
  background: var(--surface);
}

.features h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.features h3::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-vivid);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-vivid) 20%, transparent);
}

.features p {
  color: var(--muted);
  font-size: 0.96875rem;
}

/* Screen gallery */

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  display: block;
  width: 100%;
  border-radius: 22px;
  background: #000;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 24px 48px -24px rgb(0 0 0 / 0.5);
}

/* Steps */

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 46rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps li {
  counter-increment: step;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-vivid) 15%, transparent);
  color: var(--brand);
  font-size: 0.9375rem;
  font-weight: 700;
}

.steps strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
  font-weight: 650;
}

/* Credits */

.credits-intro {
  max-width: 44rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
}

.credits {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

.credits li {
  display: grid;
  gap: 0.25rem 2rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

@media (min-width: 46rem) {
  .credits li {
    grid-template-columns: 14rem 1fr;
  }
}

.credit-what {
  color: var(--text);
  font-weight: 600;
}

/* Header nav */

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

/* About and Contact (hub) */

.split {
  display: grid;
  gap: 2.5rem 4rem;
  align-items: start;
}

@media (min-width: 52rem) {
  .split {
    grid-template-columns: 1fr 1.15fr;
  }
}

.split .section-title {
  margin-bottom: 1.25rem;
}

.section-title {
  line-height: 1.15;
}

.hero.center h1 {
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  letter-spacing: -0.035em;
}

.body-muted {
  max-width: 34rem;
  color: var(--muted);
}

.body-muted + .body-muted {
  margin-top: 1rem;
}

.small {
  font-size: 0.9375rem;
}

.person {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  margin: 1.75rem 0 0;
}

.person img {
  flex: none;
  border-radius: 26px;
  box-shadow:
    0 0 0 1px var(--border),
    0 16px 40px -18px color-mix(in srgb, var(--brand-vivid) 60%, transparent);
}

.person figcaption {
  color: var(--muted);
}

.person strong {
  display: block;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 650;
}

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

.contact-form {
  display: grid;
  gap: 1.125rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field-row {
  display: grid;
  align-items: start;
  gap: 1.125rem;
}

@media (min-width: 34rem) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 0.375rem;
  min-width: 0;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.field textarea {
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 12px;
}

/* Shown by the browser's own validation, after someone has interacted. */
.field-error {
  display: none;
  color: #b42318;
  font-size: 0.84375rem;
}

.field :user-invalid {
  border: 2px solid #b42318;
}

.field :user-invalid ~ .field-error {
  display: block;
}

@media (prefers-color-scheme: dark) {
  .field-error {
    color: #fda29b;
  }

  .field :user-invalid {
    border-color: #fda29b;
  }
}

/* Honeypot: off-screen for people, still in the form for bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.form-foot p {
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.84375rem;
}

.form-foot .button {
  border: 0;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

/* Contact result pages */

.result-icon {
  display: inline-grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-vivid) 15%, transparent);
  color: var(--brand);
}

.result-icon-error {
  background: rgb(180 35 24 / 0.12);
  color: #b42318;
}

@media (prefers-color-scheme: dark) {
  .result-icon-error {
    color: #fda29b;
  }
}

.center .note {
  max-width: 34rem;
  margin-inline: auto;
}

/* Footer */

.site-footer {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

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

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

/* 404 */

.center {
  text-align: center;
}

.center .lede {
  margin-inline: auto;
}

.center .actions {
  justify-content: center;
}

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