/* ==========================================================================
   Obsidite — web business card
   Design tokens taken from the Obsidite deck appendix (design system slide).
   Fonts are self-hosted (no third-party requests, GDPR-friendly).
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/space-grotesk-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/space-grotesk-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  /* Colors — verbatim from the deck appendix */
  --color-bg: #0c0e11;
  --color-surface: #14171b;
  --color-line: #2a2f37;
  --color-ink: #f2f4f5;
  --color-muted: #8a929c;
  --color-accent: #ff5a1f;

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', 'Menlo', monospace;

  /* Deck scale (104 / 38 / 24 at 1440) mapped to fluid web sizes */
  --text-display: clamp(3.25rem, 1.6rem + 8.2vw, 6.5rem);
  --text-lead: clamp(1.125rem, 0.95rem + 0.9vw, 1.6rem);
  --text-contact: clamp(1.375rem, 1rem + 1.7vw, 2.375rem);
  --text-small: clamp(0.688rem, 0.63rem + 0.28vw, 0.813rem);

  /* Layout — deck padding 120 / 92 / 80 at 1440 */
  --pad-x: clamp(1.5rem, 0.6rem + 4.5vw, 7.5rem);
  --pad-top: clamp(1.75rem, 0.9rem + 4.2vw, 5.75rem);
  --pad-bottom: clamp(1.75rem, 1rem + 3.6vw, 5rem);
  --gap: clamp(1.25rem, 0.8rem + 2vw, 2rem);
  --hairline: 1px;

  /* Motion */
  --duration-fast: 140ms;
  --duration-normal: 320ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base ----------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A faint off-centre glow so the flat black gains depth without a gradient blob. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(90ch 60ch at 12% 78%, rgba(255, 90, 31, 0.09), transparent 62%),
    radial-gradient(70ch 50ch at 88% 8%, var(--color-surface), transparent 60%);
}

/* --- Frame ---------------------------------------------------------------- */

.frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--gap);
  min-height: 100svh;
  padding: var(--pad-top) var(--pad-x) var(--pad-bottom);
}

/* --- Mono kickers --------------------------------------------------------- */

.kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.kicker--muted {
  color: var(--color-muted);
}

/* Primitive shape marker — the deck uses squares/diamonds instead of icons. */
.marker {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.15em;
  background-color: var(--color-accent);
  vertical-align: baseline;
}

/* --- Masthead ------------------------------------------------------------- */

.masthead,
.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem var(--gap);
  align-items: baseline;
  justify-content: space-between;
}

.masthead {
  padding-bottom: clamp(1rem, 0.7rem + 1.4vw, 2rem);
  border-bottom: var(--hairline) solid var(--color-line);
}

.colophon {
  padding-top: clamp(1rem, 0.7rem + 1.4vw, 2rem);
  border-top: var(--hairline) solid var(--color-line);
}

/* --- Stage ---------------------------------------------------------------- */

/* The vh caps keep the card on a single screen on short landscape viewports
   (e.g. 1024x700) without cramping tall ones. */
.stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: min(clamp(2.5rem, 1.5rem + 5vw, 6rem), 8svh);
  padding-block: min(clamp(2rem, 1rem + 5vw, 5rem), 5svh);
}

/* --- Hero ----------------------------------------------------------------- */

.wordmark {
  margin: 0 0 clamp(1rem, 0.6rem + 1.6vw, 2.25rem);
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--color-ink);
}

.wordmark__dot {
  display: inline-block;
  width: 0.19em;
  height: 0.19em;
  margin-left: 0.06em;
  background-color: var(--color-accent);
  vertical-align: baseline;
}

.lead {
  margin: 0;
  max-width: 34ch;
  font-size: var(--text-lead);
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: -0.005em;
  color: var(--color-ink);
}

/* --- Contact -------------------------------------------------------------- */

.contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
}

.contact__link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  padding: 0.1em 0;
  font-size: var(--text-contact);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

/* Underline drawn as a pseudo-element so it can wipe in from the left. */
.contact__address {
  position: relative;
}

.contact__address::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.12em;
  height: 2px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.contact__arrow {
  font-size: 0.55em;
  color: var(--color-muted);
  transition:
    transform var(--duration-normal) var(--ease-out-expo),
    color var(--duration-fast) ease;
}

.contact__link:hover,
.contact__link:focus-visible {
  color: var(--color-accent);
}

.contact__link:hover .contact__address::after,
.contact__link:focus-visible .contact__address::after {
  transform: scaleX(1);
}

.contact__link:hover .contact__arrow,
.contact__link:focus-visible .contact__arrow {
  color: var(--color-accent);
  transform: translate(0.18em, -0.18em);
}

.contact__link:active {
  color: #ff7a47;
}

.contact__link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 0.35em;
}

/* --- Motion preferences --------------------------------------------------- */

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

  /* Keep the underline as a static affordance rather than an animated wipe. */
  .contact__link:hover .contact__address::after,
  .contact__link:focus-visible .contact__address::after {
    transform: scaleX(1);
  }
}

/* --- Forced colors -------------------------------------------------------- */

@media (forced-colors: active) {
  .wordmark__dot,
  .marker,
  .contact__address::after {
    forced-color-adjust: none;
    background-color: LinkText;
  }
}
