:root {
  color-scheme: dark;
  font-family: Inter, "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: #f1f1ef;
  background: #111111;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --muted: #858585;
  --line: #303030;
  --accent: #c8f169;
  --surface: #191919;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #111111;
}

button,
input {
  font: inherit;
}

.hero {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #0b111b 0%, #111111 72%);
  pointer-events: none;
}

.hero canvas {
  display: block;
  opacity: 0;
  transition: opacity 1400ms ease;
}

.hero-on .hero canvas {
  opacity: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.86) 0%, rgba(17, 17, 17, 0.6) 30%, rgba(17, 17, 17, 0) 52%),
    linear-gradient(0deg, rgba(17, 17, 17, 0.6) 0%, rgba(17, 17, 17, 0) 22%);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, 1040px);
  min-height: 100vh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

.landing {
  width: min(100%, 620px);
  margin: auto;
  padding: 72px 0 88px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 38px;
  font-size: clamp(56px, 10vw, 92px);
  font-weight: 600;
  letter-spacing: -0.085em;
  line-height: 0.98;
}

h1 span {
  color: var(--accent);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 72px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  color: #dededb;
  font-size: 12px;
  font-weight: 550;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.social-links a span {
  color: var(--muted);
}

.gate-form {
  width: min(100%, 370px);
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.gate-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #bdbdb9;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.gate-form label span {
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.password-row {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid #383838;
  background: var(--surface);
  transition: border-color 160ms ease;
}

.password-row:focus-within {
  border-color: #737d56;
}

.password-row input {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 0;
  outline: 0;
  color: #f1f1ef;
  background: transparent;
  font-size: 13px;
}

.password-row input::placeholder {
  color: #666666;
}

.password-row button {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 0;
  color: #111111;
  background: var(--accent);
  font-size: 21px;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}

.password-row button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.password-row button:active,
.logout-button:active {
  transform: scale(0.97);
}

.status {
  min-height: 18px;
  margin: 10px 0 0;
  color: #ed8c7e;
  font-size: 12px;
  line-height: 1.5;
}

.status:empty {
  min-height: 0;
  margin-top: 0;
}

.private-area {
  width: min(100%, 820px);
  margin: -22px auto 80px;
}

.private-area[hidden] {
  display: none;
}

.private-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-size: 30px;
  font-weight: 550;
  letter-spacing: -0.055em;
}

.logout-button {
  padding: 9px 0 7px 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
  transition: color 160ms ease, transform 160ms var(--ease-out);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 14px;
}

.app-card {
  min-height: 232px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 16px;
}

.app-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #3b3b3b;
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
}

.sales-card .app-icon {
  color: #e7bc79;
}

.daily-card .app-icon {
  color: #8fb7a6;
}

.card-copy {
  margin-top: 23px;
}

.app-category {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
}

.card-copy h3 {
  margin: 0 0 7px;
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -0.035em;
}

.card-copy p:last-child {
  margin-bottom: 14px;
  color: #92928f;
  font-size: 12px;
  line-height: 1.6;
}

.app-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: 10px;
}

.social-links a:focus-visible,
.password-row button:focus-visible,
.logout-button:focus-visible,
.app-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .social-links a:hover {
    border-color: #696969;
    color: #ffffff;
  }

  .password-row button:hover {
    background: #d7ff82;
  }

  .logout-button:hover {
    color: #eeeeeb;
  }

  .app-card:hover {
    border-color: #626262;
    background: #1d1d1d;
  }
}

@media (max-width: 600px) {
  .page-shell {
    width: min(100% - 36px, 450px);
  }

  .landing {
    padding: 48px 0 64px;
  }

  .social-links {
    margin-bottom: 58px;
  }

  .app-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .app-card {
    min-height: 215px;
  }
}

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

/* With the 3D scene running, keep the text column on the left and the castle on the right. */
.hero-on .landing {
  margin-left: 0;
}
