:root {
  --ink: #0b1411;
  --pine: #163028;
  --moss: #2f5c4a;
  --brass: #d4b56a;
  --brass-deep: #a8873d;
  --paper: #e8e2d4;
  --muted: #a8b5ae;
  --veil: linear-gradient(
    105deg,
    rgba(11, 20, 17, 0.92) 0%,
    rgba(11, 20, 17, 0.78) 42%,
    rgba(11, 20, 17, 0.35) 70%,
    rgba(11, 20, 17, 0.55) 100%
  );
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Outfit", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.hero {
  position: relative;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  display: block;
  animation: drift 28s ease-in-out infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--veil);
  pointer-events: none;
}

.top,
.hero-copy,
.foot {
  position: relative;
  z-index: 2;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

.mark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  letter-spacing: 0.02em;
  opacity: 0.95;
  animation: rise 0.9s ease-out both;
}

.top nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  animation: rise 0.9s ease-out 0.1s both;
}

.top nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}

.top nav a:hover,
.top nav a:focus-visible {
  color: var(--brass);
}

.nav-login {
  color: var(--brass) !important;
}

.hero-copy {
  margin-top: auto;
  padding: clamp(2rem, 8vh, 5rem) clamp(1.5rem, 5vw, 4rem)
    clamp(3rem, 10vh, 6rem);
  max-width: 38rem;
  animation: rise 1s ease-out 0.2s both;
}

.brand {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-wrap: balance;
}

.lede {
  margin: 0 0 1.75rem;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 32rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 2px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brass);
  color: var(--ink);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--brass-deep);
  color: var(--paper);
}

.btn-ghost {
  border: 1px solid rgba(212, 181, 106, 0.45);
  color: var(--brass);
  background: rgba(11, 20, 17, 0.35);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--brass);
  background: rgba(22, 48, 40, 0.65);
}

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

.foot p {
  margin: 0;
}

/* Login / interior pages */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(47, 92, 74, 0.35), transparent),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(168, 135, 61, 0.12), transparent),
    var(--ink);
}

.page-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
}

.card-panel {
  width: min(28rem, 100%);
  padding: 2rem 1.75rem;
  border: 1px solid rgba(212, 181, 106, 0.22);
  background: rgba(22, 48, 40, 0.45);
  backdrop-filter: blur(8px);
  animation: rise 0.8s ease-out both;
}

.card-panel h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
}

.card-panel .sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.field input {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(168, 181, 174, 0.35);
  border-radius: 2px;
  background: rgba(11, 20, 17, 0.65);
  color: var(--paper);
  font: inherit;
}

.field input:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.hint {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.back-link {
  display: inline-block;
  margin: 1.25rem 1.5rem 0;
  font-size: 0.9rem;
  color: var(--brass);
  text-decoration: none;
}

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

@keyframes drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.5%, 1%, 0);
  }
}

@media (max-width: 720px) {
  .top {
    flex-wrap: wrap;
  }

  .hero-media img {
    object-position: 70% center;
  }

  .hero-veil {
    background: linear-gradient(
      180deg,
      rgba(11, 20, 17, 0.75) 0%,
      rgba(11, 20, 17, 0.55) 35%,
      rgba(11, 20, 17, 0.88) 100%
    );
  }

  .hero-copy {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media img,
  .mark,
  .top nav,
  .hero-copy,
  .card-panel {
    animation: none;
  }
}
