/* 
  FRKHD LUXURY THEME — MASTER STYLESHEET
  Aesthetic: Navy Seal, High-End Luxury, Quiet Precision.
  Colors: Deepest Navy, Navy Seal Gold, Crisp White.
*/

:root {
  --bg: #050e17;
  --bg-overlay: rgba(5, 14, 23, 0.95);
  --bg-card: #0a1622;
  
  --text: #e0e6ed;
  --text-muted: #8b9bb4;
  --text-dark: #020609;
  
  /* Navy Seal Gold (Metallic/Official) */
  --gold: #C49102;
  --gold-light: #E6B800;
  --gold-dim: rgba(196, 145, 2, 0.3);
  
  --border: rgba(196, 145, 2, 0.15);
  --border-hover: rgba(196, 145, 2, 0.5);
  
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Lato', sans-serif;
  
  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  
  --spacing-container: 40px;
}

/* --- RESET & BASE --- */

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: #fff;
  margin: 0;
  line-height: 1.1;
}

p {
  margin: 0 0 1.5em 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s var(--ease-smooth);
}

a:hover {
  color: var(--gold);
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-container);
}

/* --- UTILITIES --- */

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

.skip {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: var(--gold);
  color: var(--bg);
  padding: 10px 20px;
  transform: translateY(-150%);
  transition: transform 0.3s ease;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.skip:focus {
  transform: translateY(0);
}

/* --- HEADER / DYNAMIC ISLAND --- */

.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 32px 0;
  transition: padding 0.4s var(--ease-expo);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-container);
  
  /* Initial State: Wide */
  width: 100%;
  height: 56px;
  background: transparent;
  border-radius: 0;
  transition: all 0.5s var(--ease-expo);
}

/* Dynamic Island State (Applied via JS) */
.nav-header.is-scrolled .nav-container {
  max-width: 540px;
  background: rgba(10, 22, 34, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(196, 145, 2, 0.3);
  border-radius: 100px;
  padding: 0 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  justify-content: space-between;
  gap: 40px;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #fff;
  font-weight: 400;
  letter-spacing: -0.02em;
  transition: transform 0.4s var(--ease-expo), opacity 0.4s ease;
}

/* Hide Logo in Pill Mode if desired, or keep it. Let's keep it small. */
.nav-header.is-scrolled .nav-logo {
  transform: scale(0.9);
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  position: relative;
}

.nav-link.active, .nav-link:hover {
  color: #fff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

/* --- HERO SECTION --- */

.hero {
  position: relative;
  height: 85vh; /* Reduced height as requested */
  width: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
  overflow: hidden;
  margin-bottom: 0; /* No margin, flows into next section */
}

.hero-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  z-index: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 14, 23, 0.3) 0%,
    rgba(5, 14, 23, 0.1) 40%,
    rgba(5, 14, 23, 0.8) 80%,
    rgba(5, 14, 23, 1) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-text-wrapper {
  max-width: 1000px;
}

.hero-title {
  font-size: clamp(4rem, 10vw, 11rem);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  line-height: 0.9;
  text-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
  padding-left: 8px;
  font-weight: 400;
}

/* --- MANIFESTO SECTION (New) --- */

.manifesto {
  padding: 120px 0;
  background: var(--bg);
  position: relative;
  z-index: 2;
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 24px;
  position: relative;
  padding-left: 40px;
}

.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.section-heading {
  font-size: 3.5rem;
  line-height: 1.1;
  color: #fff;
}

.manifesto-body p {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.manifesto-body strong {
  color: #fff;
  font-weight: 400;
}

/* --- SHOWCASE / PORTFOLIO --- */

.showcase {
  padding: 80px 0 160px;
}

.section-header {
  margin-bottom: 80px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.showcase-item {
  display: block;
  position: relative;
  group: showcase;
}

.showcase-item.offset-top {
  margin-top: 160px;
}

.item-visual {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 2px;
  margin-bottom: 32px;
  background: #0a1622;
  position: relative;
}

/* --- ICONS (Placeholder Replacement) --- */

.visual-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #0a1622, #152332);
  transition: transform 0.6s var(--ease-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-icon {
  width: 80px;
  height: 80px;
  opacity: 0.7;
  transition: all 0.4s ease;
  transform: scale(1);
}

.showcase-item:hover .item-icon {
  opacity: 1;
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px rgba(196, 145, 2, 0.4));
}

.showcase-item:hover .visual-placeholder {
  transform: scale(1.02);
}


.item-content {
  padding-right: 20px;
}

.item-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  display: block;
  margin-bottom: 12px;
}

.item-title {
  font-size: 2.5rem;
  margin-bottom: 12px;
  color: #fff;
}

.item-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 90%;
}

.btn-arrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  transition: color 0.3s ease;
}

