/* shaun godinho — marketing surface
 * dark only · inter for body/headings · jetbrains mono for shortcuts
 * ember accent · top-nav + cmd-K palette on every page
 *
 * shared by: /, /now, /work, /projects, /writing, /uses, /contact
 * (bookme / privacy / terms / crm / meet keep their own css for now)
 *
 * 2026-05-24: rebuilt on the design tokens system (assets/tokens.css).
 *   Hero, nav, footer, and Cmd-K trigger refactored to use semantic
 *   variables. Subpage layouts (main.wrap, .row) still use legacy
 *   values; they get the next refactor pass. See
 *   docs/proposals/design-system-elevation.md.
 */
@import url('tokens.css');

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

html, body {
  background: var(--bg-base);
  background-image: var(--bg-atmosphere);
  background-attachment: fixed;
  color: var(--ink-default);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: var(--text-body);
  line-height: 1.65;
  letter-spacing: var(--tracking-body);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
body {
  display: flex;
  flex-direction: column;
}
::selection { background: var(--ember); color: var(--bg-base); }

/* ───────── top nav ───────── */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  gap: var(--space-4);
}

/* Wordmark — custom mark, not just type.
   Built from the brand atom: lowercase Inter 800 + an ember dot.
   The dot reappears as the live indicator, the focus ring, future
   bullet separators, the favicon. One atom, many places.

   .wordmark is used on the home page (inline <span class="wordmark-dot">).
   .logo is used on subpages (`<a class="logo">shaun</a>` markup) where
   the dot is generated via ::after so subpages need no HTML changes. */
.wordmark,
.logo {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  color: var(--ink-strong);
  font-family: 'Inter', sans-serif;
  font-weight: var(--weight-display);
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.045em;
  text-decoration: none;
  padding: var(--space-1) 0;
}
.wordmark-text { color: inherit; }
.wordmark-dot,
.logo::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ember);
  margin-bottom: 2px;
  align-self: flex-end;
  flex-shrink: 0;
  transition:
    box-shadow var(--duration-base) var(--ease-out-expo),
    transform var(--duration-base) var(--ease-out-expo),
    background var(--duration-base) var(--ease-out-expo);
}
.wordmark:hover,
.logo:hover { text-decoration: none; color: var(--ink-strong); }
.wordmark:hover .wordmark-dot,
.logo:hover::after {
  background: var(--ember-soft);
  box-shadow: 0 0 12px var(--ember-glow);
  transform: translateY(-1px);
}
.wordmark:focus-visible,
.logo:focus-visible {
  outline: none;
}
.wordmark:focus-visible .wordmark-dot,
.logo:focus-visible::after {
  box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--ember);
}

.topnav nav {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  justify-content: center;
  font-size: var(--text-micro);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
}
.topnav nav a {
  color: var(--ink-muted);
  transition: color var(--duration-base) var(--ease-out-expo);
}
.topnav nav a:hover {
  color: var(--ink-strong);
  text-decoration: none;
}
.topnav nav a[aria-current="page"] { color: var(--ink-strong); }

.cmdk-hint-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink-muted);
  cursor: pointer;
  user-select: none;
  font-size: var(--text-label);
  background: none;
  border: 0;
  padding: var(--space-1) var(--space-2);
  font-family: inherit;
  transition: color var(--duration-base) var(--ease-out-expo);
}
.cmdk-hint-trigger:hover { color: var(--ink-strong); }
.cmdk-hint-trigger kbd {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-raise-1);
  color: var(--ink-default);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 720px) {
  .topnav { flex-direction: column; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-3); }
  .topnav nav { gap: var(--space-4); font-size: 10px; }
}

/* ───────── shared link styles ───────── */
a {
  color: var(--ember);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out-expo);
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, p, ul, li, div {
  font-weight: var(--weight-regular);
}
strong { font-weight: var(--weight-medium); color: var(--ink-strong); }
.muted { color: var(--ink-muted); }

/* ───────── homepage hero ───────── */
main.hero {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(64px, 14vh, 128px) var(--space-6) clamp(96px, 16vh, 160px);
}
.hero-inner {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
}

/* Display name — drastic scale, drastic tracking.
   88px at desktop, 48px at mobile. Weight 800.
   Tracking -0.045em (per directive: -0.02em to -0.04em range,
   pushed to the upper bound for premium display impact). */
.hero .display {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-display);
  font-weight: var(--weight-display);
  line-height: 0.96;
  letter-spacing: var(--tracking-display);
  color: var(--ink-strong);
  margin-bottom: var(--space-5);
}

.hero .lede {
  font-size: var(--text-lede);
  line-height: 1.45;
  letter-spacing: var(--tracking-lede);
  color: var(--ink-default);
  max-width: 32em;
  margin-bottom: var(--space-9);
}

/* Eyebrow — 11px, +0.16em tracking, uppercase.
   Reused for any section label above headlines. */
.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-micro);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-4);
}

/* Shipping — project index, indexed by a hairline rule above and below
   each row. Hover slides the row a hair to the right, with motion on
   the cubic-bezier(0.16,1,0.3,1) curve. */
