/* Justido Digital Business Card — Ember design tokens + layout */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --color-bg:           #17120F;
  --color-bg-alt:       #201913;
  --color-bg-alt-2:     #1B140F;
  --color-text:         #F3E8D8;
  --color-text-warm:    #E8DCC8;
  --color-text-muted:   #9A8770;
  --color-accent:       #C85B40;
  --color-accent-hover: #E8855F;
  --color-accent-press-1: #B14E36;
  --color-accent-press-2: #A3462F;
  --color-border:       #392C22;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--color-bg); }

/* ── Keyframes ───────────────────────────────────────────────── */
@keyframes wmWipe {
  from { clip-path: inset(0 100% 0 0); transform: scale(.98); }
  to   { clip-path: inset(0 0 0 0);    transform: scale(1);   }
}
@keyframes ruleGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes nameIn {
  from { filter: blur(8px); transform: scale(1.04); opacity: 0; }
  to   { filter: blur(0);   transform: scale(1);    opacity: 1; }
}
@keyframes blockIn {
  from { filter: blur(6px); transform: scale(.97); opacity: 0; }
  to   { filter: blur(0);   transform: scale(1);   opacity: 1; }
}
@keyframes riseIn {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes sheenSweep {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(230%);  }
}
@keyframes sheenFlare {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(230%);  }
}
@keyframes pulse {
  0%   { transform: scale(1);     }
  45%  { transform: scale(1.012); }
  100% { transform: scale(1);     }
}
@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}
@keyframes foilShimmer {
  0%   { background-position: 130% 0; }
  100% { background-position: -30% 0; }
}
@keyframes dotIgnite {
  0%   { opacity: 0; transform: scale(.4);   text-shadow: 0 0 0 rgba(232,133,95,0); }
  45%  { opacity: 1; transform: scale(1.4);  text-shadow: 0 0 16px rgba(232,133,95,.9); color: #FBC9A3; }
  100% { opacity: 1; transform: scale(1);    text-shadow: 0 0 6px rgba(232,133,95,.35); }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  [data-anim] { animation: none !important; }
  .wordmark .dot { animation: none !important; }
  /* Sheen stays: a slow, gentle highlight is the card's signature, not jarring motion. */
}

/* ── Motion cue (iOS tap-to-activate hint; auto-dismisses) ───── */
.motion-cue {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(32, 25, 19, 0.92);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-premium), transform 0.4s var(--ease-premium);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.motion-cue.show { opacity: 1; transform: translate(-50%, 0); }
.mc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: mcPulse 1.6s var(--ease-premium) infinite;
}
@keyframes mcPulse {
  0%   { box-shadow: 0 0 0 0 rgba(200, 91, 64, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(200, 91, 64, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 91, 64, 0); }
}

/* ── Stage ───────────────────────────────────────────────────── */
.stage {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  padding:
    max(22px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  background:
    radial-gradient(125% 80% at 50% -12%, rgba(200,91,64,0.11), rgba(200,91,64,0) 56%),
    #17120F;
}

/* ── Scene wrapper (pulse target) ────────────────────────────── */
.scene {
  width: 100%;
  max-width: 390px;
}

/* ── Card ────────────────────────────────────────────────────── */
.card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  padding: 28px 26px 26px;
  background: linear-gradient(180deg, #201913 0%, #1B140F 100%);
  box-shadow: 0 34px 64px -24px rgba(0,0,0,.78), 0 1px 0 rgba(243,232,216,.03) inset;
  transform-style: preserve-3d;
}

/* ── Masthead ────────────────────────────────────────────────── */
.masthead {
  position: relative;
  transform: translateZ(17px);
}

/* ── Full-card glaze ─────────────────────────────────────────── */
.card-glaze {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  pointer-events: none;
  transform: translateZ(30px);
}

.card-glaze-band {
  position: absolute;
  top: -50%;
  left: 0;
  width: 55%;
  height: 200%;
  background: linear-gradient(
    102deg,
    rgba(232,133,95,0)    0%,
    rgba(232,133,95,0)    34%,
    rgba(232,133,95,0.32) 50%,
    rgba(232,133,95,0)    66%,
    rgba(232,133,95,0)    100%
  );
  filter: blur(20px);
  mix-blend-mode: screen;
  transform: translateX(-120%);
  animation: sheenSweep 4.5s var(--ease-premium) infinite;
  will-change: transform;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-text-muted);
}
.wordmark .dot {
  color: var(--color-accent);
  display: inline-block;
  animation: dotIgnite 1.1s var(--ease-premium) .55s both;
}

.micro-tag {
  margin-top: 7px;
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-text-muted);
}