.showcase-item:hover .btn-arrow {
  color: var(--gold);
}

/* --- FOOTER --- */

.footer {
  padding: 120px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 80px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer-email {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: #fff;
  line-height: 1;
}

.footer-email:hover {
  color: var(--gold);
}

.footer-social {
  display: flex;
  gap: 32px;
}

.social-link {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  position: relative;
}

.social-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.social-link:hover {
  color: #fff;
}

.social-link:hover::after {
  width: 100%;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- RESPONSIVE --- */

.nav-toggle-mobile {
  display: none;
}

@media (max-width: 900px) {
  :root {
    --spacing-container: 24px;
  }
  
  .nav-menu {
    display: none; /* Hide on mobile for now, or implement mobile menu */
  }
  
  .nav-toggle-mobile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 24px;
  }
  
  .nav-toggle-mobile .line {
    width: 100%;
    height: 2px;
    background: #fff;
  }

  .hero-title {
    font-size: 14vw;
  }
  
  .manifesto-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  
  .showcase-item.offset-top {
    margin-top: 0;
  }
  
  .footer-row {
    flex-direction: column;
    gap: 60px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
  }

  /* Dynamic Island Mobile Adjustments */
  .nav-header.is-scrolled .nav-container {
    max-width: calc(100% - 40px);
    height: 48px;
    padding: 0 20px;
    gap: 16px;
  }
}

/* --- ANIMATIONS --- */

.reveal-text {
  opacity: 0;
  transform: translateY(30px);
}

/* --- ORNAMENTS (Navy Seal / Federal) --- */

.ornament-star {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: var(--gold);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 40px 0;
  opacity: 0.8;
}

.ornament-divider::before,
.ornament-divider::after {
  content: '';
  height: 1px;
  width: 60px;
  background: var(--gold);
}

.ornament-divider .ornament-star {
  width: 12px;
  height: 12px;
}

.ornament-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--gold);
  transition: all 0.3s ease;
  pointer-events: none;
  opacity: 0.6;
}

.ornament-corner.tl { top: 0; left: 0; border-bottom: none; border-right: none; }
.ornament-corner.tr { top: 0; right: 0; border-bottom: none; border-left: none; }
.ornament-corner.bl { bottom: 0; left: 0; border-top: none; border-right: none; }
.ornament-corner.br { bottom: 0; right: 0; border-top: none; border-left: none; }

.product-card:hover .ornament-corner,
.showcase-item:hover .ornament-corner {
  width: 20px;
  height: 20px;
  opacity: 1;
}

/* --- MERCH PAGE STYLES --- */

.page {
  padding-top: 120px;
}

.product-card {
  background: rgba(10, 22, 34, 0.4);
  border: 1px solid rgba(196, 145, 2, 0.1);
  padding: 32px;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--gold);
  background: rgba(10, 22, 34, 0.8);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.product-media {
  background: #050e17;
  aspect-ratio: 1/1;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(255,255,255,0.05);
}

.product-media img {
  width: 80%;
  height: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.product-card:hover .product-media img {
  opacity: 1;
}

.product-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.product-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.product-line {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.product-price {
  font-family: var(--font-sans);
  color: var(--gold);
  font-weight: 700;
  margin-top: 16px;
  font-size: 1.1rem;
}

.badge {
  font-size: 0.6rem;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  margin-bottom: 16px;
  display: block;
}

.hero-inner {
  text-align: center;
  padding: 120px 0;
}

.hero-line {
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-serif);
  margin-top: 24px;
  opacity: 0.7;
}

.section-head {
  text-align: center;
  margin-bottom: 80px;
}

.section-kicker {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.section-title {
  font-size: 3rem;
}

.philosophy-inner {
  text-align: center;
  padding: 120px 0;
  border-top: 1px solid rgba(196, 145, 2, 0.1);
  border-bottom: 1px solid rgba(196, 145, 2, 0.1);
}

.philosophy-text {
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.4;
  color: #fff;
}

/* --- SIDEBAR NAVIGATION (Mobile) --- */

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 14, 23, 0.8);
  backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

body[data-nav-open="true"] .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-expo);
  display: flex;
  flex-direction: column;
  padding: 40px;
}

