/* DannyAC — business card. Light theme only. */
:root {
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #64748b;
  --warm: #ea580c;
  --warm-d: #c2410c;
  --warm-dd: #9a3412;
  --cool: #0284c7;
  --cool-d: #0369a1;
  --cool-dd: #075985;
  --radius: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --grad: linear-gradient(90deg, #ea580c 0%, #f97316 30%, #0ea5e9 70%, #0284c7 100%);
}

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  background: #fbf7f3;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Background: warm ↔ cool ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(115deg, #fff1e6 0%, #fff8f2 34%, #f4f8fd 62%, #e5f1fd 100%);
}
.blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.b1 {
  width: 62vmax; height: 62vmax;
  left: -22vmax; top: -24vmax;
  background: radial-gradient(circle, rgba(251, 146, 60, .42) 0%, rgba(253, 186, 116, .22) 38%, transparent 68%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.b2 {
  width: 58vmax; height: 58vmax;
  right: -20vmax; bottom: -24vmax;
  background: radial-gradient(circle, rgba(56, 189, 248, .40) 0%, rgba(125, 211, 252, .22) 40%, transparent 68%);
  animation: drift-b 30s ease-in-out infinite alternate;
}
.b3 {
  width: 34vmax; height: 34vmax;
  right: 6vmax; top: -10vmax;
  background: radial-gradient(circle, rgba(186, 230, 253, .55) 0%, transparent 65%);
  animation: drift-c 22s ease-in-out infinite alternate;
}
.b4 {
  width: 30vmax; height: 30vmax;
  left: 4vmax; bottom: -8vmax;
  background: radial-gradient(circle, rgba(254, 215, 170, .6) 0%, transparent 65%);
  animation: drift-d 24s ease-in-out infinite alternate;
}
.dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(15, 23, 42, .085) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 80%);
}
@keyframes drift-a { to { transform: translate3d(9vmax, 7vmax, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(-8vmax, -6vmax, 0) scale(1.1); } }
@keyframes drift-c { to { transform: translate3d(-10vmax, 8vmax, 0) scale(.92); } }
@keyframes drift-d { to { transform: translate3d(8vmax, -7vmax, 0) scale(1.12); } }

/* ---------- Layout ---------- */
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: max(32px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.stage {
  width: min(100%, 620px);
  perspective: 1400px;
  animation: stage-in 1s var(--ease) both;
}
@keyframes stage-in {
  from { opacity: 0; transform: translateY(28px) scale(.97); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.float {
  transform-style: preserve-3d;
  animation: float 8s ease-in-out 1.2s infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.tilt {
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .7s var(--ease);
}
.tilt.is-tracking { transition: transform .12s linear; }

.card {
  display: grid;
  transform-style: preserve-3d;
  transition: transform .95s cubic-bezier(.3, 1.25, .45, 1);
}
.card.is-flipped { transform: rotateY(180deg); }

/* ---------- Faces ---------- */
.face {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 344px;
  padding: 34px 36px 32px;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 237, 213, .75), transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(224, 242, 254, .85), transparent 55%),
    rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 40px 80px -28px rgba(15, 23, 42, .28),
    0 18px 36px -18px rgba(234, 88, 12, .18),
    0 18px 40px -22px rgba(2, 132, 199, .22);
}
.back { transform: rotateY(180deg); }

/* pointer sheen */
.face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .75), transparent 42%);
  mix-blend-mode: soft-light;
  opacity: var(--sheen, 0);
  transition: opacity .5s var(--ease);
}
/* one-time light sweep after entrance */
.front::before {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .85) 50%, transparent 62%);
  background-size: 260% 100%;
  background-position: 130% 0;
  animation: sweep 1.6s var(--ease) 1.1s both;
  z-index: 2;
}
@keyframes sweep { to { background-position: -40% 0; } }

.watermark {
  position: absolute;
  right: -46px;
  bottom: -58px;
  width: 300px;
  height: 300px;
  z-index: -1;
  opacity: .075;
  pointer-events: none;
  transform: rotate(-12deg);
}

.accent {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5px;
  background: var(--grad);
}

/* ---------- Brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.badge {
  width: 60px; height: 60px;
  flex: none;
  border-radius: 18px;
  box-shadow: 0 10px 22px -10px rgba(234, 88, 12, .55), 0 10px 22px -12px rgba(2, 132, 199, .5);
  transition: transform .5s var(--ease);
}
.brand:hover .badge { transform: rotate(-6deg) scale(1.05); }
.brand-text { flex: 1; min-width: 0; }
.wordmark {
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--ink);
}
.wordmark span {
  background: linear-gradient(90deg, #c2410c 0%, #ea580c 30%, #0284c7 75%, #0369a1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .04em;
}
.kicker {
  margin-top: 7px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.tagline {
  margin-top: auto;
  padding-top: 26px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink-2);
  max-width: 36ch;
}

/* ---------- Phone ---------- */
.phone-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.phone {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: .3em;
  font-size: clamp(30px, 8.6vw, 42px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  border-radius: 10px;
  transition: color .3s var(--ease);
}
.phone .cc {
  font-size: .5em;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink-3);
  transform: translateY(-.15em);
}
.phone::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.phone:hover::after, .phone:focus-visible::after { transform: scaleX(1); }

/* ---------- Buttons ---------- */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.btn {
  --bg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 15px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .1s; }
.btn .ic { width: 19px; height: 19px; flex: none; }

