/* ---------------------------------------------------------------------------
- Page layout
--------------------------------------------------------------------------- */

body {
  margin-bottom: 0;
  background-color: var(--thorns-canvas);
  font-family: var(--thorns-font-sans);
}

.page-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-wrap: nowrap;
  min-height: 100vh;
}

.page-content {
  flex: 1 1 auto;
  min-width: 0;
}

.content-frame {
  max-width: 46rem;
  margin: 0 auto;
}

.content-frame-wide {
  max-width: 64rem;
  margin: 0 auto;
}

/* ---------------------------------------------------------------------------
- Homepage hero
--------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 3.5rem 2.5rem 2rem;
  overflow: hidden;
}

.hero-rose {
  position: absolute;
  right: -2rem;
  top: -1.5rem;
  width: 300px;
  height: auto;
  opacity: 0.94;
}

.hero-content {
  position: relative;
  max-width: 22rem;
}

.hero-title {
  font-family: 'Zin Display', serif;
  font-size: 2.75rem;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--thorns-gold);
  line-height: 1;
}

.hero-tagline {
  color: var(--thorns-parchment-muted);
  font-size: 0.95rem;
  font-style: italic;
  margin: 1rem 0 0.75rem;
  line-height: 1.6;
}

.hero-text {
  color: var(--thorns-parchment);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 0.9rem;
}

.hero .enter-button {
  margin-top: 0.5rem;
}

/* ---------------------------------------------------------------------------
- Feature cards
--------------------------------------------------------------------------- */

.feature-row {
  display: flex;
  gap: 1.25rem;
  padding: 0.5rem 2.5rem 2.5rem;
  flex-wrap: wrap;
}

.feature-card {
  background-color: var(--thorns-panel);
  border: 0.5px solid var(--thorns-panel-border);
  border-radius: 10px;
  padding: 1.1rem;
  flex: 1 1 200px;
}

.feature-card-icon {
  color: var(--thorns-gold);
  font-size: 1.3rem;
}

.feature-card-title {
  color: var(--thorns-parchment);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.6rem;
}

.feature-card-text {
  color: var(--thorns-stone);
  font-size: 0.8rem;
  margin-top: 0.4rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .hero-rose {
    display: none;
  }
}

.enter-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--thorns-red);
  color: var(--thorns-parchment);
  text-decoration: none;
  font-weight: bold;
  border-radius: 0.5rem;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.15),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}

.enter-button:hover,
.enter-button:active,
.enter-button:visited,
.enter-button:focus {
  color: var(--thorns-parchment);
  text-decoration: none;
}

/* ---------------------------------------------------------------------------
- Sidebar
--------------------------------------------------------------------------- */

.sidebar-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  z-index: var(--thorns-z-sidebar-toggle);
  cursor: pointer;
  padding: 0.25rem;
  color: var(--thorns-parchment);
}

.sidebar-toggle .sidebar-icon {
  width: var(--thorns-icon-size-lg);
  height: var(--thorns-icon-size-lg);
}

.sidebar {
  flex: 0 0 var(--thorns-sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  z-index: var(--thorns-z-sidebar);
  background-color: var(--thorns-green);
  transition: flex-basis var(--thorns-transition-base);
}

.sidebar.collapsed {
  flex-basis: var(--thorns-sidebar-width-collapsed);
}

.sidebar-icon {
  flex-shrink: 0;
  width: var(--thorns-icon-size);
  height: var(--thorns-icon-size);
}

.sidebar-label {
  white-space: nowrap;
  overflow: hidden;
  transition: width var(--thorns-transition-base), opacity var(--thorns-transition-fast);
}

.sidebar.collapsed .sidebar-label {
  width: 0;
  opacity: 0;
}

.sidebar-menu {
  list-style: none;
  padding: 18px 0 8px;
  margin: 0;
}

.sidebar-menu-bottom {
  margin-top: auto;
  border-top: 1px solid var(--thorns-green-border);
}

.sidebar-menu li {
  margin: 0;
}

.sidebar-menu a,
.sidebar-menu button {
  display: flex;
  align-items: center;
  gap: var(--thorns-sidebar-gap);
  width: 100%;
  padding: var(--thorns-sidebar-item-padding);
  height: var(--thorns-sidebar-item-height);
  box-sizing: border-box;
  color: var(--thorns-mist);
  text-decoration: none;
  font-weight: normal;
  font-family: var(--thorns-font-sans);
  font-size: 0.9rem;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  text-align: left;
  cursor: pointer;
}

.sidebar-menu a:hover,
.sidebar-menu button:hover {
  background-color: var(--thorns-green-active);
  color: var(--thorns-parchment);
}

.sidebar-menu a.active {
  background-color: var(--thorns-green-active);
  color: var(--thorns-parchment);
  border-left-color: var(--thorns-red);
}

.sidebar-collapse {
  display: flex;
  align-items: center;
  gap: var(--thorns-sidebar-gap);
  padding: var(--thorns-sidebar-item-padding);
  height: var(--thorns-sidebar-item-height);
  background: none;
  border: none;
  border-top: 1px solid var(--thorns-green-border);
  color: var(--thorns-mist);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: normal;
  font-family: var(--thorns-font-sans);
  width: 100%;
  box-sizing: border-box;
}

.sidebar-collapse:hover {
  color: var(--thorns-parchment);
}

.sidebar.collapsed .sidebar-collapse svg {
  transform: rotate(180deg);
}

.profile-menu {
  display: none;
  list-style: none;
  padding-left: 1rem;
  margin: 0.25rem 0 0.5rem;
}

.profile.open .profile-menu {
  display: block;
}

.profile-menu a,
.profile-menu button {
  font-weight: normal;
  padding-left: 2rem;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------------------
- Desktop only
--------------------------------------------------------------------------- */

@media (min-width: 769px) {
  .sidebar-toggle {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
- Mobile only
--------------------------------------------------------------------------- */

@media (max-width: 768px) {

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--thorns-sidebar-width-mobile);
    height: 100vh;
    transform: translateX(-100%);
    transition: transform var(--thorns-transition-slow);
    z-index: 1000;
    padding-top: 3.5rem;
    flex-basis: auto;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .sidebar.collapsed .sidebar-label {
    width: auto;
    opacity: 1;
  }

  .page-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .page-layout,
  .page-content,
  .hero,
  .hero-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .feature-row {
    flex-direction: column;
  }
}