body[data-nav-open="true"] .sidebar {
  transform: translateX(0);
}

.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
}

.sidebar-mark {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #fff;
}

.sidebar-close {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.sidebar-close:hover {
  color: var(--gold);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: auto;
}

.sidebar-link {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: #fff;
  line-height: 1.1;
  transition: color 0.3s ease;
}

.sidebar-link:hover {
  color: var(--gold);
}

.sidebar-foot {
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.sidebar-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- MODAL (Product Details) --- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 14, 23, 0.9);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: var(--bg);
  border: 1px solid var(--gold);
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  transform: translateY(20px);
  transition: transform 0.4s var(--ease-expo);
}

.modal[data-open="true"] .modal-dialog {
  transform: translateY(0);
}

.modal-media {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
  min-height: 400px;
}

.modal-media img {
  width: 80%;
  height: auto;
}

.modal-body {
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  z-index: 10;
}

.modal-close:hover {
  color: var(--gold);
}

.modal-titleRow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 2.5rem;
  color: #fff;
}

.modal-line {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 32px;
}

.modal-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: auto;
}

.modal-foot {
  margin-top: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.modal-price {
  font-size: 1.5rem;
  color: #fff;
  font-family: var(--font-serif);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--gold);
  color: var(--bg);
  padding: 16px 32px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: #fff;
}

@media (max-width: 800px) {
  .modal-dialog {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .modal-media {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-height: 250px;
  }
  
  .modal-body {
    padding: 32px 24px;
  }
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 800px) {
  /* Force visual containers to be visible immediately */
  .hero-image-container, 
  .item-visual, 
  .product-media,
  .visual-placeholder {
    clip-path: none !important;
    -webkit-clip-path: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
   display: flex !important; /* Ensure placeholder flex works */
  }

  .parallax-item,
  .reveal-text {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  /* Force SVGs inside to be visible */
  .item-icon, 
  .visual-placeholder svg {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
    display: block !important;
  }
}

/* --- MOBILE RESPONSIVENESS (Fixes) --- */
@media (max-width: 800px) {
  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  
  .manifesto-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-row {
    flex-direction: column;
    gap: 40px;
  }
  
  .hero-title {
    font-size: 14vw; /* Ensure it fits on narrow screens */
  }
  
  .container {
    padding: 0 24px;
  }
  
  .section-label {
    padding-left: 32px; /* Slightly less padding */
  }
  
  .section-label::before {
    width: 20px;
  }
}

/* --- CINEMATIC & HUD EFFECTS --- */

/* Noise removed by user request */

.screen-frame {
  position: fixed;
  inset: 20px;
  pointer-events: none;
  z-index: 8000;
  /* Frame is created by corners */
}

.screen-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: rgba(196, 145, 2, 0.2);
  border-style: solid;
  transition: all 0.5s ease;
}

.screen-corner.tl { top: 0; left: 0; border-width: 1px 0 0 1px; }
.screen-corner.tr { top: 0; right: 0; border-width: 1px 1px 0 0; }
.screen-corner.bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.screen-corner.br { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

/* Subtle pulse for corners to feel alive */
@keyframes cornerPulse {
  0% { opacity: 0.2; }
  50% { opacity: 0.5; }
  100% { opacity: 0.2; }
}

.screen-corner {
  animation: cornerPulse 4s infinite ease-in-out;
}

@media (max-width: 900px) {
  .screen-frame { inset: 10px; }
  .screen-corner { width: 12px; height: 12px; }
}

/* --- PRELOADER --- */

.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-expo), visibility 0.8s;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.preloader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.preloader-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.1s linear;
}

.preloader-text {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  margin-bottom: 8px;
}

.nav-form {
  display: inline-flex;
  align-items: center;
}

.nav-button {
  font: inherit;
}

.auth {
  padding-top: 140px;
  padding-bottom: 140px;
}

.auth-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 46px;
  background: rgba(10, 22, 34, 0.6);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.auth-title {
  margin-top: 10px;
  font-size: 3rem;
  letter-spacing: -0.02em;
}

