/*
  Y-SON Urban Lighting — Public Frontend
  File    : frontend-layout.css
  Version : v1.0.0 | 2026-05-20
  Load order: 4 of 5

  Header, footer, nav, hamburger, grid, page wrappers.
  All values via --fe- variables — no raw hex/px.
*/

/* ═══════════════════════════════════════════════════════════
   CONTAINER & GRID
═══════════════════════════════════════════════════════════ */

.fe-container {
  width: 100%;
  max-width: var(--fe-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--fe-sp-4);
  padding-right: var(--fe-sp-4);
}

@media (min-width: 640px) {
  .fe-container {
    padding-left: var(--fe-sp-6);
    padding-right: var(--fe-sp-6);
  }
}

@media (min-width: 1280px) {
  .fe-container {
    padding-left: var(--fe-sp-8);
    padding-right: var(--fe-sp-8);
  }
}

.fe-grid {
  display: grid;
  gap: var(--fe-sp-6);
  grid-template-columns: 1fr;
}

.fe-grid-2 { grid-template-columns: 1fr; }
.fe-grid-3 { grid-template-columns: 1fr; }
.fe-grid-4 { grid-template-columns: 1fr; }

.fe-grid-auto {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

@media (min-width: 640px) {
  .fe-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .fe-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .fe-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .fe-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1280px) {
  .fe-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════ */

.fe-header {
  position: sticky;
  top: 0;
  z-index: var(--fe-z-sticky);
  height: var(--fe-header-height);
  background-color: var(--fe-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.fe-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fe-sp-6);
}

.fe-header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 36px;
}

.fe-header-logo img,
.fe-header-logo svg {
  height: 100%;
  width: auto;
}

.fe-header-nav {
  display: none;
  align-items: center;
  gap: var(--fe-sp-1);
  margin-left: auto;
}

@media (min-width: 1024px) {
  .fe-header-nav {
    display: flex;
  }
}

.fe-header-actions {
  display: flex;
  align-items: center;
  gap: var(--fe-sp-3);
  margin-left: auto;
}

@media (min-width: 1024px) {
  .fe-header-actions {
    margin-left: 0;
  }
}

/* ═══════════════════════════════════════════════════════════
   NAV LINKS
═══════════════════════════════════════════════════════════ */

.fe-nav-list {
  display: flex;
  align-items: center;
  gap: var(--fe-sp-1);
}

.fe-nav-item {
  position: relative;
}

.fe-nav-link {
  display: block;
  font-size: var(--fe-text-sm);
  font-weight: var(--fe-weight-medium);
  color: var(--fe-text-inverse-dim);
  padding: var(--fe-sp-2) var(--fe-sp-3);
  border-radius: var(--fe-radius-sm);
  transition: color var(--fe-ease-fast), background-color var(--fe-ease-fast);
  white-space: nowrap;
}

.fe-nav-link:hover {
  color: var(--fe-text-inverse);
  background-color: rgba(255, 255, 255, 0.06);
}

.fe-nav-link-active {
  color: var(--fe-accent);
}

.fe-nav-link-active:hover {
  color: var(--fe-accent);
  background-color: rgba(232, 130, 26, 0.08);
}

.fe-nav-dropdown {
  position: absolute;
  top: calc(100% + var(--fe-sp-2));
  left: 0;
  min-width: 220px;
  background-color: var(--fe-surface);
  border: 1px solid var(--fe-border-light);
  border-radius: var(--fe-radius-md);
  box-shadow: var(--fe-shadow-lg);
  z-index: var(--fe-z-dropdown);
  display: none;
  padding: var(--fe-sp-2) 0;
}

.fe-nav-item:hover .fe-nav-dropdown,
.fe-nav-item:focus-within .fe-nav-dropdown {
  display: block;
}

.fe-nav-dropdown-inner a {
  display: block;
  padding: var(--fe-sp-2) var(--fe-sp-4);
  font-size: var(--fe-text-sm);
  color: var(--fe-text-2);
  transition: color var(--fe-ease-fast), background-color var(--fe-ease-fast);
}

.fe-nav-dropdown-inner a:hover {
  color: var(--fe-accent);
  background-color: var(--fe-accent-dim);
}

/* ═══════════════════════════════════════════════════════════
   HAMBURGER
═══════════════════════════════════════════════════════════ */

.fe-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--fe-radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .fe-hamburger {
    display: none;
  }
}

.fe-hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--fe-text-inverse);
  border-radius: 2px;
  transition: transform var(--fe-ease-base), opacity var(--fe-ease-base);
}

.fe-hamburger-open .fe-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.fe-hamburger-open .fe-hamburger-line:nth-child(2) {
  opacity: 0;
}

.fe-hamburger-open .fe-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE NAV DRAWER
═══════════════════════════════════════════════════════════ */

.fe-mobile-nav {
  position: fixed;
  top: var(--fe-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--fe-navy);
  z-index: calc(var(--fe-z-sticky) - 1);
  overflow-y: auto;
  padding: var(--fe-sp-4) 0;
  transform: translateX(-100%);
  transition: transform var(--fe-ease-base);
}

.fe-mobile-nav-open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .fe-mobile-nav {
    display: none;
  }
}

