/* dyne.ai -- the company's holding page. One fixed dark-slate look; no light theme. */

@font-face {
  font-family: "Lato";
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  src: url("fonts/lato-black.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("fonts/lato-light.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/lato-regular.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --ground: #1e2531;       /* deep slate, blue cast: the page floor */
  --mist-low: #2b3542;     /* body of the mist */
  --mist-high: #4a5a70;    /* the lit pocket behind the word */
  --ink: #e9eef5;          /* the word */
  --ink-soft: #a9b4c3;     /* tagline, footer */
  --ink-faint: #7a8696;    /* copyright, the optional link */
  --rule: rgba(233, 238, 245, 0.22);
  --focus: #c9d6e8;
  --sans: "Lato", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

/* Still mist for browsers without the canvas (or before it runs): the same light pocket, not moving. */
.mist {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(90% 70% at 50% 46%, var(--mist-high) 0%, rgba(74, 90, 112, 0) 70%),
    radial-gradient(70% 60% at 18% 80%, var(--mist-low) 0%, rgba(43, 53, 66, 0) 70%),
    radial-gradient(60% 55% at 84% 18%, var(--mist-low) 0%, rgba(43, 53, 66, 0) 70%),
    var(--ground);
}
.mist canvas {
  position: absolute;
  inset: -6vmax;
  width: calc(100% + 12vmax);
  height: calc(100% + 12vmax);
  filter: blur(22px);
  opacity: 0;
  transition: opacity 2.4s ease;
}
.mist.is-live { background: var(--ground); }
.mist.is-live canvas { opacity: 1; }

/* Film grain keeps the big soft gradients from banding. The texture is an inline SVG: no request. */
.mist::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

/* A soft vignette so the edges stay darker than the middle at every aspect ratio. */
.mist::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 50%, rgba(30, 37, 49, 0) 55%, rgba(22, 27, 36, 0.55) 100%);
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto 1fr auto;
  --edge: clamp(1.25rem, 2.2vw, 3.5rem);
  padding: max(var(--edge), env(safe-area-inset-top)) max(var(--edge), env(safe-area-inset-right)) max(var(--edge), env(safe-area-inset-bottom)) max(var(--edge), env(safe-area-inset-left));
}

.mark {
  grid-row: 2;
  text-align: center;
  padding: 0 0.5rem;
}

.word {
  margin: 0;
  font-weight: 900;
  font-size: clamp(3.75rem, 14vw, 16rem);
  line-height: 0.95;
  letter-spacing: 0.18em;
  padding-left: 0.18em; /* the tracking after the last letter, balanced on the left */
  text-transform: uppercase;
  color: var(--ink);
  /* A faint cool lift off the mist, not a glow. */
  text-shadow: 0 0.015em 0.08em rgba(12, 16, 24, 0.45);
}

.rule {
  width: 2.75rem;
  height: 1px;
  margin: clamp(1.25rem, 3.2vw, 2.5rem) auto clamp(1rem, 2.6vw, 2rem);
  background: var(--rule);
}

.line {
  margin: 0;
  font-weight: 300;
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.625rem);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.foot {
  grid-row: 4;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  font-size: clamp(0.9375rem, 0.8rem + 0.3vw, 1.25rem);
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}
.foot .mail { color: var(--ink-soft); user-select: all; }
.foot .copy { color: var(--ink-faint); font-weight: 300; }
.aside {
  color: var(--ink-faint);
  font-weight: 300;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.aside:hover { color: var(--ink-soft); border-bottom-color: var(--rule); }
.aside:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 2px; }

@media (max-width: 480px) {
  .foot { justify-content: center; text-align: center; gap: 0.5rem 1.25rem; }
  .foot > * { flex: 0 0 100%; }
}

/* The one moment: the word and its line surface out of the mist on load. */
@media (prefers-reduced-motion: no-preference) {
  .mark { animation: surface 1.8s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
  .foot { animation: surface 1.8s 0.6s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
  @keyframes surface {
    from { opacity: 0; transform: translateY(0.35rem); }
    to { opacity: 1; transform: none; }
  }
}

/* A link inside the tagline (the 404 page) reads as one: lit like the word, with its underline. */
.line .aside { color: var(--ink); border-bottom-color: var(--rule); }

/* Variant B: a restrained small-caps line (letter-spaced capitals in Lato Light) under the word. */
.line.caps {
  font-size: clamp(0.8125rem, 0.7rem + 0.4vw, 1.25rem);
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  text-transform: uppercase;
}
