:root {
  --bg:        #f2ede0;
  --bg-soft:   #ebe5d4;
  --ink:       #1a1a1a;
  --ink-soft:  #5a564e;
  --muted:     #8a8478;
  --rule:      rgba(26,26,26,0.18);
  --rule-soft: rgba(26,26,26,0.10);
  --navy:      #1f3a93;
  --paper:     #fffaf0;
}
[data-theme="dark"] {
  --bg:        #16140f;
  --bg-soft:   #1f1c16;
  --ink:       #efe9da;
  --ink-soft:  #b9b1a0;
  --muted:     #7a7466;
  --rule:      rgba(239,233,218,0.22);
  --rule-soft: rgba(239,233,218,0.12);
  --navy:      #8aa6f0;
  --paper:     #1f1c16;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 320ms ease, color 320ms ease, border-color 320ms ease;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* top bar */
.topbar {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 28px 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
@media (max-width: 640px) {
  .topbar { padding: 22px 22px 8px; }
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--navy);
  color: var(--navy);
  background: transparent;
  border-radius: 999px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.toggle:hover { background: var(--navy); color: var(--paper); }
.toggle .ic { width: 14px; height: 14px; }

/* hero block */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 22px 80px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.name {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(46px, 13vw, 160px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.name .it {
  font-style: italic;
  color: var(--navy);
  font-variation-settings: "SOFT" 100;
}
.name .dot { color: var(--ink); }

/* tagline with animated caret */
.tagline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(17px, 2.6vw, 22px);
  color: var(--ink-soft);
  margin-top: 28px;
  font-weight: 300;
  max-width: 36ch;
}
.tagline::after {
  content: '▌';
  color: var(--navy);
  animation: blink 1.1s step-end infinite;
  margin-left: 2px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* buttons — phone extension style */
.buttons {
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 440px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    transform 220ms cubic-bezier(.2,.8,.2,1);
  white-space: nowrap;
  overflow: hidden;
}

/* paw cursor on hover */
.btn:hover {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ctext y='24' font-size='22'%3E%F0%9F%90%BE%3C/text%3E%3C/svg%3E") 16 16, pointer;
}

/* EXT badge */
.btn .ext {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  transition: color 220ms ease, opacity 220ms ease;
  flex-shrink: 0;
}

/* arrow and phone icon transitions */
.btn .arrow {
  display: inline-block;
  transition: opacity 200ms ease, transform 240ms cubic-bezier(.2,.8,.2,1);
}
.btn .phone-ic {
  position: absolute;
  right: 18px;
  opacity: 0;
  transition: opacity 200ms ease;
}

/* default hover */
.btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.btn:hover .arrow   { opacity: 0; transform: translateX(3px); }
.btn:hover .phone-ic { opacity: 1; }
.btn:hover .ext     { color: var(--bg); opacity: 0.75; }

/* per-person hover colors */
.btn[data-person="harry"]:hover   { background: #6b3a1f; border-color: #6b3a1f; color: #fff; }
.btn[data-person="rebekah"]:hover { background: #7a2040; border-color: #7a2040; color: #fff; }
.btn[data-person="jarvis"]:hover  { background: #1a5440; border-color: #1a5440; color: #fff; }
.btn[data-person="martha"]:hover  { background: #3b1a70; border-color: #3b1a70; color: #fff; }

/* footer */
footer {
  border-top: 1px solid var(--rule-soft);
  padding: 30px 22px 36px;
  text-align: center;
}
.foot {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 404 modal (Rebekah) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 8, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 100;
  opacity: 0;
  transition: opacity 240ms ease;
}
.modal-backdrop.open { opacity: 1; }
.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 40px 32px 36px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.28),
    0 0 0 1px var(--rule-soft);
  transform: scale(0.96) translateY(8px);
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
}
[data-theme="dark"] .modal {
  background: var(--bg-soft);
}
.modal-backdrop.open .modal { transform: none; }

.modal-eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.modal-title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 6.5vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--navy);
  font-variation-settings: "SOFT" 100;
  margin-bottom: 18px;
}
.modal-body {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 auto 28px;
  max-width: 32ch;
}
.modal .btn {
  min-width: 160px;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* entrance animation, soft */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.eyebrow { animation: rise 900ms 100ms both ease-out; }
.name    { animation: rise 1000ms 250ms both cubic-bezier(.2,.8,.2,1); }
.tagline { animation: rise 900ms 500ms both ease-out; }
.buttons .btn:nth-child(1) { animation: rise 800ms 700ms both ease-out; }
.buttons .btn:nth-child(2) { animation: rise 800ms 800ms both ease-out; }
.buttons .btn:nth-child(3) { animation: rise 800ms 900ms both ease-out; }
.buttons .btn:nth-child(4) { animation: rise 800ms 1000ms both ease-out; }

/* cat rain keyframe */
@keyframes catFall {
  from { transform: translateY(-60px) rotate(0deg); opacity: 1; }
  to   { transform: translateY(110vh) rotate(360deg); opacity: 0.8; }
}
.cat-rain {
  position: fixed;
  top: -60px;
  pointer-events: none;
  z-index: 9999;
  animation: catFall linear forwards;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
