/* ------------------------------------------------------------------
   Plisco LLC — shared design system
   Used by index.html and 404.html
   ------------------------------------------------------------------ */

:root {
  --bg: #08090b;
  --bg-lift: #0e1013;
  --frame: #16181d;
  --frame-edge: #2a2d34;
  --ink: #f2f0ea;
  --dim: #8b8e95;
  --faint: #55585f;
  --accent: #fa7343;
  --accent-deep: #c74e22;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 56px 24px;
  position: relative;
  overflow-x: hidden;
}

/* Warm ambient bloom, offset above centre so the phone sits in the light */
body::before {
  content: "";
  position: fixed;
  top: 42%;
  left: 50%;
  width: min(760px, 150vw);
  aspect-ratio: 1;
  background:
    radial-gradient(
      circle,
      rgba(250, 115, 67, 0.16) 0%,
      rgba(250, 115, 67, 0.05) 42%,
      rgba(250, 115, 67, 0) 70%
    );
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

/* Fine grain — kills the flatness of large dark fields */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- stage ---------- */

.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 44px;
  max-width: 420px;
  width: 100%;
}

/* Staggered entrance */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.9s var(--ease) forwards;
}

.reveal-1 {
  animation-delay: 0.05s;
}
.reveal-2 {
  animation-delay: 0.16s;
}
.reveal-3 {
  animation-delay: 0.3s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- wordmark ---------- */

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.wordmark span {
  color: var(--accent);
}

a.home-wordmark {
  text-decoration: none;
  transition: opacity 0.35s var(--ease);
}

a.home-wordmark:hover {
  opacity: 0.62;
}

/* Hairline rules flanking the wordmark */
.wordmark::before,
.wordmark::after {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 240, 234, 0.22));
  margin-right: 16px;
}

.wordmark::after {
  background: linear-gradient(90deg, rgba(242, 240, 234, 0.22), transparent);
  margin: 0 0 0 16px;
}

/* ---------- phone mockup ---------- */

/* Two nested elements on purpose: the outer .reveal animates opacity +
   transform once on load, the inner .phone-wrap animates transform forever.
   Putting both on one element makes the two `animation` shorthands collide,
   and the float silently wins — leaving the phone stuck at opacity 0. */
.phone-wrap {
  position: relative;
  animation: float 7s ease-in-out infinite;
}

/* Soft contact shadow on the "floor" */
.phone-wrap::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -34px;
  width: 62%;
  height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  filter: blur(6px);
  pointer-events: none;
}

.phone {
  position: relative;
  width: 224px;
  height: 456px;
  flex: none;
  border-radius: 42px;
  padding: 9px;
  background: linear-gradient(160deg, #2e3138 0%, #16181d 34%, #0f1114 100%);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.09) inset,
    0 0 0 1px rgba(0, 0, 0, 0.7),
    0 2px 5px rgba(0, 0, 0, 0.5),
    0 18px 34px -12px rgba(0, 0, 0, 0.6),
    0 48px 80px -28px rgba(0, 0, 0, 0.85);
}

/* Specular edge highlight sweeping the top-left rim */
.phone::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.02) 26%,
    rgba(255, 255, 255, 0) 55%,
    rgba(255, 255, 255, 0.06) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(
      120% 80% at 50% 0%,
      rgba(250, 115, 67, 0.1) 0%,
      rgba(250, 115, 67, 0) 58%
    ),
    linear-gradient(158deg, #15171c 0%, #1c1a21 52%, #241a1d 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

/* Faint screen glare */
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0) 34%
  );
  pointer-events: none;
}

.notch {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 74px;
  height: 21px;
  background: #050607;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.app-icon {
  width: 62px;
  height: 62px;
  border-radius: 17px;
  display: block;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 10px 22px -6px rgba(250, 115, 67, 0.45),
    0 22px 44px -14px rgba(0, 0, 0, 0.7);
}

.bars {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 112px;
}

.bar {
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(242, 240, 234, 0.17),
    rgba(242, 240, 234, 0.07)
  );
}

.bar:nth-child(1) {
  width: 100%;
}
.bar:nth-child(2) {
  width: 68%;
}
.bar:nth-child(3) {
  width: 84%;
}

/* Screen content for the 404 page */
.screen-code {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 60px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.screen-code span {
  color: var(--accent);
}

.screen-note {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- text blocks ---------- */

.legal {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--dim);
  line-height: 1.75;
}

.legal .name {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}

.legal .rule {
  width: 22px;
  height: 1px;
  background: rgba(242, 240, 234, 0.14);
  margin: 8px auto 10px;
}

.legal .fine {
  color: var(--faint);
  font-size: 11px;
  margin-top: 6px;
}

.legal a {
  color: var(--dim);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition:
    color 0.35s var(--ease),
    background-size 0.35s var(--ease);
  padding-bottom: 2px;
}

.legal a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.message h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.message p {
  font-size: 12px;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--dim);
  max-width: 300px;
}

.home-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  padding: 11px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1c1f25 0%, #14161a 100%);
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.07) inset,
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 6px 16px -6px rgba(0, 0, 0, 0.8);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    color 0.35s var(--ease);
}

.home-link:hover {
  transform: translateY(-1px);
  color: #fff;
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.1) inset,
    0 0 0 1px rgba(250, 115, 67, 0.35),
    0 10px 24px -8px rgba(250, 115, 67, 0.28);
}

.home-link:active {
  transform: translateY(0);
}

.home-link svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s var(--ease);
}

.home-link:hover svg {
  transform: translateX(-3px);
}

/* ---------- accessibility & responsive ---------- */

@media (prefers-reduced-motion: reduce) {
  .phone-wrap {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 420px) {
  body {
    padding: 36px 20px;
  }
  .stage {
    gap: 36px;
  }
  .phone {
    width: 196px;
    height: 400px;
    border-radius: 38px;
  }
  .screen {
    border-radius: 31px;
  }
  .screen-code {
    font-size: 50px;
  }
  .wordmark::before,
  .wordmark::after {
    width: 16px;
  }
}

@media (max-height: 760px) {
  .phone {
    width: 180px;
    height: 366px;
    border-radius: 34px;
  }
  .screen {
    border-radius: 27px;
  }
  .app-icon {
    width: 52px;
    height: 52px;
  }
}