.hairline {
  height: 1px;
  margin-top: 18px;
  background: var(--color-border);
  transform-origin: left center;
}

/* ── Person block ────────────────────────────────────────────── */
.person-block { margin-top: 20px; transform: translateZ(26px); }

.person-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 9vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.person-name .first { color: #E8DCC8; }
.person-name .last  {
  color: transparent;
  background: linear-gradient(100deg, #E8855F 0%, #E8855F 38%, #FBC9A3 50%, #E8855F 62%, #E8855F 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: foilShimmer 4.5s var(--ease-premium) infinite;
}

.person-title {
  margin-top: 6px;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ── Divisions ───────────────────────────────────────────────── */
.divisions {
  transform: translateZ(7px);
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  margin-top: 22px;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.div-rule { background: var(--color-border); }

.div-link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
  color: var(--color-accent);
  border-radius: 6px;
  transition: background .35s var(--ease-premium), color .35s var(--ease-premium);
}
.div-link:hover,
.div-link:focus-visible {
  background: rgba(200,91,64,.06);
  color: var(--color-accent-hover);
}
.div-link:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

.div-link.solutions { padding: 15px 4px 15px 0; }
.div-link.design    { padding: 15px 0 15px 16px; }

.div-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: inherit;
}
.div-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.3;
}

/* ── CTA ─────────────────────────────────────────────────────── */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 22px;
  padding: 16px;
  border: none;
  border-radius: 13px;
  background: var(--color-accent);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: background .25s var(--ease-premium), transform .15s var(--ease-premium);
  -webkit-tap-highlight-color: transparent;
}
.cta:hover        { background: var(--color-accent-press-1); }
.cta:active       { background: var(--color-accent-press-2); transform: scale(.985); }
.cta:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* ── Tiles ───────────────────────────────────────────────────── */
.tiles { margin-top: 12px; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 64px;
  padding: 12px 8px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: transparent;
  text-decoration: none;
  transition: background .3s var(--ease-premium), border-color .3s var(--ease-premium);
}
.tile:hover,
.tile:focus-visible {
  background: rgba(200,91,64,.06);
  border-color: var(--color-accent);
}
.tile:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

.tile-word {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text);
}
.tile-sub {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
}

/* Isabella single-phone centering wrapper */
.tile-solo-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}
.tile-solo-row .tile {
  width: calc(50% - 5px);
}

/* ── QR section ──────────────────────────────────────────────── */
.qr-section {
  margin-top: 18px;
  text-align: center;
}

.qr-toggle {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  padding: 8px 10px;
  min-height: 44px;
  transition: color .3s var(--ease-premium);
  -webkit-tap-highlight-color: transparent;
}
.qr-toggle:hover,
.qr-toggle:focus-visible { color: var(--color-text); }
.qr-toggle:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

.qr-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .5s var(--ease-premium), opacity .4s var(--ease-premium);
}
.qr-panel.open {
  max-height: 320px;
  opacity: 1;
}

.qr-inner {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.qr-tile {
  padding: 14px;
  background: #F3E8D8;
  border-radius: 14px;
  line-height: 0;
}

.qr-caption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ── Film grain ──────────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
