/* ==========================================================================
   ROXENDEL — World Tree Fantasy Theme
   Colors: Deep Emerald (#082F20), Forest Green (#1E583A), Leaf Green (#3F7D3B),
           Royal Gold (#D7B15A), Parchment Cream (#F6E9C8), Warm Sand (#D8B788),
           Amber Accent (#C97A2B), Sunset Copper (#B85738)
   ========================================================================== */

:root {
  --color-deep-emerald: #082F20;
  --color-forest-green: #1E583A;
  --color-leaf-green: #3F7D3B;
  --color-royal-gold: #D7B15A;
  --color-parchment-cream: #F6E9C8;
  --color-warm-sand: #D8B788;
  --color-amber-accent: #C97A2B;
  --color-sunset-copper: #B85738;

  --color-surface: #082F20;
  --color-surface-panel: #0d3b28;
  --color-surface-panel-alt: #0a2f20;
  --color-border-gold: #D7B15A;
  --color-border-subtle: rgba(215, 177, 90, 0.28);
  --color-text-main: #F6E9C8;
  --color-text-muted: #D8B788;
  --color-focus: #D7B15A;

  --font-serif: Georgia, "Cinzel", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
  scroll-padding-top: 24px;
  background-color: var(--color-deep-emerald);
}

body.rox-front {
  margin: 0;
  background-color: var(--color-deep-emerald);
  background-image:
    linear-gradient(180deg, rgba(8, 47, 32, 0.25) 0%, rgba(8, 47, 32, 0.85) 440px, #082F20 620px, #062318 100%),
    url('/assets/hero-scenic-bg.webp');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1440px) {
  body.rox-front {
    background-size: 1920px auto;
  }
}

/* Accessible focus styling */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Header & Navigation */
.rox-header, .rox-footer, .rox-main {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 42px);
}

.rox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-block: 16px;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(8, 47, 32, 0.65);
  backdrop-filter: blur(8px);
}

.rox-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-parchment-cream);
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  transition: color 0.2s ease;
}

.rox-brand:hover {
  color: var(--color-royal-gold);
}

.rox-brand-emblem {
  display: block;
  width: auto;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.rox-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.rox-nav a, .rox-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-parchment-cream);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.rox-nav-icon {
  width: 17px;
  height: 17px;
  color: var(--color-royal-gold);
}

.rox-nav a:hover, .rox-footer a:hover {
  color: var(--color-royal-gold);
}

.rox-nav .rox-play {
  background: linear-gradient(180deg, #2b6e49 0%, #17482f 60%, #082F20 100%);
  color: var(--color-parchment-cream);
  border: 1px solid var(--color-royal-gold);
  padding: 8px 18px;
  border-radius: 4px;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: inset 0 1px 0 rgba(246, 233, 200, 0.35), 0 4px 10px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.rox-nav .rox-play:hover {
  filter: brightness(1.18);
  box-shadow: inset 0 1px 0 rgba(246, 233, 200, 0.5), 0 0 14px rgba(63, 125, 59, 0.6);
  color: #fff;
  text-decoration: none;
}

/* Hero Section */
.rox-founder-top {
  display: grid;
  grid-template-areas: "title telemetry" "world calendar";
  align-items: start;
  gap: 16px;
  padding-block: clamp(28px, 5vw, 60px) 24px;
}

@media(min-width: 1280px) {
  .rox-founder-top {
    grid-template-areas: "title world calendar telemetry";
    grid-template-columns: minmax(0, 1.4fr) minmax(170px, .73fr) minmax(205px, .76fr) minmax(300px, 1.05fr);
    column-gap: clamp(14px, 1.3vw, 24px);
  }
}

@media(max-width: 860px) {
  .rox-founder-top {
    grid-template-areas: "title" "world" "calendar" "telemetry";
  }
}

.rox-title-block {
  grid-area: title;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.rox-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  width: 100%;
}

.rox-hero-logo {
  margin: 0;
  padding: 0;
  line-height: 1;
  width: 100%;
  max-width: 540px;
}

.rox-hero-tree-img {
  display: block;
  width: 100%;
  max-width: 540px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7));
}

.rox-title .rox-version {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--color-royal-gold);
  letter-spacing: 0.05em;
  text-transform: lowercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.rox-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.rox-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 4px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.rox-button:active {
  transform: translateY(1px);
}

