/* Deyra — shared styles for deyra.net
   One stylesheet for every page, so the landing page and the legal pages
   cannot drift apart visually the way their wording once did. */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --bg: #0A0507;
  --text: #F2ECEE;
  --muted: #9A8F92;
  --faint: #6E6467;
  --line: rgba(255, 255, 255, .09);
  --line-lit: rgba(255, 255, 255, .18);
  --surface: rgba(255, 255, 255, .035);
  /* Sampled from the logo gradient, so the UI and the mark agree. */
  --cherry: #C01530;
  --cherry-lit: #E24A63;
  --radius: 1.25rem;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fixed so the glow stays put while long legal pages scroll past it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60rem 40rem at 50% -10%, rgba(192, 21, 48, .28), transparent 70%),
    radial-gradient(40rem 30rem at 100% 100%, rgba(192, 21, 48, .10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.wrap.narrow { max-width: 44rem; }

a { color: var(--cherry-lit); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cherry-lit);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Brand lockup ------------------------------------------------------- */
/* Mark, then "Deyra" with "network" justified to exactly the same width.
   Mirrors the app's top bar: .words shrinks to its widest child, and the
   letters of "network" are spread across it with space-between. */

.lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
}

.lockup .mark {
  display: block;
  height: 3.2rem;
  width: auto;
}

.lockup .words {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
}

.lockup .word {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1;
}

/* The tagline is absolutely positioned inside a reserved strip so it cannot
   contribute to the lockup's intrinsic width. That pins the width to "Deyra"
   alone, and space-between then spreads the letters across exactly that. */
.lockup .subwrap {
  position: relative;
  height: 1.15rem;
}

.lockup .sub {
  position: absolute;
  left: 0;
  right: 0;
  top: .1rem;
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text);
}

.lockup .sub i { font-style: normal; }

/* --- Landing ------------------------------------------------------------ */

.hero { padding: 4.5rem 0 0; text-align: center; }

.hero h1 {
  margin: 2.5rem 0 0;
  font-size: clamp(2.2rem, 6.5vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -.035em;
  font-weight: 800;
}

.tagline {
  margin: 1.25rem auto 0;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.6vw, 1.28rem);
  color: var(--muted);
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2.25rem;
  padding: .55rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.badge .dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--cherry-lit);
  flex: none;
}

@media (prefers-reduced-motion: no-preference) {
  .badge .dot { animation: pulse 2.4s ease-out infinite; }

  @keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(226, 74, 99, .55); }
    70%  { box-shadow: 0 0 0 .7rem rgba(226, 74, 99, 0); }
    100% { box-shadow: 0 0 0 0 rgba(226, 74, 99, 0); }
  }
}

.platforms {
  margin: 1.4rem 0 0;
  color: var(--faint);
  font-size: .92rem;
}

.section { margin: 6rem 0 0; }

.section-title {
  margin: 0 0 2rem;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.025em;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

/* Four cards would otherwise land 3 + 1 on a desktop width. */
.grid.pair { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 38rem) {
  .grid.pair { grid-template-columns: 1fr; }
}

.steps { counter-reset: step; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.6rem 1.5rem;
}

.step { padding-top: 1.7rem; }

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: .95rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cherry-lit), var(--cherry));
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
}

.card h3 {
  margin: 0 0 .55rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.012em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.6;
}

.contact {
  margin: 6rem 0 0;
  padding: 2.25rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.contact h2 { margin: 0 0 .5rem; font-size: 1.15rem; font-weight: 700; }
.contact p { margin: 0; color: var(--muted); font-size: .96rem; }

/* --- Document pages ----------------------------------------------------- */

.doc-top {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 2.5rem 0 0;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 600;
}

.doc-top:hover { color: var(--text); text-decoration: none; }
.doc-top .mark { display: block; height: 1.6rem; width: auto; }

.doc-header {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--line);
}

.doc-header h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 800;
}

.updated { margin: .85rem 0 0; color: var(--faint); font-size: .92rem; }

article { padding: .5rem 0 0; }

article h2 {
  margin: 2.9rem 0 .9rem;
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -.018em;
  scroll-margin-top: 1.5rem;
}

article p { margin: 0 0 1.1rem; }
article ul { margin: 0 0 1.1rem; padding-left: 1.25rem; }
article li { margin: 0 0 .55rem; }
article li::marker { color: var(--cherry-lit); }

strong { font-weight: 700; color: #fff; }

.callout {
  margin: 1.5rem 0 1.75rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cherry);
  border-radius: .9rem;
  background: var(--surface);
}

.callout p:last-child { margin-bottom: 0; }

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 3.5rem 0 0;
}

.doc-nav a {
  padding: .6rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .9rem;
}

.doc-nav a:hover {
  color: var(--text);
  border-color: var(--line-lit);
  text-decoration: none;
}

/* --- Footer ------------------------------------------------------------- */

footer {
  margin-top: 5rem;
  padding: 2rem 0 4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.75rem;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
  font-size: .9rem;
}

footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* --- Print -------------------------------------------------------------- */
/* Legal pages get printed and filed. Make that produce something readable. */

@media print {
  body { background: #fff; color: #000; }
  body::before,
  .doc-nav,
  .doc-top { display: none; }
  .wrap, .wrap.narrow { max-width: none; padding: 0; }
  a { color: #000; text-decoration: underline; }
  strong { color: #000; }
  .callout { border: 1px solid #999; background: none; }
  .updated, article p, article li { color: #000; }
  footer { border-top: 1px solid #999; color: #000; }
}