.fe-mobile-nav-item {
  display: block;
  padding: var(--fe-sp-3) var(--fe-sp-6);
  font-size: var(--fe-text-base);
  font-weight: var(--fe-weight-medium);
  color: var(--fe-text-inverse-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: color var(--fe-ease-fast), background-color var(--fe-ease-fast);
}

.fe-mobile-nav-item:hover {
  color: var(--fe-text-inverse);
  background-color: rgba(255, 255, 255, 0.04);
}

.fe-mobile-nav-item.fe-nav-link-active {
  color: var(--fe-accent);
}

.fe-mobile-nav-expand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--fe-sp-3) var(--fe-sp-6);
  font-size: var(--fe-text-base);
  font-weight: var(--fe-weight-medium);
  color: var(--fe-text-inverse-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  cursor: pointer;
  text-align: left;
}

.fe-mobile-nav-expand-children {
  display: none;
  background-color: rgba(0, 0, 0, 0.15);
  padding: var(--fe-sp-2) 0;
}

.fe-mobile-nav-expand-children.is-open {
  display: block;
}

.fe-mobile-nav-expand-children a {
  display: block;
  padding: var(--fe-sp-2) var(--fe-sp-10);
  font-size: var(--fe-text-sm);
  color: var(--fe-text-inverse-muted);
  transition: color var(--fe-ease-fast);
}

.fe-mobile-nav-expand-children a:hover {
  color: var(--fe-accent);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */

.fe-footer {
  background-color: var(--fe-navy-mid);
  color: var(--fe-text-inverse-dim);
  padding-top: var(--fe-sp-16);
}

.fe-footer-inner {
  padding-bottom: var(--fe-sp-12);
}

.fe-footer-brand {
  margin-bottom: var(--fe-sp-8);
}

.fe-footer-brand-logo {
  height: 32px;
  width: auto;
  margin-bottom: var(--fe-sp-3);
}

.fe-footer-brand-tagline {
  font-size: var(--fe-text-sm);
  color: var(--fe-text-inverse-muted);
  line-height: var(--fe-leading-loose);
  max-width: 320px;
}

.fe-footer-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fe-sp-8);
}

@media (min-width: 640px) {
  .fe-footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .fe-footer-links { grid-template-columns: repeat(4, 1fr); }
}

.fe-footer-section-title {
  font-family: var(--fe-font-heading);
  font-size: var(--fe-text-sm);
  font-weight: var(--fe-weight-semibold);
  color: var(--fe-text-inverse);
  text-transform: uppercase;
  letter-spacing: var(--fe-tracking-wide);
  margin-bottom: var(--fe-sp-4);
}

.fe-footer-section a {
  display: block;
  font-size: var(--fe-text-sm);
  color: var(--fe-text-inverse-muted);
  padding: var(--fe-sp-1) 0;
  transition: color var(--fe-ease-fast);
}

.fe-footer-section a:hover {
  color: var(--fe-accent);
}

.fe-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--fe-sp-6) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--fe-sp-4);
  flex-wrap: wrap;
}

.fe-footer-copy {
  font-size: var(--fe-text-sm);
  color: var(--fe-text-inverse-muted);
}

/* ═══════════════════════════════════════════════════════════
   PAGE WRAPPERS
═══════════════════════════════════════════════════════════ */

.fe-page {
  min-height: calc(100vh - var(--fe-header-height));
  background-color: var(--fe-bg);
}

.fe-page-hero {
  position: relative;
  min-height: var(--fe-hero-min-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--fe-navy);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.fe-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--fe-hero-overlay);
}

.fe-page-hero-inner {
  position: relative;
  z-index: var(--fe-z-base);
  width: 100%;
  text-align: center;
  padding: var(--fe-sp-16) var(--fe-sp-4);
}

.fe-page-hero-title {
  font-family: var(--fe-font-heading);
  font-size: var(--fe-text-4xl);
  font-weight: var(--fe-weight-black);
  color: var(--fe-text-inverse);
  letter-spacing: var(--fe-tracking-tight);
  margin-bottom: var(--fe-sp-4);
  line-height: var(--fe-leading-tight);
}

@media (min-width: 1024px) {
  .fe-page-hero-title { font-size: var(--fe-text-5xl); }
}

.fe-page-hero-subtitle {
  font-size: var(--fe-text-base);
  color: var(--fe-text-inverse-dim);
  margin-bottom: var(--fe-sp-8);
  line-height: var(--fe-leading-loose);
  max-width: var(--fe-content-width);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .fe-page-hero-subtitle { font-size: var(--fe-text-lg); }
}

.fe-page-content {
  padding: var(--fe-sp-16) 0;
}

.fe-section {
  padding: var(--fe-sp-16) 0;
}

@media (min-width: 1024px) {
  .fe-section { padding: var(--fe-sp-20) 0; }
}

.fe-section-header {
  margin-bottom: var(--fe-sp-10);
}

.fe-section-title {
  font-family: var(--fe-font-heading);
  font-size: var(--fe-text-3xl);
  font-weight: var(--fe-weight-bold);
  color: var(--fe-text-1);
  letter-spacing: var(--fe-tracking-tight);
  margin-bottom: var(--fe-sp-3);
  line-height: var(--fe-leading-snug);
}

@media (min-width: 1024px) {
  .fe-section-title { font-size: var(--fe-text-4xl); }
}

.fe-section-subtitle {
  font-size: var(--fe-text-lg);
  color: var(--fe-text-2);
  line-height: var(--fe-leading-loose);
  max-width: 640px;
}
