/* ===========================================================
   Awakenn — awakennapp.com
   Site-level styles. Builds on ds/colors_and_type.css.
   =========================================================== */

@import url("ds/colors_and_type.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--fg-1);
  background: var(--aw-mk-bg-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 17px;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ── Layout ───────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
}

/* ── Header / Nav ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--aw-mk-bg-paper);
  border-bottom: 1px solid rgba(27, 23, 20, 0.08);
  overflow: visible;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
/* ── Brand wordmark ──────────────────────────────────────
   Plain Fraunces wordmark. (TODO: refine into a custom
   cross-k logo glyph; current inline overlay execution
   was rough, parking this for a proper logo file.) */
.brand {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--aw-mk-bg-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--aw-mk-bg-ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1px;
  opacity: 0.78;
  transition: opacity 150ms var(--ease-out);
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active {
  opacity: 1;
  position: relative;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: -6px;
  height: 1.5px;
  background: var(--aw-mk-bg-ink);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--aw-mk-bg-ochre);
  color: var(--aw-mk-bg-ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
  transition: opacity 150ms var(--ease-out), transform 100ms var(--ease-out);
}
.nav-cta:hover { opacity: 0.92; transform: translateY(-1px); }

/* Mobile menu */
.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px; height: 40px;
  cursor: pointer;
  color: var(--aw-mk-bg-ink);
}
@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    background: var(--aw-mk-bg-paper);
    padding: 16px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid rgba(27,23,20,0.08);
  }
  .nav-links.open + .nav-cta { display: none; }
}

/* ── Editorial type helpers ───────────────────────────────── */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--aw-mk-bg-ink);
  opacity: 0.55;
}
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--aw-mk-bg-ink);
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--aw-mk-bg-ink);
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--aw-mk-bg-ink);
  margin: 0;
}
.lede {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--aw-mk-bg-ink);
  opacity: 0.78;
}
.prose {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--aw-mk-bg-ink);
  opacity: 0.85;
  text-wrap: pretty;
}
.prose p { margin: 0 0 18px; }
.prose p:last-child { margin-bottom: 0; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  white-space: nowrap;
  transition: transform 100ms var(--ease-out), opacity 150ms var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--aw-mk-bg-ink);
  color: var(--aw-mk-bg-paper);
}
.btn-primary:hover { opacity: 0.88; }
.btn-ghost {
  background: transparent;
  color: var(--aw-mk-bg-ink);
  border: 1.5px solid rgba(27,23,20,0.25);
}
.btn-ghost:hover { border-color: var(--aw-mk-bg-ink); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--aw-mk-bg-ink);
  color: var(--aw-mk-bg-paper);
  padding: 56px 0 24px;
  margin-top: 96px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 800px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px 28px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}
.footer-brand-block {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  font-size: 40px;
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--aw-mk-bg-paper);
  margin: 0 0 12px;
}
.footer-tag {
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.6;
  max-width: 32ch;
  margin: 0;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--aw-mk-bg-paper);
  opacity: 0.55;
  margin: 0 0 10px;
}
.footer-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 4px;
}
.footer-col a {
  color: var(--aw-mk-bg-paper);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.85;
  transition: opacity 150ms var(--ease-out);
}
.footer-col p {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.85;
  margin: 0 0 4px;
}
.footer-col a:hover { opacity: 1; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-top: 18px;
  font-size: 12px;
  opacity: 0.5;
  flex-wrap: wrap;
}
.footer-bottom p { margin: 0; line-height: 1.45; }

/* ── Annotations (hand-drawn underline / circle) ──────────── */
.anno {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.anno svg {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  overflow: visible;
}
.anno-underline svg {
  bottom: -8px;
  width: 102%;
  height: 14px;
}
.anno-underline-thick svg {
  bottom: -10px;
  width: 102%;
  height: 18px;
}
.anno-circle {
  white-space: nowrap;
}
.anno-circle svg {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 118%;
  height: 150%;
}
.anno path {
  fill: none;
  stroke: var(--aw-mk-bg-ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 1.6s var(--ease-out) forwards;
}
.anno.anno-delay-1 path { animation-delay: 0.4s; }
.anno.anno-delay-2 path { animation-delay: 0.8s; }
.anno.anno-delay-3 path { animation-delay: 1.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .anno path { animation: none; stroke-dashoffset: 0; }
}

/* ── Section spacing ──────────────────────────────────────── */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
@media (max-width: 720px) {
  section { padding: 64px 0; }
}

/* Hairline divider */
.rule { height: 1px; background: rgba(27,23,20,0.12); border: 0; margin: 0; }

/* Page header (used by sub-pages) */
.page-head {
  padding: 96px 0 56px;
}
.page-head .eyebrow { margin-bottom: 24px; display: inline-block; }
.page-head .display { max-width: 16ch; }

/* Tabular layout for legal/support pages */
.doc {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  padding: 24px 0 96px;
}
@media (max-width: 880px) {
  .doc { grid-template-columns: 1fr; gap: 32px; }
}
.doc-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  font-size: 14px;
  line-height: 1.8;
}
.doc-toc h5 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--aw-mk-bg-ink);
  opacity: 0.55;
  margin: 0 0 12px;
}
.doc-toc a {
  display: block;
  color: var(--aw-mk-bg-ink);
  text-decoration: none;
  opacity: 0.7;
  padding: 4px 0;
  transition: opacity 150ms var(--ease-out);
}
.doc-toc a:hover { opacity: 1; }

.doc-body h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.01em;
  margin: 56px 0 16px;
  color: var(--aw-mk-bg-ink);
  scroll-margin-top: 100px;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body p, .doc-body li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--aw-mk-bg-ink);
  opacity: 0.85;
}
.doc-body p { margin: 0 0 16px; }
.doc-body ul { padding-left: 20px; margin: 0 0 18px; }
.doc-body li { margin-bottom: 6px; }
.doc-body strong { font-weight: 600; }
.doc-body a { color: var(--aw-mk-bg-ink); text-decoration: underline; text-underline-offset: 3px; }
.doc-meta {
  font-size: 13px;
  opacity: 0.55;
  margin-bottom: 32px;
  letter-spacing: 0.3px;
}

/* Card */
.card {
  background: var(--aw-mk-bg-paper);
  border: 1px solid rgba(27,23,20,0.08);
  border-radius: 20px;
  padding: 32px;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
