/* ===========================================================
   GULF COAST LEGACY ADVISORS — Digital Business Card
   /card/card.css   (self-contained: no site CSS required)
   =========================================================== */

:root {
  --navy: #0D1B3E;
  --navy-mid: #162550;
  --navy-deep: #0A1530;
  --navy-dark: #0B1020;
  --gold: #C9A227;
  --gold-light: #E8D280;
  --gold-highlight: #F5ECC7;
  --cream: #F8F7F3;
  --ice: #E2ECF8;
  --muted: #A9B6CC;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--navy-dark); }

body {
  margin: 0;
  color: var(--cream);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 50% 10%, rgba(201, 162, 39, 0.16), transparent 34rem),
    linear-gradient(145deg, #0B1020, #0D1B3E 52%, #080D1A);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, a { font: inherit; }
img { display: block; max-width: 100%; height: auto; }

.page-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 36px 18px 44px;
}

.card-stage {
  width: min(100%, 1080px);
  text-align: center;
}

/* ---------- Page heading ---------- */
.eyebrow {
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 5vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #FFFFFF;
}

.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.12rem);
}

/* ---------- Flip card ---------- */
.card-shell { container-type: inline-size; }

.flip-card {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: clamp(12px, 2vw, 24px);
  background: transparent;
  cursor: pointer;
  perspective: 1800px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 42px rgba(201, 162, 39, 0.10);
}

.flip-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.72s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.is-flipped .flip-card-inner { transform: rotateY(180deg); }

.card-face {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  text-align: left;
  background: linear-gradient(145deg, #0D1B3E 0%, #162550 52%, #0A1530 100%);
}

.card-back { transform: rotateY(180deg); }

/* Compass-rose glow + hairline gold frame shared by both faces */
.card-face::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(201, 162, 39, 0.16), transparent 46%),
    radial-gradient(circle at 12% 88%, rgba(31, 122, 140, 0.20), transparent 52%);
  pointer-events: none;
}

.card-face::after {
  content: "";
  position: absolute;
  inset: 1.6cqw;
  border: 1px solid rgba(201, 162, 39, 0.32);
  border-radius: 0.8cqw;
  pointer-events: none;
}

.face-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  gap: 3cqw;
  padding: 4.4cqw 5cqw;
}

/* =======================  FRONT  ======================= */
.front-inner { grid-template-columns: 1.02fr 1fr; align-items: center; }

.brand-block { display: grid; gap: 1.6cqw; justify-items: start; }

.logo-plate {
  width: 20cqw;
  height: 20cqw;
  border-radius: 50%;
  background: #FFFFFF;
  border: 0.28cqw solid var(--gold);
  box-shadow: 0 0.6cqw 2cqw rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-plate img { width: 92%; height: 92%; object-fit: contain; }

/* Front: circular headshot filling the gold ring */
.photo-plate { padding: 0; background: #FFFFFF; }

.photo-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  border-radius: 50%;
}

.brand-name {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.5cqw;
  line-height: 1.08;
  color: #FFFFFF;
  letter-spacing: 0.005em;
}

.brand-rule {
  display: block;
  width: 8cqw;
  height: 0.32cqw;
  background: var(--gold);
  border-radius: 999px;
  margin: 0.4cqw 0 0.2cqw;
}

.brand-tagline {
  display: block;
  margin: 0;
  font-size: 1.62cqw;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  line-height: 1.5;
}

/* Right column of the front */
.person-id { display: block; }

.person-block {
  display: grid;
  gap: 1.5cqw;
  align-content: center;
  padding-left: 4cqw;
  border-left: 1px solid rgba(201, 162, 39, 0.34);
  height: 78%;
  align-items: center;
}

.person-name {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 5.4cqw;
  line-height: 1.05;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.person-title {
  display: block;
  margin: 0;
  font-size: 1.72cqw;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.5;
}

.contact-list { display: grid; gap: 1.15cqw; margin-top: 0.5cqw; }

.contact-row {
  display: grid;
  grid-template-columns: 2.6cqw 1fr;
  align-items: center;
  gap: 1.4cqw;
  font-size: 1.9cqw;
  line-height: 1.35;
  color: #EDF2FA;
  letter-spacing: 0.01em;
}

.contact-row svg {
  width: 2.6cqw;
  height: 2.6cqw;
  color: var(--gold);
  flex-shrink: 0;
}

/* =======================  BACK  ======================= */
.back-inner {
  grid-template-columns: 0.82fr 1fr;
  gap: 3.4cqw;
  padding: 4cqw 5cqw 4cqw 4cqw;
  align-items: center;
}

.portrait-wrap {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Back: GCLA logo mark, gold on navy, no plate */
.logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
}

.logo-mark img {
  width: 78%;
  max-width: 44cqw;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0.5cqw 1.4cqw rgba(0, 0, 0, 0.45));
}

.portrait-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56cqw;
  height: 56cqw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.30), transparent 72%);
}

