/* Imperial Rose: the public site (front page, pages, news), the news banner, formatted text and the content
   editors of the Guild Hall's Info tab. Builds on style.css (its colours, fonts, cards and buttons). */

.center {
  text-align: center;
}
.flush {
  margin: 0;
}
.btn.big {
  min-height: 46px;
  padding: 10px 22px;
  font-size: 16px;
  border-radius: 10px;
}
.btn.discord {
  background: #5865f2;
  border-color: #4752c4;
  color: #fff;
}
.btn.discord:hover {
  border-color: #c9cdfb;
}

/* ---------------------------------------------------------------- header and footer of the public site */

.hall-link {
  flex: none;
}
.front-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
}
.front-footer a {
  color: var(--muted);
}

/* ---------------------------------------------------------------- the news banner */

.banner-box {
  margin-top: 12px;
}
.banner-box[hidden] {
  display: none;
}
.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: linear-gradient(0deg, var(--gold-wash), var(--gold-wash)), var(--surface);
  font-size: 14px;
}
.banner.important {
  border-color: var(--rose);
  background: linear-gradient(90deg, var(--rose-wash), transparent 70%), var(--surface);
}
.banner-mark {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg);
  font-weight: 800;
  font-size: 12px;
}
.banner.important .banner-mark {
  background: var(--rose);
  color: #fff;
}
.banner-text {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
  overflow-wrap: anywhere;
}
.banner-text a {
  font-weight: 600;
  white-space: nowrap;
}
.banner-close {
  flex: none;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  width: 28px;
  height: 28px;
  margin: -3px -4px -3px 0;
  border-radius: 6px;
  cursor: pointer;
}
.banner-close:hover {
  color: var(--text);
  background: var(--surface-3);
}

/* ---------------------------------------------------------------- the front page */