.shipping {
  margin-bottom: var(--space-9);
}
.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hairline);
}
.project {
  border-bottom: 1px solid var(--hairline);
}
.project-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-4) 0;
  color: var(--ink-strong);
  text-decoration: none;
  transition:
    padding-left var(--duration-base) var(--ease-out-expo),
    color var(--duration-base) var(--ease-out-expo);
}
.project-link:hover {
  padding-left: var(--space-3);
  text-decoration: none;
  color: var(--ink-strong);
}
.project-name {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;          /* 20 */
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-h3);
  color: var(--ink-strong);
}
.project-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--text-label);
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  text-transform: lowercase;
}
.status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status--live {
  background: var(--live);
  box-shadow: 0 0 0 3px var(--live-glow);
  animation: pulse 2.4s var(--ease-in-out) infinite;
}
.status--building {
  background: var(--ember);
  box-shadow: 0 0 0 3px var(--ember-glow);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
  .status--live { animation: none; }
  .project-link, .wordmark-dot, .cmdk-cta, .cmdk-cta .arrow,
  .topnav nav a, .cmdk-hint-trigger, a { transition: none; }
}
@media (max-width: 560px) {
  .project-link { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
}

/* CTA — pill-shaped glass surface. Hairline border, slight elevation,
   transform-on-hover with physics easing. */
.hero .cmdk-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  align-self: flex-start;
  padding: var(--space-3) var(--space-5);
  background: var(--bg-glass);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--ink-default);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--text-small);
  letter-spacing: var(--tracking-body);
  transition:
    background var(--duration-base) var(--ease-out-expo),
    border-color var(--duration-base) var(--ease-out-expo),
    transform var(--duration-base) var(--ease-out-expo),
    box-shadow var(--duration-base) var(--ease-out-expo);
}
.hero .cmdk-cta:hover {
  background: var(--bg-glass-hi);
  border-color: var(--hairline-hi);
  color: var(--ink-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.hero .cmdk-cta:active {
  transform: translateY(0);
  box-shadow: none;
}
.cmdk-cta-keys {
  display: inline-flex;
  gap: 4px;
}
.hero .cmdk-cta kbd {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-raise-2);
  color: var(--ink-default);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  line-height: 1;
}

/* ───────── subpage content wrap ───────── */
main.wrap {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-7) var(--space-6) var(--space-10);
}
main.wrap h1 {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-h2);
  font-weight: var(--weight-bold);
  color: var(--ink-strong);
  letter-spacing: var(--tracking-h2);
  margin-bottom: var(--space-7);
  line-height: 1.1;
}
main.wrap h2 {
  font-size: var(--text-micro);
  color: var(--ink-muted);
  margin: var(--space-8) 0 var(--space-4);
  text-transform: uppercase;
  letter-spacing: var(--tracking-micro);
  font-weight: var(--weight-medium);
}
main.wrap p {
  margin-bottom: var(--space-4);
  color: var(--ink-default);
  letter-spacing: var(--tracking-body);
}
main.wrap ul { list-style: none; }

/* two-column row used on /work, /uses, /contact, /projects.
   Hairline-ruled rows for an "editorial index" feel. */
.row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.row:first-of-type {
  border-top: 1px solid var(--hairline);
}
.row .when {
  color: var(--ink-muted);
  font-size: var(--text-small);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.02em;
}
.row .what strong {
  display: block;
  color: var(--ink-strong);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-h3);
}
.row .what small {
  display: block;
  color: var(--ink-muted);
  margin-top: var(--space-1);
  font-size: var(--text-small);
  line-height: 1.55;
  letter-spacing: var(--tracking-body);
}
@media (max-width: 520px) {
  main.wrap { padding: var(--space-5) var(--space-4) var(--space-8); }
  .row { grid-template-columns: 1fr; gap: var(--space-1); padding: var(--space-4) 0; }
}

/* ───────── footer (social links centered) ───────── */
footer.social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-5) var(--space-7);
  color: var(--ink-muted);
  font-size: var(--text-small);
}
footer.social a {
  color: var(--ink-muted);
  transition: color var(--duration-base) var(--ease-out-expo);
}
footer.social a:hover { color: var(--ink-strong); text-decoration: none; }
footer.social .sep { color: var(--ink-ghost); user-select: none; }

/* ───────── cmd-K modal ───────── */
.cmdk-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  padding: 18vh var(--space-4) var(--space-4);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
}
.cmdk-modal.open {
  display: flex;
  animation: cmdk-fade var(--duration-base) var(--ease-out-expo);
}
@keyframes cmdk-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cmdk-box {
  background: var(--bg-raise-1);
  border: 1px solid var(--hairline-hi);
  border-radius: var(--radius-lg);
  width: min(560px, 100%);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: cmdk-rise var(--duration-slow) var(--ease-out-expo);
}
@keyframes cmdk-rise {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cmdk-input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-strong);
  font: inherit;
  font-size: var(--text-body);
  padding: var(--space-4) var(--space-5);
  outline: none;
  letter-spacing: var(--tracking-body);
}
.cmdk-input::placeholder { color: var(--ink-faint); }
.cmdk-list {
  list-style: none;
  max-height: 360px;
  overflow-y: auto;
  padding: var(--space-2) 0;
  margin: 0;
}
.cmdk-list li {
  padding: var(--space-3) var(--space-5);
  cursor: pointer;
  color: var(--ink-default);
  font-size: var(--text-body);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  transition: background var(--duration-fast) var(--ease-out-expo);
}
.cmdk-list li .meta {
  color: var(--ink-faint);
  font-size: var(--text-label);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.cmdk-list li.sel {
  background: var(--ember-veil);
  color: var(--ink-strong);
}
.cmdk-list li.sel .meta { color: var(--ember); }
.cmdk-list li.empty { color: var(--ink-faint); cursor: default; padding: var(--space-3) var(--space-5); }
.cmdk-foot {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--hairline);
  font-size: var(--text-micro);
  color: var(--ink-faint);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  display: flex;
  gap: var(--space-4);
  justify-content: flex-end;
}
.cmdk-foot kbd {
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 1px 5px;
  background: var(--bg-raise-2);
  color: var(--ink-default);
  font-size: 10px;
}
