/* Layout concept: the page is a desk, and the first thing on it is one real-proportion card
   (85.6 x 54 mm) that flips over to its QR code. Everything below it is flat. */
.nc {
  --page: #fff6d9; --ink: #1b1608; --muted: #6a5f3e; --line: #1b160826; --tile: #ffffff;
  --stock: #ffc21a; --stock-ink: #1b1608;
  --accent: #1b1608; --accent-ink: #ffd65c;
  --display: 'Bricolage Grotesque', 'Arial Narrow', Arial, sans-serif;
  --body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --display-weight: 700;
  --display-stretch: 100%;
  --radius-card: 18px;
  container-type: inline-size;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
}
.nc[data-stock="cotton"] {
  --page: #e9ecf1; --ink: #17202e; --muted: #5a6677; --line: #17202e24; --tile: #ffffff;
  --stock: #ffffff; --stock-ink: #17202e; --accent: #17202e; --accent-ink: #ffffff;
  --display: 'Newsreader', Georgia, serif; --body: 'Hanken Grotesk', 'Segoe UI', system-ui, sans-serif; --display-weight: 500;
}
.nc[data-stock="graphite"] {
  --page: #17181b; --ink: #ece9e3; --muted: #a4a29c; --line: #ece9e322; --tile: #24262b;
  --stock: #2a2c32; --stock-ink: #f0e4d0; --accent: #d9b277; --accent-ink: #1e1608;
  --display: 'Instrument Serif', Georgia, serif; --body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif; --display-weight: 400;
}
.nc[data-stock="cobalt"] {
  --page: #e5ebfb; --ink: #0e1a44; --muted: #4a5786; --line: #0e1a4426; --tile: #ffffff;
  --stock: #1437c9; --stock-ink: #ffffff; --accent: #1437c9; --accent-ink: #ffffff;
  --display: 'Archivo', 'Arial Black', Arial, sans-serif; --body: 'Archivo', 'Segoe UI', system-ui, sans-serif; --display-weight: 800; --display-stretch: 125%;
}
.nc[data-stock="rosewood"] {
  --page: #f9e9e7; --ink: #37101b; --muted: #80505c; --line: #37101b24; --tile: #fff8f6;
  --stock: #6e1f35; --stock-ink: #ffe9e2; --accent: #6e1f35; --accent-ink: #ffe9e2;
  --display: 'DM Serif Display', Georgia, serif; --body: 'DM Sans', 'Segoe UI', system-ui, sans-serif; --display-weight: 400;
}
.nc[data-stock="kraft"] {
  --page: #e9dfcf; --ink: #241708; --muted: #6b5840; --line: #24170826; --tile: #f4ecdf;
  --stock: #b98d5c; --stock-ink: #241708; --accent: #241708; --accent-ink: #ebd9bf;
  --display: 'Bitter', Georgia, serif; --body: 'Karla', 'Segoe UI', system-ui, sans-serif;
}

