/* HumanWorks — digital business card (/darein)
   Standalone contact surface. Inherits the tokens in styles.css (warm paper,
   navy ink, restrained gold) but drops the marketing chrome: no site nav, no
   scroll narrative. One screen, one job — get into the other person's phone.

   Mobile-first on purpose: this page is opened almost exclusively from a phone,
   after a QR scan or an NFC tap. The desktop layout is the enhancement. */

body.card-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Generous bottom padding clears the site-wide cookie banner, which is
     fixed to the viewport bottom. Every single person handed this card is a
     first-time visitor to the domain, so the banner is showing for 100% of
     them — without this the footer sits underneath it. */
  padding: 1.5rem 1.15rem 10rem;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--surface) 0%, var(--paper) 62%);
}

.card {
  width: 100%;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ── Portrait ──────────────────────────────────────────────────────────────
   Fixed circle, object-fit cover with the focal point nudged up so the crop
   lands on the face rather than the centre of a 2:3 studio portrait. */
.card-portrait {
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px -18px rgba(22, 34, 46, 0.55);
  flex: none;
}

.card-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  display: block;
}

/* ── Identity ─────────────────────────────────────────────────────────────── */
.card-logo {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.card-logo span { color: var(--gold); }

.card h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 8vw, 2.7rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-top: 0.85rem;
}

.card-title {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: 0.6rem;
}

.card-tagline {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: 0.9rem;
  max-width: 22rem;
}

.card-rule {
  width: 3rem;
  height: 1px;
  background: var(--gold);
  opacity: 0.65;
  margin: 1.6rem 0;
  flex: none;
}

/* ── Primary action ────────────────────────────────────────────────────────
   min-height 3.25rem keeps the tap target well above the 44px floor. */
.card-cta {
  width: 100%;
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: var(--gold);
  color: #fff;
  border: 1px solid var(--gold);
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.card-cta:hover,
.card-cta:focus-visible { background: var(--gold-deep); border-color: var(--gold-deep); }

.card-cta-note {
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 0.7rem;
}

/* ── Contact rows ─────────────────────────────────────────────────────────── */
.card-links {
  width: 100%;
  list-style: none;
  margin-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
}

.card-links li { border-bottom: 1px solid var(--line-soft); }

.card-links a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 3.25rem;
  padding: 0.5rem 0.15rem;
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  transition: color 0.2s;
}
.card-links a:hover,
.card-links a:focus-visible { color: var(--gold-deep); }

.card-links .row-label {
  flex: none;
  width: 5.1rem;
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-links .row-value {
  font-size: 0.95rem;
  word-break: break-word;
}

/* ── QR ───────────────────────────────────────────────────────────────────── */
.card-qr { width: 100%; margin-top: 1.7rem; }

/* Open by default. The QR is a primary handoff — someone scans it off Darein's
   screen when there is no printed card in the room — so it must not cost a tap,
   and the label alone was read as a caption rather than a control. The toggle
   stays for collapsing it back. */
.card-qr summary {
  cursor: pointer;
  list-style: none;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Bordered pill so it reads as interactive rather than as a label. */
  margin: 0 auto 0.9rem;
  padding: 0 1.1rem;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.2s, border-color 0.2s;
}
.card-qr summary::-webkit-details-marker { display: none; }
.card-qr summary:hover,
.card-qr summary:focus-visible { color: var(--gold-deep); border-color: var(--gold); }

/* Swap the label with the disclosure state — a button reading "Show" while the
   thing is already shown is worse than no label at all. */
.card-qr .qr-when-open { display: none; }
.card-qr[open] .qr-when-closed { display: none; }
.card-qr[open] .qr-when-open { display: inline; }

.card-qr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 1.4rem 1rem 1.2rem;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
}

.card-qr-panel img { width: 11.5rem; height: 11.5rem; display: block; }

.card-qr-panel p {
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 15rem;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.card-foot {
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  width: 100%;
}

.card-foot p {
  font-size: 0.7rem;
  line-height: 1.65;
  color: var(--muted);
}
.card-foot p + p { margin-top: 0.55rem; }
.card-foot a { color: inherit; }

/* ── Desktop enhancement ──────────────────────────────────────────────────── */
@media (min-width: 46rem) {
  .card { max-width: 30rem; }
  .card-portrait { width: 10rem; height: 10rem; }
  .card-qr-panel img { width: 13rem; height: 13rem; }
}

/* ── Print: the physical fallback ─────────────────────────────────────────── */
@media print {
  body.card-page { background: #fff; padding: 0; }
  .card-cta, .card-qr summary { display: none; }
  .card-qr[open] .card-qr-panel, .card-qr .card-qr-panel { display: flex; border: none; }
}