body[data-page="home"] main {
  padding-top: 0;
}
.hero-front {
  position: relative;
  text-align: center;
  padding: 44px 0 40px;
  margin-bottom: 8px;
  background:
    radial-gradient(520px 260px at 50% 38%, var(--rose-wash), transparent 70%),
    radial-gradient(900px 340px at 50% 0, var(--bg-glow), transparent 75%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-front::before,
.hero-front::after {
  content: "";
  position: absolute;
  left: 50%;
  width: min(640px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.55;
}
.hero-front::before {
  top: 14px;
}
.hero-front::after {
  bottom: 12px;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-emblem {
  width: 132px;
  height: 132px;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 22px rgba(200, 50, 79, 0.45)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
  animation: bloom 0.9s ease-out both;
}
@keyframes bloom {
  from {
    transform: scale(0.86) rotate(-8deg);
    opacity: 0;
  }
}
.hero-kicker {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(30px, 6.2vw, 52px);
  line-height: 1.1;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  max-width: 900px;
  color: var(--text);
  text-shadow: 0 2px 18px rgba(200, 50, 79, 0.25);
}
.hero-tagline {
  font-size: clamp(16px, 2.4vw, 20px);
  font-style: italic;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 14px;
}
.hero-tagline:empty {
  display: none;
}
.hero-recruit {
  margin: 0 0 18px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
}
.hero-actions .btn[hidden] {
  display: none;
}

.recruit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--good);
  background: var(--good-wash);
  color: var(--good);
  font-size: 13px;
  font-weight: 600;
}
.recruit::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.recruit[hidden] {
  display: none;
}
.recruit.invitation {
  border-color: var(--gold);
  background: var(--gold-wash);
  color: var(--gold);
}
.recruit.closed {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--muted);
}

.front-section {
  margin: 8px 0 24px;
}
.front-section .ornament {
  margin-top: 30px;
}
.story-card {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-size: 16px;
  padding: 20px 22px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.feature {
  margin: 0;
  border-top: 3px solid var(--rose);
}
.feature h3 {
  margin-top: 0;
  font-size: 16px;
}
.feature .prose {
  color: var(--muted);
}
.members-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  border-color: var(--border-strong);
  background:
    radial-gradient(400px 160px at 0 0, var(--rose-wash), transparent 70%),
    var(--surface);
}
.members-card h2 {
  margin-top: 0;
}

/* ---------------------------------------------------------------- pages */

.front-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 6px 0 16px;
}
.front-head h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
}
main.front {
  max-width: 900px;
}
body[data-page="home"] main.front {
  max-width: none;
}
.prose-card {
  padding: 20px 22px;
}
.prose {
  font-size: 15.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.prose > :last-child {
  margin-bottom: 0;
}
.prose > :first-child {
  margin-top: 0;
}
.prose p {
  margin: 0 0 12px;
}
.prose h2 {
  font-size: 20px;
  margin: 24px 0 10px;
}
.prose h3 {
  font-size: 17px;
  margin: 20px 0 8px;
  color: var(--gold);
}
.prose h4 {
  font-size: 15px;
  margin: 16px 0 6px;
  font-family: var(--font-display);
  color: var(--muted);
}
.prose ul,
.prose ol {
  margin: 0 0 12px;
  padding-left: 22px;
}
.prose li {
  margin: 3px 0;
}
.prose li::marker {
  color: var(--gold);
}
.prose a {
  text-decoration: underline;
  text-decoration-color: rgba(228, 106, 131, 0.4);
  text-underline-offset: 2px;
}
.prose strong {
  color: var(--text);
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  margin: 0;
  padding: 0;
}
.faq-item summary {
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  color: var(--gold);
  font-size: 20px;
  line-height: 1;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item[open] summary {
  border-bottom: 1px solid var(--border);
}
.faq-item .prose {
  padding: 12px 16px 14px;
}
.center-actions {
  justify-content: center;
  margin: 18px 0;
}
.recruit-note.open {
  border-left-color: var(--good);
  background: var(--good-wash);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.contact-grid .card {
  margin: 0;
}
.contact-grid h2 {
  margin-top: 0;
}
.officers {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  margin: 0;
}
.officers dt {
  font-family: var(--font-display);
  color: var(--gold);
  font-weight: 700;
}
.officers dd {
  margin: 0;
}
.link-list {
  padding-left: 18px;
  margin: 0;
}

/* ---------------------------------------------------------------- news and events */

.news-list {
  display: grid;
  gap: 12px;
}
.news-card {
  margin: 0;
}
.news-card h3 {
  margin: 0 0 2px;
  font-size: 17px;
  color: var(--text);
}
.news-card h3 a {
  color: var(--text);
}
.news-card > p:last-child {
  margin-bottom: 0;
}
.news-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.news-card-head > h2 {
  margin: 0;
}
.news-card-head:has(> h2) {
  align-items: center;
  margin: 28px 0 12px;
}
.card > .news-card-head:has(> h2) {
  margin-top: 0;
}
.news-meta {
  color: var(--faint);
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.news-post .news-meta {
  margin-bottom: 14px;
}
.badge.pinned {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--gold-wash);
}
.badge.public {
  color: var(--good);
  border-color: var(--good);
}
.badge.members-only {
  color: var(--rose-bright);
  border-color: var(--rose);
  background: var(--rose-wash);
}

.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.event-card {
  display: flex;
  gap: 14px;
  margin: 0;
}
.event-card h3 {
  margin: 0 0 2px;
  color: var(--text);
}
.event-date {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 60px;
  border-radius: 10px;
  border: 1px solid var(--gold);
  background: var(--gold-wash);
}
.event-day {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.event-month {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
}

/* ---------------------------------------------------------------- the Info tab */

.edit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 10px 14px;
  border-style: dashed;
}
.guild-card .lead {
  font-size: 17px;
  font-style: italic;
  color: var(--muted);
  margin: 0 0 12px;
}
.guild-card .hero-kicker {
  font-size: 11px;
  margin-bottom: 4px;
}
.facts-inline {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.facts-inline dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding-top: 2px;
}
.facts-inline dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.page-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.page-tile p {
  flex: 1;
  margin: 0;
}
.tile-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.tile-foot .btn {
  margin-left: auto;
}

/* ---------------------------------------------------------------- the editors */

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.editor-form textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.5;
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.editor-form .field {
  margin-bottom: 12px;
}
.editor-form .field input,
.editor-form .field select {
  width: 100%;
}
.editor-form h3 {
  margin-top: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 12px;
}
.count-chars {
  align-self: flex-end;
}
.editor-preview {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
}
.preview-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 6px;
}
.preview-box {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--bg);
}
.preview-box > :last-child {
  margin-bottom: 0;
}
.hero-front.mini {
  padding: 22px 10px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
}
.hero-front.mini .hero-name {
  font-size: 26px;
}
.hero-front.mini .hero-tagline {
  font-size: 15px;
}
.syntax-help {
  margin: -4px 0 12px;
  color: var(--muted);
}
.syntax-help summary {
  cursor: pointer;
  color: var(--rose-bright);
}
table.syntax {
  border-collapse: collapse;
  margin-top: 6px;
}
table.syntax td {
  padding: 3px 10px 3px 0;
  vertical-align: top;
}
table.syntax code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.row-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}
.row-item {
  display: flex;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.row-fields {
  flex: 1;
  min-width: 0;
}
.row-fields .field:last-child {
  margin-bottom: 0;
}
.row-tools {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.row-tools .btn {
  width: 32px;
  padding: 0;
}

@media (max-width: 900px) {
  .editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .editor-preview {
    position: static;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .hero-front {
    padding: 30px 0 30px;
  }
  .hero-emblem {
    width: 96px;
    height: 96px;
  }
  .hero-kicker {
    font-size: 11px;
  }
  .story-card,
  .prose-card {
    padding: 16px;
  }
  .prose {
    font-size: 15px;
  }
  .front-header .brand-sub {
    letter-spacing: 0.22em;
  }
  .officers,
  .facts-inline {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .officers dd,
  .facts-inline dd {
    margin-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-emblem {
    animation: none;
  }
}

.more-link {
  margin: 12px 0 0;
}
.front-section > p.center,
.news-list + p.center {
  margin-top: 16px;
}
.banner-box:not([hidden]) + main {
  padding-top: 28px;
}
body[data-page="home"] .banner-box:not([hidden]) + main {
  padding-top: 14px;
}

/* the app's header on a phone: a long character name gives way (ellipsis) instead of pushing "Log out" off screen */
@media (max-width: 640px) {
  .who {
    flex: 0 1 auto;
  }
  .who > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .who .badge.rank {
    display: none;
  }
  .who .btn {
    flex: none;
  }
}
