/* ─── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --navy-deep:   #09182b;
  --navy-mid:    #0d1f38;
  --navy-light:  #162d4f;
  --gold:        #c9a95a;
  --gold-soft:   rgba(201, 169, 90, 0.18);
  --panel:       #ffffff;
  --text:        #111827;
  --muted:       #6b7280;
  --line:        rgba(17, 24, 39, 0.10);
  --shadow:      0 32px 80px rgba(9, 24, 43, 0.55), 0 4px 16px rgba(9, 24, 43, 0.25);
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
html, body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background-color: var(--navy-deep);
  background-image: linear-gradient(
    145deg,
    var(--navy-deep)  0%,
    var(--navy-mid)   35%,
    #112244           60%,
    var(--navy-light) 80%,
    var(--navy-deep)  100%
  );
  background-size: 300% 300%;
  animation: bgShift 28s ease-in-out infinite;
}

/* ─── Animated background glow ──────────────────────────────────────────── */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 45% at 15% 20%, var(--gold-soft), transparent),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(14, 62, 120, 0.22), transparent);
  animation: glowDrift 32s ease-in-out infinite alternate;
}

/* ─── Page layout ────────────────────────────────────────────────────────── */
.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2.5rem 1.25rem;
}

/* ─── Card ───────────────────────────────────────────────────────────────── */
.card {
  position: relative;
  width: min(100%, 488px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: cardIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─── House-mark watermark ───────────────────────────────────────────────── */
.house-mark {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  width: 200px;
  height: 200px;
  opacity: 0.055;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
}

/* ─── Card content ───────────────────────────────────────────────────────── */
.card-content {
  position: relative;
  z-index: 1;
  padding: clamp(2.5rem, 8vw, 4.5rem) clamp(2rem, 7vw, 4rem);
  text-align: center;
}

/* ─── Logo ───────────────────────────────────────────────────────────────── */
.logo-wrap {
  display: flex;
  justify-content: center;
  animation: logoIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.logo {
  display: block;
  width: min(300px, 78%);
  height: auto;
}

/* ─── Gold rule ──────────────────────────────────────────────────────────── */
.rule {
  width: 52px;
  height: 1px;
  margin: 2rem auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: ruleIn 1.2s ease 0.6s both;
}

/* ─── Heading ────────────────────────────────────────────────────────────── */
h1 {
  margin: 0;
  font-size: clamp(1.55rem, 5vw, 2.1rem);
  font-weight: normal;
  letter-spacing: 0.04em;
  color: var(--navy-deep);
  line-height: 1.2;
  animation: contentIn 1s ease 0.5s both;
}

/* ─── Message ────────────────────────────────────────────────────────────── */
.message {
  margin: 1.25rem auto 0;
  max-width: 30rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: clamp(0.92rem, 2.5vw, 1.05rem);
  color: var(--muted);
  line-height: 1.7;
  animation: contentIn 1s ease 0.65s both;
}

/* ─── Contact row ────────────────────────────────────────────────────────── */
.contact-row {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  animation: contentIn 1s ease 0.8s both;
}

.contact {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.email-link {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--navy-deep);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.05em;
  transition: color 0.2s, border-color 0.2s;
}

.email-link:hover,
.email-link:focus-visible {
  color: #7a6030;
  border-color: #7a6030;
  outline: none;
}

.email-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ─── Keyframes ──────────────────────────────────────────────────────────── */
@keyframes bgShift {
  0%, 100% { background-position:   0%   0%; }
  33%       { background-position: 100%  30%; }
  66%       { background-position:  50% 100%; }
}

@keyframes glowDrift {
  from {
    background:
      radial-gradient(ellipse 60% 45% at 15% 20%, var(--gold-soft), transparent),
      radial-gradient(ellipse 50% 40% at 85% 75%, rgba(14, 62, 120, 0.22), transparent);
  }
  to {
    background:
      radial-gradient(ellipse 55% 50% at 78% 18%, var(--gold-soft), transparent),
      radial-gradient(ellipse 55% 45% at 22% 78%, rgba(14, 62, 120, 0.22), transparent);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0)   scale(1);
  }
}

@keyframes logoIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ruleIn {
  from { opacity: 0; width: 0; }
  to   { opacity: 1; width: 52px; }
}

@keyframes contentIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
    background-size: 100% 100%;
  }

  .bg-glow {
    animation: none;
  }

  .card,
  .logo-wrap,
  .rule,
  h1,
  .message,
  .contact-row {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .email-link {
    transition: none;
  }
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .page-shell {
    padding: 1.5rem 1rem;
  }

  .house-mark {
    width: 150px;
    height: 150px;
    bottom: -1rem;
    right: -1rem;
  }
}
