/* ==========================================
   CROWNED4IMPACT - POLISHED ELEGANT RED THEME
   ========================================== */

:root {
  /* --- PALETTE: NOBLE CRIMSON --- */
  --c-canvas: #FFFFFF;
  /* Crisp White */
  --c-surface: #FAFAFA;
  /* Porcelain */
  --c-ink: #111111;
  /* Jet Black */
  --c-ink-light: #555555;
  /* Dark Grey */

  --c-accent: #B91C1C;
  /* Noble Crimson */
  --c-accent-dark: #991B1B;
  /* Deep Blood Red */
  --c-accent-light: #FEE2E2;
  /* Very Soft Red */

  --c-border: rgba(0, 0, 0, 0.08);

  /* --- TYPOGRAPHY --- */
  --f-heading: 'Cormorant Garamond', serif;
  --f-body: 'Manrope', sans-serif;
  --f-ui: 'Montserrat', sans-serif;

  /* --- SPACING & SHAPE --- */
  --s-container: 1100px;
  --s-gap: 2rem;
  --s-grid: 4rem;

  /* Sharp, Minimalist Radii */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* --- EFFECTS --- */
  --shadow-card: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
  --shadow-gallery: 0 15px 30px rgba(0, 0, 0, 0.15);
  /* Deep gallery shadow */
  --trans: 0.4s ease;
}

/* ==========================================
   RESET & BASE
   ========================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--f-body);
  background-color: var(--c-canvas);
  color: var(--c-ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--f-heading);
  font-weight: 400;
  line-height: 1.1;
  color: var(--c-ink);
}

h1 {
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  letter-spacing: -0.02em;
}

h1 em {
  color: var(--c-accent);
  font-style: italic;
}

h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 em {
  color: var(--c-accent);
  font-weight: 300;
}

h3 {
  font-size: 2rem;
  font-weight: 400;
}

h4 {
  font-family: var(--f-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--c-accent);
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: inline-block;
  border-bottom: 1px solid var(--c-accent);
  padding-bottom: 3px;
}

p {
  color: var(--c-ink-light);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--trans);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius-sm);
}

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */

.container {
  width: 90%;
  max-width: var(--s-container);
  margin: 0 auto;
}

.section {
  padding: 8rem 0;
  /* Significant whitespace */
  position: relative;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-grid);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-gap);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-gap);
}

/* Pillars Section */
.pillars-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.pillars-license {
  justify-self: center;
  width: 100%;
  max-width: 320px;
  margin-left: -1rem;
}

.pillars-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 4rem;
  max-width: 900px;
  margin: 0 auto;
}

/* License Showcase */
.license-frame {
  display: inline-block;
  background: #fff;
  padding: 1.5rem 1.5rem 4rem 1.5rem;
  /* Polaroid style bottom padding */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  max-width: 400px;
  width: 100%;
  position: relative;
  transition: var(--trans);
  transform: rotate(-1deg);
  /* Slight artistic tilt */
}

.license-frame:hover {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border-color: var(--c-accent-light);
}

.license-frame img {
  border: 1px solid var(--c-border);
  filter: none;
  /* Ensure full color */
}

.license-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  width: 100%;
  text-align: center;
}

.text-center {
  text-align: center;
}

.mb-lg {
  margin-bottom: 5rem;
}

.mb-md {
  margin-bottom: 2.5rem;
}

.mb-sm {
  margin-bottom: 1rem;
}

/* ==========================================
   COMPONENTS
   ========================================== */

/* Buttons (Sharp & Elegant) */
.btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  font-family: var(--f-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--trans);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--c-accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--c-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(185, 28, 28, 0.3);
}

.btn-outline {
  border-color: var(--c-ink);
  color: var(--c-ink);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.btn-sm {
  padding: 0.8rem 2rem;
  font-size: 0.7rem;
}

.admin-toggle {
  text-align: right;
  margin-top: 1rem;
  opacity: 0.6;
  transition: var(--trans);
}

.admin-toggle:hover {
  opacity: 1;
}

body.edit-mode .admin-toggle {
  opacity: 1;
}

/* Cards (Minimalist) */
.card {
  background: #fff;
  padding: 3rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  transition: var(--trans);
}

.card:hover {
  border-color: var(--c-accent);
  box-shadow: var(--shadow-hover);
}

/* Navbar (Minimalist) */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  padding: 2rem 0;
  transition: var(--trans);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  padding: 1rem 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-text {
  font-family: var(--f-heading);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  text-transform: none;
  font-variant: normal;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a {
  font-family: var(--f-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--c-ink);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--c-accent);
  transition: var(--trans);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hero */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
}

.hero-compact {
  min-height: 50vh;
  padding-top: 8rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

#loginModal.active {
  display: flex !important;
}

#errorMessage.active {
  display: block !important;
}

/* Gallery / Image Styling */
.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  filter: brightness(0.95);
  /* Slight editorial dim */
  transition: var(--trans);
}

.gallery-image:hover {
  filter: brightness(1.05);
  box-shadow: var(--shadow-gallery);
  transform: translateY(-5px);
}

.nav-toggle {
  display: none;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .pillars-header {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pillars-license {
    justify-self: start;
    max-width: 220px;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 3.2rem;
  }

  .logo-text {
    font-size: 2.5rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    background: #fff;
    flex-direction: column;
    padding: 8rem 2rem;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: var(--trans);
    z-index: 1000;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-toggle {
    display: block;
    z-index: 1001;
  }

  .desk-only {
    display: none;
  }

  .mobile-only {
    display: inline-block !important;
  }
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
  background-color: var(--c-ink);
  color: #fff;
  padding: 6rem 0 3rem;
  font-family: var(--f-body);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 5rem;
}

.footer-brand h3 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  max-width: 300px;
  margin: 0;
}

.footer-col h4 {
  color: rgba(255, 255, 255, 0.4);
  border-bottom: none;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  transition: var(--trans);
}

.footer-links a:hover {
  color: var(--c-accent);
  padding-left: 5px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.sponsored {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.sponsored a {
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.sponsored a:hover {
  color: var(--c-accent);
  border-color: var(--c-accent);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .footer-brand p {
    margin: 0 auto;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