.btn-warm {
  color: #fff;
  background: linear-gradient(180deg, #d9480f 0%, var(--warm-d) 55%, var(--warm-dd) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 12px 24px -12px rgba(194, 65, 12, .8);
}
.btn-warm:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 18px 30px -12px rgba(194, 65, 12, .85); }
.btn-cool {
  color: #fff;
  background: linear-gradient(180deg, #0379b5 0%, var(--cool-d) 55%, var(--cool-dd) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 12px 24px -12px rgba(3, 105, 161, .8);
}
.btn-cool:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 18px 30px -12px rgba(3, 105, 161, .85); }
.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .12) inset, 0 8px 18px -12px rgba(15, 23, 42, .35);
}
.btn-ghost:hover { background: #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .2) inset, 0 14px 24px -12px rgba(15, 23, 42, .35); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14.5px; border-radius: 13px; }

.btn:hover .ic-ring { animation: ring .7s var(--ease); }
.btn:hover .ic-pop  { animation: pop .5s var(--ease); }
.btn:hover .ic-drop { animation: nudge .5s var(--ease); }
@keyframes ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-16deg); }
  40% { transform: rotate(13deg); }
  60% { transform: rotate(-9deg); }
  80% { transform: rotate(5deg); }
}
@keyframes pop {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.22) translateY(-1px); }
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .1) inset, 0 6px 14px -10px rgba(15, 23, 42, .4);
  cursor: pointer;
  transition: transform .35s var(--ease), background-color .3s, box-shadow .3s;
}
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .18) inset, 0 12px 20px -12px rgba(15, 23, 42, .4); }
.icon-btn:active { transform: scale(.94); }
.flip-btn { align-self: flex-start; }
.flip-btn:hover svg { animation: pop .5s var(--ease); }
.copy-btn { width: 40px; height: 40px; border-radius: 12px; }
.copy-btn svg { width: 19px; height: 19px; }

/* tooltips (pointer devices) */
@media (hover: hover) {
  [data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    background: var(--ink);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .2s, transform .25s var(--ease);
  }
  [data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
}

/* focus */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--cool);
  outline-offset: 3px;
}
.btn-cool:focus-visible { outline-color: var(--warm-d); }

/* ---------- Back ---------- */
.back {
  display: grid;
  grid-template-columns: 208px 1fr;
  align-items: center;
  gap: 30px;
}
.qr-wrap {
  position: relative;
  width: 208px;
  aspect-ratio: 1;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .08) inset, 0 18px 36px -18px rgba(15, 23, 42, .35);
  overflow: hidden;
}
.qr, .qr svg { display: block; width: 100%; height: 100%; }
.qr-scan {
  position: absolute;
  left: 10px; right: 10px;
  top: 12px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
  box-shadow: 0 0 14px 2px rgba(14, 165, 233, .45);
  opacity: 0;
}
.card.is-flipped .qr-scan { animation: scan 2.6s ease-in-out .5s 2; }
@keyframes scan {
  0%   { top: 12px; opacity: 0; }
  12%  { opacity: .9; }
  50%  { top: calc(100% - 15px); }
  88%  { opacity: .9; }
  100% { top: 12px; opacity: 0; }
}
.back-copy { display: flex; flex-direction: column; align-items: flex-start; }
.back-copy h2 {
  margin-top: 8px;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.025em;
}
.back-text {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.phone-sm {
  margin-top: 16px;
  font-size: 22px;
  letter-spacing: -.02em;
}
.back-copy .btn { margin-top: 18px; }

/* ---------- Services + footer ---------- */
.services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 620px;
  padding: 0;
  list-style: none;
}
.services li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .08) inset, 0 6px 16px -12px rgba(15, 23, 42, .35);
  animation: rise .7s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms + 900ms);
  transition: transform .3s var(--ease), background-color .3s;
}
.services li:hover { transform: translateY(-2px); background: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.warm { background: var(--warm); box-shadow: 0 0 0 3px rgba(234, 88, 12, .15); }
.dot.cool { background: var(--cool); box-shadow: 0 0 0 3px rgba(2, 132, 199, .15); }
.dot.ink  { background: var(--ink-2); box-shadow: 0 0 0 3px rgba(71, 85, 105, .15); }

.foot {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  animation: rise .7s var(--ease) 1.3s both;
}

/* staggered reveal inside the card */
.reveal {
  animation: rise .8s var(--ease) both;
  animation-delay: calc(var(--i) * 85ms + 300ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 10;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .6);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mobile: vertical card ---------- */
@media (max-width: 639px) {
  .page { gap: 22px; justify-content: center; }
  .face { min-height: 0; padding: 28px 22px 28px; }
  .front { align-items: stretch; }
  .badge { width: 54px; height: 54px; border-radius: 16px; }
  .wordmark { font-size: 30px; }
  .kicker { font-size: 11.5px; letter-spacing: .18em; }
  .tagline { padding-top: 22px; font-size: 15.5px; }
  .phone-row { justify-content: space-between; gap: 8px; margin-top: 10px; }
  .phone { font-size: clamp(24px, 7.4vw, 31px); }
  .watermark { width: 230px; height: 230px; right: -54px; bottom: auto; top: 96px; opacity: .06; }
  .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 20px;
  }
  .actions .btn-ghost { grid-column: 1 / -1; }
  .btn { min-height: 54px; font-size: 16px; }

  .back {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 18px;
    padding-top: 26px;
  }
  .qr-wrap { width: min(184px, 56vw); padding: 13px; border-radius: 20px; }
  .back-copy { align-items: center; }
  .back-copy .kicker { display: none; }
  .back-copy h2 { margin-top: 0; font-size: 22px; }
  .back-text { margin-top: 8px; font-size: 14.5px; max-width: 30ch; }
  .phone-sm { margin-top: 12px; font-size: 21px; }
  .back-copy .btn { margin-top: 14px; }
}

@media (max-width: 359px) {
  .wordmark { font-size: 27px; }
  .phone { font-size: 23px; }
  .btn { padding: 0 14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  .front::before { display: none; }
}