.rox-btn-icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Primary Hero Button: Emerald Fantasy */
.rox-primary {
  background: linear-gradient(180deg, #2b6e49 0%, #17482f 60%, #082F20 100%) !important;
  color: var(--color-parchment-cream) !important;
  border: 1px solid var(--color-royal-gold) !important;
  box-shadow: inset 0 1px 0 rgba(246, 233, 200, 0.4), 0 6px 16px rgba(0, 0, 0, 0.55);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.rox-primary:hover {
  filter: brightness(1.18);
  box-shadow: inset 0 1px 0 rgba(246, 233, 200, 0.6), 0 0 20px rgba(63, 125, 59, 0.7);
  text-decoration: none;
}

/* Secondary Hero Button: Royal Gold Chamfer */
.rox-button:not(.rox-primary), .rox-secondary {
  background: linear-gradient(180deg, #D7B15A 0%, #A88330 100%) !important;
  color: #082F20 !important;
  border: 1px solid var(--color-parchment-cream) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 16px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.rox-button:not(.rox-primary):hover, .rox-secondary:hover {
  filter: brightness(1.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 18px rgba(215, 177, 90, 0.6);
  text-decoration: none;
}

/* Ornamental Panel Frame & Corners */
.rox-panel-frame {
  position: relative;
  background: linear-gradient(180deg, rgba(14, 58, 39, 0.88) 0%, rgba(8, 47, 32, 0.96) 100%);
  border: 1px solid var(--color-royal-gold);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(215, 177, 90, 0.22), 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}

.rox-panel-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  background-image: url('/assets/corner-flourish.webp');
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 2;
}

.rox-panel-corner.tl { top: -1px; left: -1px; }
.rox-panel-corner.tr { top: -1px; right: -1px; transform: scaleX(-1); }
.rox-panel-corner.bl { bottom: -1px; left: -1px; transform: scaleY(-1); }
.rox-panel-corner.br { bottom: -1px; right: -1px; transform: scale(-1); }

.rox-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(215, 177, 90, 0.2);
}

.rox-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--color-royal-gold);
}

.rox-card-icon svg {
  width: 100%;
  height: 100%;
}

.rox-card-title, .rox-mini-eyebrow {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-royal-gold);
  text-transform: uppercase;
}

/* World Live Panel (Rashid & World Changes) */
.rox-world-live {
  grid-area: world;
  display: grid;
  align-content: start;
  align-self: stretch;
  min-width: 0;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
}

.rox-world-live dt {
  font-size: 0.82rem;
  color: var(--color-warm-sand);
}

.rox-world-live dd {
  margin: 2px 0 0;
  color: var(--color-parchment-cream);
  font-weight: 700;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.rox-world-live ul {
  margin: 4px 0 0;
  padding-left: 1.15em;
  display: grid;
  gap: 3px;
  font-weight: 500;
}

.rox-world-live li {
  line-height: 1.35;
}

.rox-world-live li::marker {
  color: var(--color-royal-gold);
}

/* Mini Calendar */
.rox-main a.rox-mini-calendar {
  grid-area: calendar;
  display: grid;
  gap: 6px;
  min-width: 0;
  align-self: stretch;
  padding: 12px 14px;
  color: var(--color-parchment-cream);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rox-main a.rox-mini-calendar:hover {
  border-color: #fff1cf;
  box-shadow: inset 0 0 0 1px rgba(246, 233, 200, 0.4), 0 0 18px rgba(63, 125, 59, 0.4);
}

.rox-mini-calendar strong {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--color-parchment-cream);
  line-height: 1.2;
}

.rox-mini-week, .rox-mini-days {
  display: none;
}

.rox-mini-calendar[data-ready] :is(.rox-mini-week, .rox-mini-days) {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  gap: 3px;
}

.rox-mini-week {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-royal-gold);
}

.rox-mini-days > span {
  display: grid;
  place-items: center;
  min-height: 22px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-parchment-cream);
  background: rgba(8, 47, 32, 0.6);
  border: 1px solid rgba(215, 177, 90, 0.15);
}

.rox-mini-days > span:not([data-date]) {
  background: transparent;
  border-color: transparent;
}

/* Event Color Variables matching the styleboard */
.rox-mini-calendar [data-event="1"] { --day-color: #F6E9C8; --day-bg: #806428; }
.rox-mini-calendar [data-event="2"] { --day-color: #F6E9C8; --day-bg: #1E583A; }
.rox-mini-calendar [data-event="3"] { --day-color: #F6E9C8; --day-bg: #6E3B16; }
.rox-mini-calendar [data-event="4"] { --day-color: #F6E9C8; --day-bg: #6B2319; }

.rox-mini-days > span[data-event] {
  color: var(--day-color);
  background: var(--day-bg);
  border-color: var(--color-royal-gold);
  font-weight: 700;
}

.rox-mini-days > span[aria-current] {
  border-color: #fff1cf;
  box-shadow: 0 0 0 1px #fff1cf, inset 0 0 4px rgba(255, 241, 207, 0.5);
}

.rox-mini-legend {
  display: none;
}

.rox-mini-calendar[data-ready] .rox-mini-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 6px;
  margin-top: 5px;
  font-size: 0.72rem;
}

.rox-mini-legend span {
  color: var(--color-parchment-cream);
  display: flex;
  align-items: center;
  gap: 5px;
}

.rox-mini-legend span::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--day-bg, currentColor);
  border: 1px solid var(--color-royal-gold);
}

/* Telemetry & Server Status */
.rox-telemetry {
  grid-area: telemetry;
  align-self: stretch;
  padding: 12px 14px;
}

@media(min-width: 1280px) {
  .rox-telemetry {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.rox-telemetry-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}

.rox-telemetry-metrics dt {
  font-size: 0.8rem;
  color: var(--color-warm-sand);
}

.rox-telemetry-metrics dd {
  margin: 2px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-royal-gold);
}

.rox-daily {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.rox-daily-card {
  margin: 0;
  padding: 6px;
  background: rgba(8, 47, 32, 0.65);
  border: 1px solid rgba(215, 177, 90, 0.25);
  border-radius: 4px;
  text-align: center;
}

.rox-daily-art {
  width: 32px;
  height: 32px;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rox-daily-card figcaption span {
  display: block;
  font-size: 0.72rem;
  color: var(--color-warm-sand);
}

.rox-daily-card figcaption strong {
  display: block;
  font-size: 0.85rem;
  color: var(--color-parchment-cream);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Decorative Section Divider */
.rox-section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: clamp(24px, 4vw, 42px) 0;
  position: relative;
}

.rox-section-divider::before,
.rox-section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 177, 90, 0.45));
}