.auth-error {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 80, 80, 0.35);
  background: rgba(255, 80, 80, 0.08);
  color: #ffd0d0;
}

.auth-form {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(5, 14, 23, 0.7);
  color: var(--text);
  outline: none;
  transition: border-color 0.25s var(--ease-smooth), transform 0.25s var(--ease-smooth);
}

.auth-input:focus {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.auth-submit {
  margin-top: 6px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-hover);
  background: rgba(196, 145, 2, 0.08);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.25s var(--ease-smooth), transform 0.25s var(--ease-smooth);
}

.auth-submit:hover {
  background: rgba(196, 145, 2, 0.14);
  transform: translateY(-1px);
}

.auth-foot {
  margin-top: 18px;
  color: var(--text-muted);
}

.auth-foot a {
  color: #fff;
}

.admin {
  padding-top: 140px;
  padding-bottom: 140px;
}

.admin-head {
  max-width: 900px;
}

.admin-title {
  margin-top: 10px;
  font-size: 3.4rem;
  letter-spacing: -0.02em;
}

.admin-sub {
  margin-top: 12px;
  color: var(--text-muted);
}

.admin-notice,
.admin-error {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 22, 34, 0.6);
}

.admin-error {
  border-color: rgba(255, 80, 80, 0.35);
  background: rgba(255, 80, 80, 0.08);
  color: #ffd0d0;
}

.admin-card {
  margin-top: 26px;
  padding: 18px;
  background: rgba(10, 22, 34, 0.6);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(196, 145, 2, 0.12);
  vertical-align: middle;
}

.admin-table th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.admin-row-form {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(5, 14, 23, 0.7);
  color: var(--text);
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.admin-save {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-hover);
  background: rgba(196, 145, 2, 0.08);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-save-quiet {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.mono {
  font-family: 'Courier New', Courier, monospace;
}

.admin-shell {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
}

.admin-side {
  position: sticky;
  top: 120px;
  align-self: start;
  padding: 18px;
  border-radius: 18px;
  background: rgba(10, 22, 34, 0.6);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.admin-mark-title {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #fff;
}

.admin-mark-sub {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-nav {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.admin-nav-link {
  display: block;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(196, 145, 2, 0.12);
  background: rgba(5, 14, 23, 0.35);
  color: #fff;
  transition: border-color 0.25s var(--ease-smooth), background 0.25s var(--ease-smooth), transform 0.25s var(--ease-smooth);
}

.admin-nav-link:hover {
  border-color: var(--border-hover);
  background: rgba(196, 145, 2, 0.08);
  transform: translateY(-1px);
}

.admin-nav-link.is-active {
  border-color: var(--border-hover);
  background: rgba(196, 145, 2, 0.12);
}

.admin-main .admin-head {
  margin-top: 2px;
}

.admin-toolbar {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.admin-search {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  min-width: 280px;
}

.admin-search .admin-input {
  flex: 1;
}

.admin-form {
  display: grid;
  gap: 16px;
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-field {
  display: grid;
  gap: 8px;
}

.admin-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.admin-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(5, 14, 23, 0.7);
  color: var(--text);
  outline: none;
}

.admin-textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(5, 14, 23, 0.7);
  color: var(--text);
  outline: none;
  resize: vertical;
}

.admin-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.admin-upload {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.admin-file {
  width: 100%;
  color: var(--text-muted);
}

.admin-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-actions-inline {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-link {
  color: #fff;
  text-decoration: none;
}

.admin-link:hover {
  color: var(--gold);
}

.admin-link-danger {
  color: #ffd0d0;
}

.admin-inline-form {
  display: inline;
}

.admin-sep {
  margin: 0 10px;
  opacity: 0.35;
}

.admin-post-title {
  font-weight: 700;
  color: #fff;
}

.admin-empty {
  padding: 22px 12px;
  color: var(--text-muted);
}

.admin-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.admin-preview-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: #fff;
}

.admin-preview-body {
  margin-top: 14px;
  color: var(--text);
}

.admin-preview-body h1,
.admin-preview-body h2,
.admin-preview-body h3 {
  margin-top: 18px;
}

.admin-preview-body p {
  margin: 0 0 14px 0;
}

.admin-preview-body pre {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  overflow-x: auto;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: relative;
    top: auto;
  }

  .admin-grid-2 {
    grid-template-columns: 1fr;
  }
}
