:root {
  --bg-1: #0b1120;
  --bg-2: #111a2e;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --text: #e6edf6;
  --muted: #94a3b8;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-2), transparent),
    linear-gradient(180deg, var(--bg-1), #05080f);
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 460px;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* === Animated PocketDial wordmark — the "p" flips 180° into the "d" === */
@font-face {
  font-family: "Nature Beauty";
  src: url("/fonts/nature-beauty.ttf") format("truetype");
  font-display: block;
}

.brand {
  margin: 0 0 0.5rem;
}

.pd-wordmark {
  font-family: "Nature Beauty", cursive;
  color: var(--text); /* body letters: o c k e t i a */
  font-size: clamp(1.6rem, 8vw, 2.7rem);
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  position: relative;
}
.pd-stage { position: relative; display: inline-block; }
.pd-ltr { display: inline-block; }

.pd-mover,
.pd-mover-b {
  position: absolute;
  pointer-events: none;
  font: inherit;
  line-height: 1;
  display: none;
}
/* True-centre pivot: a 180° turn keeps the box in place; the landing is then
   centred on the "d" via --pd-tx-flip (computed in the inline script). */
.pd-mover { transform-origin: 50% 50%; }

/* Accent letters p / d / l (and the movers). Swap var(--accent) for #c2410c
   to restore the font's original burnt-orange. */
.pd-ltr.pd-p, .pd-ltr.pd-d, .pd-ltr.pd-l,
.pd-mover, .pd-mover-b { color: var(--accent); }

.pd-stage.pd-js .pd-ltr { opacity: 0; }
.pd-stage.pd-js .pd-ltr.pd-p { opacity: 1; }

.pd-stage.pd-animate .pd-ltr.pd-p { opacity: 1; }
.pd-stage.pd-animate .pd-ltr.pd-d { opacity: 0; }

.pd-stage.pd-animate .pd-o,
.pd-stage.pd-animate .pd-k,
.pd-stage.pd-animate .pd-t,
.pd-stage.pd-animate .pd-a {
  animation: pd-slide-down 0.4s cubic-bezier(0.2, 0.8, 0.25, 1) 1.8s both;
}
.pd-stage.pd-animate .pd-c,
.pd-stage.pd-animate .pd-e,
.pd-stage.pd-animate .pd-i {
  animation: pd-slide-up 0.4s cubic-bezier(0.2, 0.8, 0.25, 1) 1.8s both;
}
.pd-stage.pd-animate .pd-l {
  animation: pd-l-from-d 0.35s cubic-bezier(0.2, 0.8, 0.25, 1) 1.3s forwards;
}

@keyframes pd-l-from-d {
  from { opacity: 1; transform: translateX(var(--pd-l-from-d, 0px)); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pd-slide-down { from { opacity: 0; transform: translateY(-1.1em); } to { opacity: 1; transform: translateY(0); } }
@keyframes pd-slide-up   { from { opacity: 0; transform: translateY( 1.1em); } to { opacity: 1; transform: translateY(0); } }

.pd-stage.pd-animate .pd-mover   { display: inline-block; animation: pd-flip 1.5s cubic-bezier(0.65, 0, 0.35, 1) 0.25s both; }
.pd-stage.pd-animate .pd-mover-b { display: inline-block; animation: pd-flop 1.5s cubic-bezier(0.65, 0, 0.35, 1) 0.25s both; }

@keyframes pd-flip {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  40%  { transform: translate(0, 0) rotate(180deg); opacity: 1;
         animation-timing-function: cubic-bezier(0.55, 0, 0.85, 0.4); }
  70%  { transform: translate(var(--pd-tx-flip, 0), var(--pd-ty-flip, 0)) rotate(180deg); opacity: 0; }
  100% { transform: translate(var(--pd-tx-flip, 0), var(--pd-ty-flip, 0)) rotate(180deg); opacity: 0; }
}
@keyframes pd-flop {
  0%   { transform: translate(0, 0); opacity: 0; }
  40%  { transform: translate(0, 0); opacity: 0;
         animation-timing-function: cubic-bezier(0.55, 0, 0.85, 0.4); }
  70%  { transform: translate(var(--pd-tx, 0), var(--pd-ty, 0)); opacity: 1; }
  100% { transform: translate(var(--pd-tx, 0), var(--pd-ty, 0)); opacity: 1; }
}

.tagline {
  margin: 0.9rem 0 0.4rem;
  font-size: 1.2rem;
  color: var(--text);
}

.subtagline {
  margin: 0 0 1.6rem;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.08);
}

.contact {
  margin: 1.75rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.contact a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.contact a:hover {
  color: var(--accent);
}

.foot {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Respect reduced-motion: show the finished word, skip the flip animation. */
@media (prefers-reduced-motion: reduce) {
  .pd-stage.pd-js .pd-ltr { opacity: 1 !important; animation: none !important; }
  .pd-stage.pd-js .pd-mover,
  .pd-stage.pd-js .pd-mover-b { display: none !important; }
}