.rox-section-divider::after {
  background: linear-gradient(90deg, rgba(215, 177, 90, 0.45), transparent);
}

.rox-divider-ornament {
  display: block;
  width: auto;
  max-width: min(100%, 290px);
  height: 36px;
  object-fit: contain;
  margin-inline: 16px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

/* Founder Layout (Screenshots Left, Story Right) */
.rox-founder-layout {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
  gap: clamp(18px, 4vw, 48px);
  align-items: start;
  padding: 0 0 48px;
}

@media(max-width: 780px) {
  .rox-founder-layout {
    grid-template-columns: 1fr;
  }
}

/* Screenshots Gallery (Vertical Stack) */
.rox-gallery {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: min(100%, 420px);
}

.rox-main .rox-gallery-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 0;
  justify-self: start;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-royal-gold);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.rox-main .rox-gallery-link:hover {
  color: #fff1cf;
  text-decoration: underline;
  transform: translateX(2px);
}

.rox-link-icon {
  width: 20px;
  height: 20px;
}

.rox-gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 420px);
  gap: 12px;
}

.rox-gallery-grid a {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--color-royal-gold);
  background: rgba(8, 47, 32, 0.7);
  border-radius: 4px;
  aspect-ratio: 4 / 3;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rox-gallery-grid a:hover {
  border-color: #fff1cf;
  box-shadow: 0 8px 24px rgba(215, 177, 90, 0.35);
  transform: translateY(-2px);
}

.rox-gallery-grid img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  display: block;
}

/* Founder Copy Section */
.rox-founder-copy {
  padding: clamp(20px, 3.5vw, 36px);
  color: var(--color-parchment-cream);
  font-size: clamp(1.08rem, .95rem + .45vw, 1.28rem);
  line-height: 1.68;
}

.rox-founder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(215, 177, 90, 0.25);
  padding-bottom: 8px;
}

.rox-byline {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-royal-gold);
  letter-spacing: 0.02em;
}

.rox-founder-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.6;
  color: #fff1cf;
  margin: 12px 0 20px;
  padding-left: 16px;
  border-left: 3px solid var(--color-royal-gold);
}

.rox-founder-list {
  margin: 18px 0 24px;
  padding-left: 1.4em;
  list-style: disc;
}

.rox-founder-list li {
  padding-left: 0.25em;
  margin: 0 0 0.75em;
  line-height: 1.62;
}

.rox-founder-list li::marker {
  color: var(--color-royal-gold);
}

.rox-founder-contact {
  margin: 20px 0 14px;
  color: var(--color-warm-sand);
}

.rox-discord-action {
  margin: 16px 0 24px;
}

.rox-feedback {
  display: grid;
  gap: 8px;
  max-width: 600px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(215, 177, 90, 0.2);
}

.rox-feedback label {
  font-weight: 600;
  color: var(--color-parchment-cream);
}

.rox-feedback textarea, .rox-feedback select {
  width: 100%;
  background: rgba(8, 47, 32, 0.85);
  color: var(--color-parchment-cream);
  border: 1px solid var(--color-royal-gold);
  padding: 10px;
  border-radius: 4px;
  font: inherit;
  font-size: 1rem;
}

.rox-feedback textarea:focus, .rox-feedback select:focus {
  border-color: #fff1cf;
  box-shadow: 0 0 8px rgba(215, 177, 90, 0.4);
}

.rox-feedback .rox-button {
  justify-self: start;
}

/* Dedicated Screenshots Page */
.rox-shot-page {
  padding-block: 28px 56px;
}

.rox-shot-page h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  color: var(--color-royal-gold);
  margin-bottom: 24px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.rox-shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1200px;
}

@media(max-width: 640px) {
  .rox-shot-grid {
    grid-template-columns: 1fr;
  }
}

.rox-shot-grid a {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--color-royal-gold);
  background: rgba(8, 47, 32, 0.75);
  border-radius: 6px;
  aspect-ratio: 4 / 3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rox-shot-grid a:hover {
  border-color: #fff1cf;
  box-shadow: 0 10px 30px rgba(215, 177, 90, 0.4);
  transform: translateY(-2px);
}

.rox-shot-grid img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

/* Footer */
.rox-footer {
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-block: 20px;
  color: var(--color-warm-sand);
  background: rgba(8, 47, 32, 0.75);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
