/* Rawdestiny — static site styles. No build step. */

:root {
  /* Color — restrained pastel-plum, matching the Rawdestiny landing */
  --bg:        oklch(0.99 0.006 320);
  --bg-deep:   oklch(0.972 0.011 325);
  --surface:   #ffffff;
  --ink:       oklch(0.27 0.03 312);    /* body text — high contrast */
  --ink-soft:  oklch(0.46 0.04 314);    /* secondary text — >=4.5:1 on --bg */
  --accent:    oklch(0.62 0.17 356);    /* rose — decorative */
  --accent-ink: oklch(0.49 0.17 356);   /* link text — darker for contrast */
  --accent-2:  oklch(0.58 0.13 290);    /* soft violet, used sparingly */
  --border:    oklch(0.91 0.012 320);
  --border-strong: oklch(0.85 0.015 320);
  --hairline:  oklch(0.945 0.009 322);

  /* Type */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  /* Rhythm */
  --measure: 68ch;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 16px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* z-scale */
  --z-aurora: 0;
  --z-base: 1;
  --z-header: 100;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

::selection { background: oklch(0.62 0.17 356 / 0.16); }

a {
  color: var(--accent-ink);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration: underline; }

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

/* ---------- Ambient backdrop ---------- */
.aurora {
  position: fixed;
  inset: -20vh -10vw auto -10vw;
  height: 95vh;
  z-index: var(--z-aurora);
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.9;
  background:
    radial-gradient(38vw 38vw at 18% 8%, oklch(0.78 0.13 45 / 0.42), transparent 70%),
    radial-gradient(34vw 34vw at 86% 2%, oklch(0.80 0.10 78 / 0.40), transparent 70%),
    radial-gradient(40vw 40vw at 62% 26%, oklch(0.80 0.07 160 / 0.28), transparent 72%);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(0,2.5%,0) scale(1.06); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad);
  background: oklch(0.99 0.006 320 / 0.72);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 0.06em;
}
.wordmark:hover { text-decoration: none; }
.wordmark .dot { color: var(--accent); }

.header-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 1.75rem);
  font-size: 0.95rem;
  align-items: center;
}
.header-nav a { color: var(--ink-soft); }
.header-nav a:hover { color: var(--ink); text-decoration: none; }

/* ---------- Layout shells ---------- */
.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  z-index: var(--z-base);
}

/* ---------- Landing ---------- */
.hero {
  padding: clamp(3.5rem, 13vh, 8rem) 0 clamp(2rem, 6vh, 3.5rem);
  animation: rise 0.8s var(--ease) both;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}
.hero .eyebrow .pip {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px oklch(0.62 0.085 158 / 0.18);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 7.5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.hero h1 .warm { color: var(--accent); font-style: italic; }
.hero p.lede {
  font-size: clamp(1.1rem, 2.5vw, 1.28rem);
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 0;
  text-wrap: pretty;
}

/* Values — lightweight, not boxed cards */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem 2rem;
  padding: clamp(2.5rem, 7vh, 4rem) 0 clamp(1.5rem, 4vh, 2.5rem);
  border-top: 1px solid var(--hairline);
  margin-top: clamp(2rem, 6vh, 3.5rem);
  animation: rise 0.8s 0.06s var(--ease) both;
}
.value .ic {
  width: 30px; height: 30px;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.value h3 { margin: 0 0 0.25rem; font-size: 1.02rem; color: var(--ink); }
.value p { margin: 0; font-size: 0.96rem; color: var(--ink-soft); text-wrap: pretty; }

/* Products */
.section-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 1.1rem;
}
.products {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 1rem;
  animation: rise 0.8s 0.12s var(--ease) both;
}
.product {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px oklch(0.5 0.05 320 / 0.04), 0 8px 24px -16px oklch(0.5 0.08 320 / 0.18);
  transition: border-color 0.28s var(--ease), transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
a.product:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 1px 2px oklch(0.5 0.05 320 / 0.05), 0 18px 40px -20px oklch(0.5 0.1 330 / 0.30);
  text-decoration: none;
}
.product .badge {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--surface);
  background: linear-gradient(150deg, oklch(0.70 0.15 48), oklch(0.62 0.16 32));
}
.product .meta { flex: 1; }
.product .meta h3 { margin: 0 0 0.2rem; font-size: 1.15rem; color: var(--ink); }
.product .meta p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.product .meta .tag {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.product .arrow { flex: none; color: var(--ink-soft); transition: transform 0.28s var(--ease), color 0.28s var(--ease); }
a.product:hover .arrow { transform: translateX(3px); color: var(--accent); }

.upcoming {
  margin-top: 0.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* ---------- Footer ---------- */
footer.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  position: relative;
  z-index: var(--z-base);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-size: 0.92rem;
}
.site-footer nav a { color: var(--ink-soft); }
.site-footer nav a:hover { color: var(--ink); }
.site-footer .muted { color: var(--ink-soft); font-size: 0.88rem; }

/* ---------- Legal / prose pages ---------- */
.doc {
  padding: clamp(2rem, 6vh, 3.5rem) 0 1rem;
  max-width: var(--measure);
  animation: rise 0.6s var(--ease) both;
}
.doc .back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.doc h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}
.doc .doc-meta {
  margin: 0 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.doc .doc-meta div { margin: 0.15rem 0; }
.doc .doc-meta strong { color: var(--ink); font-weight: 600; }

.prose { font-size: 1.0625rem; }
.prose h2 {
  font-size: 1.34rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.25rem;
}
.prose h3 { font-size: 1.08rem; margin: 1.75rem 0 0.5rem; }
.prose p { margin: 0 0 1rem; text-wrap: pretty; }
.prose ul { margin: 0 0 1.1rem; padding-left: 1.25rem; }
.prose li { margin: 0.3rem 0; }
.prose strong { font-weight: 600; }
.prose a { color: var(--accent-ink); }
.prose code { font-family: var(--mono); font-size: 0.92em; background: var(--bg-deep); padding: 0.1em 0.35em; border-radius: 5px; }

.prose .callout {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  background: oklch(0.972 0.013 330);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
}
.prose .callout p:last-child { margin-bottom: 0; }
.prose .note { margin: 2rem 0 0; font-size: 0.92rem; color: var(--ink-soft); font-style: italic; }

/* Support page contact block */
.contact-card {
  margin: 1.75rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-card .email { font-size: 1.2rem; font-weight: 600; display: inline-block; margin-top: 0.25rem; }

/* ---------- Motion ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .aurora { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 540px) {
  body { font-size: 1.02rem; }
  .header-nav { gap: 1rem; }
  .product { gap: 1rem; padding: 1.25rem; }
}
