/* Digital business card. Requires base.css */

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* One container: details + slogan + full-width footer */
.container {
  width: 100%;
  max-width: 420px;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ---------- Details ---------- */
.details { display: flex; flex-direction: column; text-align: center; }

.banner {
  position: relative;
  flex: 1 0 100px;
  min-height: 100px;
  overflow: hidden;
  background: var(--gradient);
}
.banner.has-img { flex: 0 0 auto; min-height: 0; aspect-ratio: 5 / 1; background: #fff; } /* 5:1 like the crop window, so the whole picture shows on every screen; background shows behind transparent banners: white in light theme, black in dark */
:root[data-theme="dark"] .banner.has-img { background: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner.has-img { background: #000; } }
.banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.photo {
  position: relative;
  z-index: 3;
  display: block;
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  margin: -52px auto 0;
  border: 5px solid var(--photo-border);
  border-radius: 50%;
  object-fit: cover;
  background: #fff; /* behind a transparent logo: white in light theme, black in dark */
  box-shadow: 0 8px 24px var(--glow);
}

.body { padding: 8px 28px 22px; }

h1 { margin-top: 6px; font-size: 26px; color: var(--brand-text); }
.job { margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--text); }
.company {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: linear-gradient(to right, var(--brand-text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tagline { margin-top: 2px; font-size: 13px; color: var(--muted); }

.btn-primary { margin-top: 18px; }
.btn-outline { margin-top: 10px; }

.list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
  text-align: left;
}
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.item:hover { background: var(--surface-hover); box-shadow: 0 0 16px var(--glow); }

.ico {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 50%;
  background: var(--ico-bg);
  box-shadow: var(--shadow-soft);
}
.ico svg { width: 17px; height: 17px; fill: var(--ico-fill); }

.txt { min-width: 0; }
.label {
  display: block;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.value { display: block; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Slogan / ad banner (rotating slides) ---------- */
.slogan { position: relative; padding: 14px; background: var(--gradient); overflow: hidden; }
.slogan.has-slides { padding: 0; aspect-ratio: 1 / 1; }

.slide {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease, visibility 0s linear .8s;
}
.slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.slide { overflow: hidden; }
/* Banner pictures are resized to fit the panel (never cropped). A blurred copy fills the spare space. */
.slide > img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; }
.slide > img.slide-bg { z-index: 0; object-fit: cover; filter: blur(22px) saturate(1.15) brightness(.9); transform: scale(1.2); }

.caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 36px 22px 44px;
  background: linear-gradient(to top, var(--caption-grad), transparent);
}
.caption h2 { font-size: 20px; line-height: 1.25; font-weight: 700; }
.caption p { margin-top: 6px; font-size: 13px; opacity: .92; }

.dots {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.dots button.is-active { background: #fff; transform: scale(1.3); }
.dots button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.social {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.has-slides .social { position: absolute; top: 14px; left: 14px; right: 14px; justify-content: flex-end; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 50px;
  background: var(--pill-bg);
  color: var(--pill-text);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18), 0 0 14px var(--glow);
  transition: transform .15s;
}
.pill:hover { transform: translateY(-2px); }
.pill svg { width: 18px; height: 18px; fill: var(--pill-text); }
.pill-icon { width: 40px; height: 40px; padding: 0; justify-content: center; }
.pill-icon svg { width: 19px; height: 19px; }

/* Google review button */
.btn-review {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--text);
  background: var(--surface-2);
  border: 2px solid var(--border-strong);
}
.btn-review svg { width: 19px; height: 19px; fill: #f9ab00; }

/* ---------- Footer ---------- */
footer {
  padding: 14px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--footer-text);
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
}
footer a { color: var(--footer-text); text-decoration-color: var(--accent); }
footer .version { display: inline-block; margin-left: 6px; opacity: .8; }

/* ---------- Desktop: one page, no scroll ---------- */
@media (min-width: 900px) {
  body { min-height: 100vh; padding: 20px; }

  .container {
    max-width: 1100px;
    /* Same one-page look as before, but the card grows if it holds more (Google review button, address). */
    min-height: min(640px, calc(100vh - 40px));
    grid-template-columns: 500px 1fr;
    grid-template-rows: 1fr auto;
  }

  .details { justify-content: flex-start; min-height: 0; }
  .body { padding: 8px 32px 18px; }
  .list { grid-template-columns: 1fr 1fr; }
  .list .item:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .slogan, .slogan.has-slides { min-height: 0; padding: 0; aspect-ratio: auto; }
  .social, .has-slides .social { position: absolute; top: 22px; left: 24px; right: 24px; justify-content: flex-end; }

  .caption { padding: 48px 36px 52px; }
  .caption h2 { font-size: 34px; }
  .caption p { font-size: 16px; margin-top: 8px; }
  .dots { bottom: 20px; }

  footer { grid-column: 1 / -1; }
}

/* ---------- 404 ---------- */
.notfound { padding: 48px 28px; text-align: center; }
.notfound h1 { margin: 0 0 8px; }
.notfound p { color: var(--muted); }

:root[data-theme="dark"] .photo { background: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .photo { background: #000; } }