html, body { margin: 0; }
*, *::before, *::after { box-sizing: border-box; }
body.card-page { min-height: 100dvh; background: #fff; }
#card, .nc { min-height: inherit; }

.nc a { color: inherit; text-decoration: none; }
.nc :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.nc svg { display: block; }
.nc button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.nc-wrap {
  display: grid;
  gap: 28px;
  max-width: 460px;
  margin-inline: auto;
  padding-block: max(20px, env(safe-area-inset-top, 0px)) 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.nc-side, .nc-main { display: grid; gap: 28px; min-width: 0; align-content: start; }
@container (min-width: 820px) {
  .nc-wrap { grid-template-columns: minmax(0, 460px) minmax(0, 420px); justify-content: center; gap: 56px; max-width: none; padding-block: 56px; }
  .nc-side { position: sticky; top: 56px; align-self: start; }
}

.nc-notice {
  font-size: 14px;
  padding: 10px 14px;
  border: 1px dashed var(--muted);
  border-radius: 10px;
}
.nc-notice a { text-decoration: underline; font-weight: 600; }

/* The card object */
.nc-stock { position: relative; perspective: 1200px; }
.nc-flip { display: grid; grid-template-columns: minmax(0, 1fr); transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, .9, .3, 1); }
.nc-stock.is-flipped .nc-flip { transform: rotateY(180deg); }
.nc-face {
  grid-area: 1 / 1;
  aspect-ratio: 85.6 / 54;
  align-self: stretch;
  width: 100%;
  border-radius: var(--radius-card);
  background: var(--stock);
  color: var(--stock-ink);
  padding: clamp(16px, 5.5cqi, 24px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 1px 0 #ffffff33 inset, 0 1px 1px #0000002e, 0 14px 28px -12px #00000059;
}
.nc-front { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; column-gap: 14px; }
.nc-company { font-size: 13px; font-weight: 600; letter-spacing: .02em; min-width: 0; overflow-wrap: anywhere; }
.nc-photo {
  grid-column: 2; grid-row: 1 / span 2;
  width: clamp(74px, 25cqi, 112px);
  aspect-ratio: 1;
  border-radius: 12px;
  object-fit: cover;
  background: color-mix(in srgb, var(--stock-ink) 14%, var(--stock));
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(26px, 9cqi, 38px);
}
.nc-id { grid-column: 1 / -1; grid-row: 3; padding-right: 46px; min-width: 0; padding-top: 10px; }
.nc-name {
  margin: 0;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  font-size: clamp(27px, 9.2cqi, 40px);
  line-height: 1.04;
  letter-spacing: -.012em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.nc-name.is-long { font-size: clamp(21px, 6.6cqi, 29px); line-height: 1.1; }
.nc-title { margin: 5px 0 0; font-size: 14.5px; line-height: 1.3; color: color-mix(in srgb, var(--stock-ink) 80%, var(--stock)); overflow-wrap: anywhere; }

.nc-back { transform: rotateY(180deg); display: flex; align-items: center; gap: clamp(14px, 5cqi, 24px); padding-right: 58px; }
.nc-qr { width: min(46cqi, 190px); aspect-ratio: 1; flex: none; background: #fff; padding: 6px; border-radius: 10px; }
.nc-back-text { min-width: 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.nc-back-text strong { display: block; font-family: var(--display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-size: 21px; line-height: 1.1; margin-bottom: 6px; }

.nc .nc-turn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--stock-ink);
  color: var(--stock);
  z-index: 2;
}
.nc .nc-turn:focus-visible { outline-color: var(--stock-ink); }

/* Actions */
.nc-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.nc-actions > * {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px;
  border-radius: 12px;
  font-weight: 600;
}
.nc .nc-save { background: var(--accent); color: var(--accent-ink); }
.nc .nc-share { padding-inline: 18px; border: 1.5px solid var(--ink); white-space: nowrap; }

.nc-bio { margin: 0; font-size: 17px; line-height: 1.55; max-width: 62ch; white-space: pre-line; overflow-wrap: anywhere; }

.nc-section { display: grid; gap: 10px; min-width: 0; }
.nc-section h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* Rows: contact details and custom links */
.nc-rows { display: grid; border-top: 1px solid var(--line); }
.nc-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.nc-row-main { min-width: 0; display: grid; }
.nc-row-label { font-weight: 500; overflow-wrap: anywhere; }
.nc-row-note { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.nc-row > .nc-go { opacity: .55; transition: transform .15s; }
.nc-row:hover > .nc-go { transform: translate(2px, -2px); opacity: 1; }

/* Social tiles */
.nc-socials { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.nc .nc-social {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  width: 100%;
  min-height: 78px;
  padding: 10px 4px;
  background: var(--tile);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  transition: transform .15s;
}
.nc .nc-social:hover { transform: translateY(-2px); }
.nc-social span { overflow-wrap: anywhere; min-width: 0; }

.nc-maps { display: flex; flex-wrap: wrap; gap: 8px; }
.nc-address { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.nc .nc-pill { padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .nc-flip, .nc-row > .nc-go, .nc .nc-social { transition: none; }
}

/* Own card picture instead of the standard layout */
.nc-front.nc-picture { padding: 0; overflow: hidden; display: block; background: #fff; }
.nc-design { display: block; width: 100%; height: 100%; object-fit: cover; }
.nc-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
