/* VibeTati's look: a night festival, after Hina's lanterns.
   The colours are set once, here at the top. */

:root {
  --night: #17112a;
  --night-high: #2c2050;
  --card: rgba(255, 255, 255, 0.055);
  --card-line: rgba(255, 255, 255, 0.13);
  --text: #ede7ff;
  --muted: #bcb0dc;
  --cream: #ffe7b0;
  --gold: #f5c451;
  --gold-light: #ffd66e;
  --mint: #74e0bd;
  --mint-light: #a3f0d6;
  --ink: #2a1c00;
  --radius: 18px;
  --font: ui-rounded, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  background: var(--night);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

/* A night sky: a soft glow at the top and a scatter of small stars. */
body {
  margin: 0;
  min-height: 100vh;
  font: 17px/1.6 var(--font);
  color: var(--text);
  background-color: var(--night);
  background-image:
    radial-gradient(circle at 8% 22%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 23% 64%, rgba(255, 255, 255, 0.4) 0 1px, transparent 2px),
    radial-gradient(circle at 41% 12%, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 58% 48%, rgba(255, 255, 255, 0.35) 0 1px, transparent 2px),
    radial-gradient(circle at 77% 18%, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 91% 57%, rgba(255, 255, 255, 0.4) 0 1px, transparent 2px),
    radial-gradient(circle at 67% 86%, rgba(255, 255, 255, 0.35) 0 1px, transparent 2px),
    radial-gradient(circle at 14% 91%, rgba(255, 255, 255, 0.3) 0 1px, transparent 2px),
    radial-gradient(ellipse 90% 100% at 50% 0%, var(--night-high), transparent 70%);
  background-size: 640px 640px, 640px 640px, 640px 640px, 640px 640px, 640px 640px,
    640px 640px, 640px 640px, 640px 640px, 100% 560px;
  background-repeat: repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat, no-repeat;
}

a {
  color: var(--mint);
}

a:hover {
  color: var(--mint-light);
}

:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
}

.skip:focus {
  left: 16px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

/* The string of lanterns along the top. */
.garland {
  height: clamp(64px, 4.5vw, 120px);
  overflow: hidden;
}

.garland-art {
  display: block;
  width: 100%;
  height: 100%;
}

.garland .glow {
  opacity: 0.55;
}

@media (prefers-reduced-motion: no-preference) {
  .garland .glow {
    animation: lantern-glow 3.4s ease-in-out infinite alternate;
  }

  .garland .lantern:nth-child(3n + 2) .glow {
    animation-delay: -1.2s;
  }

  .garland .lantern:nth-child(3n) .glow {
    animation-delay: -2.3s;
  }
}

@keyframes lantern-glow {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 0.9;
  }
}

/* The name and the menu. */
.bar,
main,
.foot {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.01em;
  text-shadow: 0 0 18px rgba(245, 196, 81, 0.35);
}

.brand:hover {
  color: var(--gold-light);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}

nav a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

nav a[aria-current="page"] {
  color: var(--cream);
  border-bottom-color: var(--gold);
}

main {
  padding-top: 8px;
  padding-bottom: 56px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  color: var(--cream);
}

h1 {
  margin: 28px 0 8px;
  font-size: clamp(2.1rem, 7vw, 3rem);
  font-weight: 800;
}

h2 {
  margin: 40px 0 12px;
  font-size: 1.45rem;
}

h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

/* The front page. */
.hero h1 {
  margin-top: 32px;
  font-size: clamp(2.8rem, 11vw, 4.4rem);
  text-shadow: 0 0 34px rgba(245, 196, 81, 0.35);
}

.tagline {
  margin: 0 0 18px;
  font-size: 1.2rem;
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
}

.card p {
  margin: 0 0 14px;
}

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h3 a:hover {
  text-decoration: underline;
}

.card .actions {
  margin: 0;
}

.icon {
  flex: none;
  width: 72px;
  height: 72px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  object-fit: cover;
  background: var(--night-high);
  box-shadow: 0 0 22px rgba(245, 196, 81, 0.45);
}

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--mint);
  color: #08261b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 0.3em;
}

/* Buttons. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 24px;
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  color: var(--cream);
  background: rgba(245, 196, 81, 0.14);
}

.btn.primary {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 0 26px rgba(245, 196, 81, 0.35);
}

.btn.primary:hover {
  background: var(--gold-light);
  color: var(--ink);
}

.btn.big {
  min-height: 54px;
  padding: 12px 30px;
  font-size: 1.15rem;
}

.btn[disabled] {
  opacity: 0.5;
  box-shadow: none;
  cursor: not-allowed;
}

/* An app's own page. */
.app-head {
  display: grid;
  gap: 24px;
  align-items: center;
  margin-top: 20px;
}

.hero-pic {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

@media (min-width: 720px) {
  .app-head {
    grid-template-columns: 280px 1fr;
  }

  .hero-pic {
    margin: 0;
  }
}

.app-intro h1 {
  margin-top: 0;
}

.summary {
  margin: 0 0 20px;
  font-size: 1.2rem;
  color: var(--muted);
}

.download + .download {
  margin-top: 16px;
}

.file-facts {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.phone-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(116, 224, 189, 0.45);
  border-radius: 12px;
  background: rgba(116, 224, 189, 0.12);
}

.prose {
  margin-top: 12px;
}

.prose ol,
.prose ul {
  padding-left: 1.4em;
}

.prose li {
  margin: 8px 0;
}

.prose li::marker {
  color: var(--gold);
  font-weight: 800;
}

/* News. */
.post {
  margin: 0 0 14px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
}

.post > h2,
.post > h3 {
  margin: 0;
}

.post p {
  margin: 10px 0 0;
}

.post .when {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* The write box. */
.write-box {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
}

.write-box label {
  margin-top: 8px;
  font-weight: 700;
}

.hint {
  font-weight: 400;
  color: var(--muted);
}

.write-box input,
.write-box textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
}

.write-box textarea {
  min-height: 150px;
  resize: vertical;
}

.write-box button {
  justify-self: start;
  margin-top: 10px;
}

.preview-note {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(245, 196, 81, 0.45);
  border-radius: 12px;
  background: rgba(245, 196, 81, 0.12);
}

.foot {
  padding-top: 22px;
  padding-bottom: 40px;
  border-top: 1px solid var(--card-line);
  font-size: 0.9rem;
  color: var(--muted);
}

.foot p {
  margin: 0;
}

/* Phones. */
@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .card {
    gap: 14px;
    padding: 16px;
  }

  .icon {
    width: 56px;
    height: 56px;
  }

  .btn.big {
    width: 100%;
  }
}