.credential-block {
  align-self: center;
  display: grid;
  gap: 1.5cqw;
  padding: 1cqw 0;
}

.back-label {
  display: block;
  margin: 0;
  font-size: 1.6cqw;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.back-name {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.4cqw;
  line-height: 1.08;
  color: #FFFFFF;
}

.back-rule {
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.75), rgba(201, 162, 39, 0));
}

.licensed-states {
  display: block;
  margin: 0;
  font-size: 2.1cqw;
  font-weight: 600;
  color: #EDF2FA;
  letter-spacing: 0.02em;
}

.license-grid { display: grid; gap: 1.15cqw; }

.license-item { display: grid; gap: 0.25cqw; }

.license-item .k {
  display: block;
  font-size: 1.42cqw;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.license-item .v {
  display: block;
  font-size: 2.5cqw;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.back-foot {
  display: block;
  margin: 0.3cqw 0 0;
  font-size: 1.5cqw;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Hint + actions ---------- */
.flip-card:focus-visible,
.action:focus-visible,
.flip-hint:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.flip-hint {
  display: block;
  margin: 14px auto 18px;
  border: 0;
  background: transparent;
  color: #C6D2E4;
  cursor: pointer;
  font-size: 0.9rem;
}

.flip-hint span { color: var(--gold); font-size: 1.1rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.action {
  min-width: 118px;
  padding: 11px 17px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.action:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.14);
  color: #FFFFFF;
}

.action.primary {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
}

.action.primary:hover { background: var(--gold-light); color: var(--navy); }

.license {
  margin: 20px 0 0;
  color: #8FA9C4;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.back-home {
  display: inline-block;
  margin-top: 14px;
  color: #8FA9C4;
  font-size: 0.8rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(143, 169, 196, 0.35);
}

.back-home:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .page-shell { align-items: start; padding-top: 26px; }
  .action { flex: 1 1 calc(50% - 10px); min-width: 0; }

  /* Portrait card proportions so every line stays readable on a phone */
  .flip-card { aspect-ratio: 3 / 4; }
  .card-face::after { inset: 2.6cqw; border-radius: 1.6cqw; }
  .face-inner { padding: 7cqw; gap: 4cqw; align-content: center; }

  /* Front */
  .front-inner { grid-template-columns: 1fr; }
  .brand-block { gap: 2.4cqw; }
  .logo-plate { width: 26cqw; height: 26cqw; border-width: 0.5cqw; }
  .brand-name { font-size: 7cqw; }
  .brand-rule { width: 14cqw; height: 0.55cqw; }
  .brand-tagline { font-size: 2.7cqw; letter-spacing: 0.12em; }

  .person-block {
    height: auto;
    padding-left: 0;
    padding-top: 4.5cqw;
    border-left: 0;
    border-top: 1px solid rgba(201, 162, 39, 0.34);
    gap: 3.5cqw;
  }
  .person-name { font-size: 9cqw; }
  .person-title { font-size: 3cqw; letter-spacing: 0.13em; }
  .contact-list { gap: 2.6cqw; }
  .contact-row { grid-template-columns: 5cqw 1fr; gap: 3cqw; font-size: 3.5cqw; }
  .contact-row svg { width: 5cqw; height: 5cqw; }

  /* Back */
  .back-inner {
    grid-template-columns: 1fr;
    padding: 6cqw 7cqw;
    gap: 4cqw;
    align-items: center;
  }
  .portrait-wrap { height: auto; }
  .portrait-wrap::before { width: 68cqw; height: 68cqw; }
  .logo-mark img { width: 66%; max-width: 62cqw; }
  .credential-block { gap: 2.6cqw; padding: 0; }
  .back-label { font-size: 2.9cqw; }
  .back-name { font-size: 8cqw; }
  .licensed-states { font-size: 4cqw; }
  .license-grid { gap: 2.4cqw; }
  .license-item .k { font-size: 2.7cqw; }
  .license-item .v { font-size: 5.4cqw; }
  .back-foot { font-size: 2.7cqw; }
}

@media (prefers-reduced-motion: reduce) {
  .flip-card-inner, .action { transition: none; }
}
