:root {
  --black: #090909;
  --panel: #11110f;
  --panel-2: #171611;
  --gold-light: #f4d58a;
  --gold: #d3a64c;
  --gold-dark: #8e641e;
  --ivory: #f3ead5;
  --muted: #b9ad96;
  --border: rgba(222, 178, 88, 0.44);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ivory);
  background:
    radial-gradient(circle at 12% 8%, rgba(154, 108, 31, 0.16), transparent 31rem),
    radial-gradient(circle at 90% 84%, rgba(177, 128, 41, 0.11), transparent 28rem),
    var(--black);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button, a { -webkit-tap-highlight-color: transparent; }

button { font: inherit; }

a { color: inherit; }

.shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.masthead {
  min-height: 112px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  width: 64px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 25px;
  letter-spacing: -3px;
  box-shadow: inset 0 0 0 5px var(--black), inset 0 0 0 6px rgba(211, 166, 76, 0.38);
}

.masthead h1,
.contact-panel h2,
dialog h2 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
}

.masthead h1 {
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tagline {
  margin: 0;
  color: var(--gold-light);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-style: italic;
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(330px, 0.62fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
  padding: 44px 0;
}

.card-column { min-width: 0; }

.card-scene {
  display: block;
  width: 100%;
  aspect-ratio: 1.75;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  perspective: 1600px;
  cursor: pointer;
  filter: drop-shadow(var(--shadow));
}

.card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 700ms cubic-bezier(.2, .72, .25, 1);
}

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

.card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid var(--gold-dark);
  border-radius: 6px;
  background: #101010;
  backface-visibility: hidden;
}

.card-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.flip-hint {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 17px auto 0;
  padding: 6px 10px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  cursor: pointer;
}

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

.contact-panel {
  padding: 32px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(25, 24, 19, 0.96), rgba(12, 12, 11, 0.98));
  box-shadow: var(--shadow);
}

.contact-heading { margin-bottom: 22px; }

.contact-panel h2,
dialog h2 {
  color: var(--ivory);
  font-size: clamp(27px, 3vw, 37px);
  line-height: 1.1;
}

.phone-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.action-icon {
  width: 42px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-dark);
  border-radius: 50%;
  color: var(--gold);
}

.phone-link small,
.code-block small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.phone-link strong {
  display: block;
  margin-top: 2px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.arrow { color: var(--gold); font-size: 30px; }

.code-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 19px 0;
}

.code-block strong {
  color: var(--gold-light);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 26px;
  letter-spacing: 0.12em;
}

.copy-button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ivory);
  background: transparent;
  cursor: pointer;
}

.primary-actions,
.dialog-actions { display: grid; gap: 11px; }

.button {
  min-height: 54px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button-gold {
  color: #17130b;
  background: linear-gradient(100deg, var(--gold-dark), var(--gold-light) 50%, var(--gold));
}

.button-dark { color: var(--ivory); background: transparent; }

.save-contact {
  display: block;
  margin-top: 17px;
  color: var(--gold-light);
  font-size: 14px;
  text-align: center;
  text-underline-offset: 4px;
}

.share-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

footer {
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
}

footer p { margin: 0; }
footer a { color: var(--gold-light); text-underline-offset: 4px; }

dialog {
  width: min(520px, calc(100% - 30px));
  padding: 34px;
  border: 1px solid var(--gold);
  color: var(--ivory);
  background: var(--panel);
  box-shadow: var(--shadow);
}

dialog::backdrop { background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(4px); }
dialog > p:not(.eyebrow) { color: var(--muted); }
.dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 27px;
  cursor: pointer;
}

:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }

@media (hover: hover) {
  .button, .phone-link, .save-contact, .copy-button { transition: transform 160ms ease, filter 160ms ease, color 160ms ease; }
  .button:hover, .phone-link:hover { transform: translateY(-2px); filter: brightness(1.09); }
  .copy-button:hover, .save-contact:hover { color: white; }
}

@media (max-width: 900px) {
  .shell { width: min(720px, calc(100% - 28px)); }
  .masthead { grid-template-columns: auto 1fr; padding: 16px 0; }
  .tagline { display: none; }
  .layout { grid-template-columns: 1fr; gap: 30px; padding: 30px 0; }
  .contact-panel { padding: 28px; }
}

@media (max-width: 520px) {
  .shell { width: calc(100% - 20px); }
  .masthead { min-height: 86px; gap: 13px; }
  .brand-mark { width: 50px; font-size: 20px; }
  .masthead h1 { font-size: 21px; letter-spacing: 0.07em; }
  .eyebrow { font-size: 11px; }
  .layout { padding: 22px 0 28px; }
  .card-scene { border-radius: 3px; }
  .contact-panel { padding: 23px 20px; }
  .phone-link strong { font-size: 20px; }
  footer { padding: 18px 0; align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .button, .phone-link, .save-contact, .copy-button { transition: none; }
}
