/*
Theme Name: LSR Theme
Description: Custom theme for LawSchoolRules.
Version: 0.2.8
Author: LawSchoolRules
Text Domain: lsr-theme
*/

:root {
  --lsr-navy: #0F2343;
  --lsr-gold: #F3B447;
  --lsr-gold-light: #F7C873;
  --lsr-blue-light: #042870;
  --lsr-blue-lighter: #2D5387;
  --lsr-teal: #1F6F78;
  --lsr-white: #FFFFFF;
  --lsr-ecru: #FBFAF6;
  --lsr-beige: #F6F1E6;
  --lsr-tan: #E6DCC4;
  --lsr-header-bg: var(--lsr-navy);
  --lsr-header-text: var(--lsr-white);
  --lsr-primary-menu-text: var(--lsr-white);
  --lsr-submenu-bg: var(--lsr-white);
  --lsr-submenu-text: var(--lsr-navy);
  --lsr-titleband-bg: var(--lsr-ecru);
  --lsr-titleband-text: var(--lsr-white);
  --lsr-footer-bg: var(--lsr-navy);
  --lsr-footer-text: var(--lsr-white);
  --lsr-footer-border: rgba(255,255,255,0.35);
  --lsr-logo-color: var(--lsr-gold);
  --lsr-font-heading: 'EB Garamond', serif;
  --lsr-font-body: 'Inter Tight', sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--lsr-font-body);
  color: var(--lsr-navy);
  background: var(--lsr-ecru);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lsr-skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: var(--lsr-gold);
  color: var(--lsr-navy);
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 999;
  transition: top 0.2s ease;
  font-weight: 600;
}

.lsr-skip-link:focus {
  top: 16px;
}

.site-header {
  background: var(--lsr-header-bg);
  color: var(--lsr-header-text);
  position: relative;
  z-index: 2000;
  overflow: visible;
}

.site-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(20px, 4vw, 60px);
  position: relative;
  z-index: 3;
  overflow: visible;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.site-logo {
  display: inline-flex;
  width: 40px;
  height: 40px;
}

.site-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-logo-mask {
  width: 40px;
  height: 40px;
  background: var(--lsr-logo-color);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.site-name {
  font-family: var(--lsr-font-heading);
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav {
  font-family: var(--lsr-font-body);
}

.primary-nav a {
  color: var(--lsr-primary-menu-text);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  align-items: baseline;
}

.site-nav li {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  padding-bottom: 6px;
}

.site-nav li.menu-item-has-children::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
}

.site-nav a {
  color: inherit;
  font-weight: 600;
  font-size: 15px;
  display: inline-block;
  line-height: 1.2;
  vertical-align: baseline;
  padding: 6px 0;
}

.site-nav .menu-item-has-children > a::after {
  content: "▾";
  margin-left: 6px;
  font-size: 12px;
  display: inline-block;
  vertical-align: baseline;
}

.site-nav .sub-menu {
  position: absolute;
  top: 100%;
  margin-top: 0;
  right: 0;
  background: var(--lsr-submenu-bg);
  color: var(--lsr-submenu-text);
  padding: 6px 0;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  min-width: 180px;
  max-width: min(320px, calc(100vw - 32px));
  display: none;
  flex-direction: column;
  z-index: 9999;
  box-sizing: border-box;
  pointer-events: auto;
}

.site-nav .sub-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.site-nav .sub-menu li {
  width: 100%;
  margin: 0;
}

.site-nav .sub-menu a {
  display: block;
  padding: 6px 14px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--lsr-submenu-text);
}

.site-nav li:focus-within > .sub-menu,
.site-nav li:hover > .sub-menu,
.site-nav .sub-menu:hover {
  display: flex;
}

.site-titleband {
  background: var(--lsr-titleband-bg);
  color: var(--lsr-titleband-text);
  position: relative;
  z-index: 1;
}

.site-titleband-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(20px, 4vw, 60px);
}

.page-title {
  font-family: var(--lsr-font-heading);
  font-size: clamp(26px, 3vw, 34px);
  margin: 0;
  color: inherit;
}

.secondary-nav ul {
  justify-content: flex-end;
  gap: 20px;
}

.site-content {
  padding: clamp(30px, 4vw, 60px) clamp(20px, 4vw, 60px) 80px;
  background: var(--lsr-navy);
}

.site-content > * {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer {
  background: var(--lsr-footer-bg);
  color: var(--lsr-footer-text);
  padding: 40px clamp(20px, 4vw, 60px) 30px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.footer-logo {
  display: flex;
  justify-content: center;
}

.footer-logo .site-logo-mask,
.footer-logo img {
  width: 36px;
  height: 36px;
}

.footer-menu {
  width: 100%;
}

.footer-menu ul {
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-stripe {
  width: 100%;
  height: 1px;
  background: var(--lsr-footer-border);
  margin: 8px 0 12px;
}

.footer-bottom {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.footer-site {
  justify-self: start;
}

.footer-copyright {
  justify-self: center;
}

.footer-social {
  justify-self: end;
  display: flex;
  gap: 14px;
}

.footer-social a {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  color: var(--lsr-footer-text);
}

.footer-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.lsr-menu-gated > a {
  opacity: 0.85;
}

@media (max-width: 900px) {
  .site-topbar,
  .site-titleband-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .secondary-nav ul,
  .site-nav ul {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 16px;
    row-gap: 8px;
  }

  .site-nav .sub-menu {
    position: absolute;
    top: 100%;
    margin-top: 6px;
    left: 0;
    right: auto;
    transform: none;
    max-width: calc(100vw - 32px);
    width: max-content;
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-site,
  .footer-copyright,
  .footer-social {
    justify-self: center;
  }
}

@media (max-width: 600px) {
  .site-content {
    padding: 24px 18px 60px;
  }
}
