/* the airxsun foundation — v3, built around the parted-earth monoline mark. Stamp in tokens.css. */

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

html { overflow-x: clip; }
body { overflow-x: clip; margin: 0; }

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
}

::selection { background: var(--color-accent); color: var(--color-paper); }

a { color: var(--color-accent); text-decoration-color: color-mix(in oklch, var(--color-accent) 40%, transparent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; border-radius: 2px; }

/* ---- top bar (N1a: lockup left, one link right) ---- */
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--page-gutter);
}
.lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.lockup svg { flex: none; }
.bar .mail {
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  padding-block: var(--space-sm);
}

/* ---- identity head: the mark, drawn ---- */
.head {
  text-align: center;
  padding: var(--space-2xl) var(--page-gutter) 0;
}
.head .mark { width: 132px; height: 132px; }

/* stem + leaves draw once on load; ground is already there */
.mark .draw {
  stroke-dasharray: 130;
  stroke-dashoffset: 130;
  animation: draw 900ms var(--ease-out) 150ms forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: var(--space-lg) 0 0;
  text-align: center;
  text-wrap: balance;
  min-width: 0;
}

/* ---- prose ---- */
.page {
  max-width: 34rem;
  margin-inline: auto;
  padding: var(--space-xl) var(--page-gutter) 0;
}
.page p { margin: 0 0 var(--space-md); }
.page .contact { margin-top: var(--space-lg); }

/* ---- footer (statement = the mark, small) ---- */
.foot {
  margin-top: var(--space-3xl);
  padding: var(--space-lg) var(--page-gutter) var(--space-xl);
  border-top: 1px solid var(--color-rule);
  text-align: center;
}
.foot .meta { font-size: var(--text-sm); color: var(--color-muted); margin: 0; }

.reveal {
  opacity: 0;
  transform: translateY(6px);
  animation: reveal var(--dur-long) var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

.head h1 { --i: 1; }
.page p:nth-of-type(1) { --i: 2; }
.page p.contact { --i: 3; }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: reveal-reduced 150ms linear forwards; }
  @keyframes reveal-reduced { to { opacity: 1; transform: none; } }
  .mark .draw { animation: none; stroke-dashoffset: 0; }
}

@media (max-width: 26rem) {
  .lockup span { display: none; }   /* mark-only; the head carries the name */
  .head { padding-top: var(--space-xl); }
  .head .mark { width: 108px; height: 108px; }
}
