:root {
  --bg-top: #1a2f2a;
  --bg-bottom: #0e1a17;
  --snow: #e8f0ec;
  --cream: #f3ebe0;
  --pine: #2d5a4a;
  --pine-deep: #1e3d33;
  --berry: #a63d40;
  --gold: #c4a35a;
  --muted: #a8bdb4;
  --door-locked: #243f37;
  --door-open: #3d6b58;
  --radius: 10px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

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

html {
  font-size: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--cream);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, #2a4a40 0%, transparent 55%),
    linear-gradient(165deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
}

.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logout {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.logout:hover {
  color: var(--cream);
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 2.75rem);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.lede {
  margin: 0 0 1.75rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 28ch;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Login */

.login {
  padding-top: 2rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 18rem;
}

.login-form label {
  font-size: 0.9rem;
  color: var(--muted);
}

.login-form input {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--pine);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  color: var(--cream);
  font: inherit;
}

.login-form input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.login-form button,
.back {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  background: var(--berry);
  color: var(--cream);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.login-form button:hover,
.back:hover {
  filter: brightness(1.1);
}

.error {
  color: #f0a8a8;
  margin: 0 0 1rem;
}

/* Calendar grid */

.door-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .door-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
  }
}

.door {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  transition: transform 0.15s ease, background 0.15s ease;
}

.door-open {
  background: var(--door-open);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.door-open:hover {
  transform: translateY(-2px);
  background: #4a7d68;
}

.door-locked {
  background: var(--door-locked);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.door-locked:hover {
  background: #2c4a41;
}

.door-lock::after {
  content: "";
  position: absolute;
  top: 0.4rem;
  right: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.55;
}

/* Door content pages */

.door-page,
.message {
  padding-top: 1rem;
}

.door-page .lede,
.message .lede {
  max-width: 36ch;
}

.door-photo {
  margin: 0 0 1.5rem;
}

.door-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.message time {
  color: var(--cream);
  font-weight: 600;
}

.back {
  margin-top: 1.5rem;
}
