/* ============================================================================
   danielcrex.com — landing page styles
   Reads only from tokens.css. Mobile-first. Daniele's Touch design system.
   ============================================================================ */

/* -------------------------------- RESET -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  transition: background-color .2s ease, color .2s ease;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}

/* -------------------------------- TYPE --------------------------------- */
.display { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: 1.04; }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: var(--display-tracking); line-height: 1.18; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); line-height: 1.6; font-weight: 400; }
.body { font-size: 15px; color: var(--ink-2); line-height: 1.7; }
.small { font-size: 13px; color: var(--ink-3); line-height: 1.55; }

/* ------------------------------- LAYOUT -------------------------------- */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--s5); }

main.wrap {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s8);
  padding-top: var(--s8);
  padding-bottom: var(--s8);
}

/* Skip link — visible on focus, meets target + focus-ring floor */
.skip {
  position: absolute; left: var(--s4); top: -60px;
  z-index: 100;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--border-2); border-radius: var(--r-btn);
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: top .15s ease;
}
.skip:focus { top: var(--s4); }

/* ----------------------------- THEME TOGGLE ---------------------------- */
/* Fixed top-right; only shown when JS is available (it's a JS-only control). */
.theme-toggle {
  display: none;
  position: fixed; top: var(--s4); right: var(--s4); z-index: 50;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;              /* ≥40px target */
  border-radius: var(--r-pill);
  background: var(--bg); color: var(--ink-2);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: color .18s, background .18s, border-color .18s;
}
html.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { color: var(--ink); background: var(--surface); border-color: var(--ink-3); }
.theme-toggle .ti { width: 20px; height: 20px; }
/* Show the icon for the theme you'd switch TO: moon in light, sun in dark. */
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }

/* --------------------------------- HERO -------------------------------- */
.hero { max-width: 640px; }
/* Brand lockup: small circular panther mark to the left of the name. */
.hero__title { display: flex; align-items: center; gap: var(--s4); }
.hero__logo {
  flex: none;
  width: clamp(40px, 7vw, 56px);
  height: clamp(40px, 7vw, 56px);
  border-radius: 50%;   /* clips the mark's white corners; the blue ring sits inside */
}
.hero__name {
  font-size: clamp(40px, 8vw, 68px);
  color: var(--ink);
}
.hero__line { margin-top: var(--s4); }
/* Muted secondary tagline — smaller than the lead, not body copy. */
.hero__note { margin-top: var(--s2); font-size: 14px; color: var(--ink-2); }

/* ------------------------------- BUTTONS ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;             /* accessibility floor: ≥40px targets */
  border-radius: var(--r-btn);
  padding: 11px 18px;
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  border: 1px solid transparent;
  transition: transform .12s, box-shadow .2s, background .18s, border-color .18s, filter .18s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px var(--accent-shadow); }
.btn--primary:hover { filter: brightness(1.05); }
.btn--secondary { background: var(--bg); color: var(--ink); border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.btn--secondary:hover { background: var(--surface); border-color: var(--ink-3); }
.btn .ext { font-weight: 700; }

/* ------------------------------ PROJECTS ------------------------------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
}
@media (min-width: 680px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: var(--s5); }
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--s5);
  box-shadow: var(--shadow-sm);
}

.project {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.project:hover { box-shadow: var(--shadow-md); }
.project__body { flex: 1 0 auto; }
.project__desc { margin-top: var(--s2); }
.project__actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* In-progress cards: skeleton loading state (styleguide .skl) + status pill */
.project--wip { min-height: 168px; }
.project--wip .badge { align-self: flex-start; }

/* ------------------------------ SKELETON ------------------------------- */
/* Verbatim from danieles-touch-styleguide.html loading state. */
.skl {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  border-radius: 7px;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skl-row { height: 14px; margin: 11px 0; }
.skl-row:first-child { margin-top: 0; }

/* ------------------------------- BADGE --------------------------------- */
/* Neutral status pill — colour + dot + word (never colour alone). */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-2);
}
.badge .d { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
/* Inline status badge inside a card body (e.g. a live-but-in-progress project). */
.badge--inline { margin-top: var(--s3); }

/* -------------------------------- FOOTER ------------------------------- */
.footer {
  flex: none;
  border-top: 1px solid var(--border);
  padding: var(--s5) 0;
}
.footer__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s3);
}
.footer__links { display: flex; align-items: center; gap: var(--s3); }
.footer__links a {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 0 var(--s2);
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: color .15s ease;
}
.footer__links a:hover { color: var(--ink); }
.footer__dot { color: var(--ink-3); }
.footer__note { margin: 0; }
