/* James Combey · digital card
   Deep blue-black with mustard yellow. Ubuntu throughout.
   Kept deliberately plain: sharp corners, flat colour, no glows or blur. */

:root {
  /* Colour */
  --ink-950: #070b14;       /* page */
  --ink-900: #0c1322;       /* card */
  --ink-800: #0c1322;       /* text on mustard */

  --cream: #f3efe6;                          /* main text: 16:1 on the card */
  --cream-soft: rgb(243 239 230 / 0.66);     /* secondary text: 7:1 */
  --mustard: #f2c14e;                        /* accent: 10:1 on the card */
  --mustard-deep: #e0aa2a;                   /* button hover */
  --line: rgb(243 239 230 / 0.12);           /* hairline borders */
  --line-strong: rgb(243 239 230 / 0.24);
  --surface-hover: rgb(243 239 230 / 0.05);

  /* Type */
  --font: 'Ubuntu', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-name: 2.375rem;   /* 38px */

  /* 8px spacing scale */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  /* Corners: sharp by design */
  --radius: 2px;
  --radius-card: 4px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --transition: 160ms ease;

  --card-width: 420px;
  --gutter: 1.625rem;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--cream);
  background: var(--ink-950);
  -webkit-font-smoothing: antialiased;
}

svg { display: block; }
img { display: block; max-width: 100%; }
ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--mustard); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- the card ---------- */

.card {
  position: relative;
  max-width: var(--card-width);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--ink-900);
  overflow: hidden;
}

@media (min-width: 500px) {
  body { padding: var(--space-xl) var(--space-sm); }
  .card {
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
  }
}

/* ---------- hero: the photo is still; only the text fades in ---------- */

.hero {
  position: relative;
  aspect-ratio: 1 / 1.04;
  background: #2b2b2b;
}
.hero__photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}
/* Fade the bottom of the photo into the card so the name stays readable. */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgb(12 19 34 / 0) 50%, rgb(12 19 34 / 0.8) 78%, var(--ink-900) 100%);
  pointer-events: none;
}

.hero__tools {
  position: absolute; top: var(--space-sm); right: var(--space-sm); z-index: 2;
  display: flex; gap: var(--space-2xs);
}
.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--ink-900);
  color: var(--cream);
  transition: background-color var(--transition), color var(--transition);
}
.icon-btn svg { width: 18px; height: 18px; stroke-width: 1.75; }
.icon-btn:hover { background: var(--mustard); color: var(--ink-800); }

.hero__text {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--space-md); z-index: 2;
}
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mustard);
}
.name {
  margin-top: var(--space-2xs);
  font-size: var(--text-name);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--cream);
}

/* ---------- body ---------- */

.body { padding: var(--space-sm) var(--gutter) 0; }

/* One flowing line: title | consulting | founder | mentoring */
.roles {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--cream-soft);
  text-wrap: pretty;   /* avoids a single word stranded on the last line */
}
.roles b { font-weight: 500; color: var(--cream); }
.roles .sep { color: var(--mustard); padding: 0 0.125rem; }
.roles .nb { white-space: nowrap; }

/* Save: the one solid block of colour on the card */
.save {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2xs);
  min-height: 54px;
  margin-top: var(--space-md);
  border-radius: var(--radius);
  background: var(--mustard);
  color: var(--ink-800);
  font-size: var(--text-base);
  font-weight: 500;
  transition: background-color var(--transition);
}
.save svg { width: 20px; height: 20px; stroke-width: 1.75; }
.save:hover { background: var(--mustard-deep); }

/* WhatsApp / Call / Email: one bar split into three, not three floating cards */
.actions {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  margin-top: var(--space-2xs);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}
.action {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.375rem;
  min-height: 68px;
  background: var(--ink-900);
  font-size: var(--text-xs);
  transition: background-color var(--transition);
}
.action svg { width: 20px; height: 20px; stroke-width: 1.75; color: var(--mustard); }
.action:hover { background: #121a2b; }

/* Website: outlined in mustard, so it reads as the next step after saving the contact */
.site {
  display: flex; align-items: center; gap: var(--space-sm);
  min-height: 64px;
  margin-top: var(--space-2xs);
  padding: 0 var(--space-sm);
  border: 1px solid var(--mustard);
  border-radius: var(--radius);
  transition: background-color var(--transition), color var(--transition);
}
.site__icon { flex: none; color: var(--mustard); display: grid; }
.site__icon svg, .site__arrow svg { width: 20px; height: 20px; stroke-width: 1.75; }
.site__text { flex: 1; min-width: 0; display: grid; }
.site__label { font-size: var(--text-base); font-weight: 500; line-height: 1.25; }
.site__url { font-size: var(--text-xs); color: var(--cream-soft); }
.site__arrow { flex: none; color: var(--mustard); display: grid; transition: transform var(--transition); }
.site:hover { background: var(--mustard); color: var(--ink-800); }
.site:hover .site__icon, .site:hover .site__arrow, .site:hover .site__url { color: var(--ink-800); }
.site:hover .site__arrow { transform: translate(2px, -2px); }

.section-label {
  margin: var(--space-lg) 0 var(--space-2xs);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--cream-soft);
}

/* Social links: one ruled list */
.socials {
  border-top: 1px solid var(--line);
}
.socials li { border-bottom: 1px solid var(--line); }
.social {
  display: flex; align-items: center; gap: var(--space-sm);
  min-height: 64px;
  padding: 0 var(--space-3xs);
  transition: background-color var(--transition);
}
.social:hover { background: var(--surface-hover); }
.social__icon { flex: none; width: 22px; color: var(--mustard); }
.social__icon svg { width: 20px; height: 20px; }
.social__text { flex: 1; min-width: 0; display: grid; }
.social__label { font-size: var(--text-base); font-weight: 500; line-height: 1.25; }
.social__handle { font-size: var(--text-xs); color: var(--cream-soft); overflow-wrap: anywhere; }
.social__arrow { flex: none; color: var(--cream-soft); transition: color var(--transition); }
.social__arrow svg { width: 16px; height: 16px; stroke-width: 1.75; }
.social:hover .social__arrow { color: var(--mustard); }

.foot {
  padding: var(--space-lg) var(--gutter);
  font-size: var(--text-xs);
  color: var(--cream-soft);
}

/* ---------- QR view: fills the screen ---------- */

/* "fixed" ties it to the visible screen rather than the (much taller) card,
   so the code is always in view. The extra bottom padding lifts it a little
   above the exact middle, where the eye naturally lands. */
.qr {
  position: fixed; inset: 0; z-index: 30;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--space-xl) var(--gutter) 16vh;
  background: var(--ink-900);
  text-align: center;
}
.qr[hidden] { display: none; }
.qr__close { position: absolute; top: max(var(--space-sm), env(safe-area-inset-top)); right: var(--space-sm); }
.qr__code {
  width: min(272px, 80%);
  margin: var(--space-md) 0;
  padding: var(--space-sm);
  background: var(--cream);
}
.qr__name { font-size: 1.375rem; font-weight: 500; }
.qr__hint { margin-top: var(--space-3xs); font-size: var(--text-sm); color: var(--cream-soft); }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: var(--space-lg); z-index: 20;
  transform: translate(-50%, 150%);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink-800);
  font-size: var(--text-sm);
  font-weight: 500;
  opacity: 0;
  transition: transform var(--transition), opacity var(--transition);
  pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- entrance: items settle in one after another ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.reveal {
  animation: rise 450ms var(--ease) both;
  animation-delay: calc(100ms + var(--i, 0) * 45ms);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
