:root {
  /* Cores - Starry Night Palette (Vibrant & Deep) */
  --night: #040b1a;
  --midnight: #071329;
  --ink: #02060f;
  --cobalt: #1a458a;
  --deep-ocean: #0a1f44;
  --star-gold: #fcc23b;
  --burning-gold: #ffcf4d;
  --amber: #dd9e2f;
  --cream: #fdf6e3;
  --text: #fdf6e3;
  --text-muted: rgba(253, 246, 227, 0.7);
  
  /* Estrutura */
  --container-width: 1280px;
  --radius: 0px; /* Sharp & Organic mix */
  --card-bg: rgba(10, 25, 50, 0.7);
  --border: 1px solid rgba(252, 194, 59, 0.3);
  --shadow-glow: 0 0 40px rgba(252, 194, 59, 0.1);
  
  /* Espaçamento */
  --space-unit: 1rem;
  --section-padding: 12rem;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  margin: 0;
  background-color: var(--night);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Canvas Texture Overlay (Enhanced) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.admin-shell::after,
body.devise-shell.admin-shell::after {
  opacity: 0.03;
}

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

.section {
  padding: var(--section-padding) 0;
  position: relative;
}

/* Tipografia Brutalista/Impressionista */
h1, h2, h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  line-height: 0.95;
  margin: 0 0 2rem;
  color: var(--cream);
  text-transform: none;
}

h1 { 
  font-size: clamp(4rem, 12vw, 9rem); 
  letter-spacing: -0.03em;
  filter: drop-shadow(0 0 20px rgba(252, 194, 59, 0.2));
}
h1 span { 
  color: var(--star-gold); 
  font-style: italic; 
  display: block;
  margin-left: 2rem;
}

h2 { 
  font-size: clamp(3rem, 7vw, 5rem); 
  letter-spacing: -0.02em;
}

p { 
  margin-bottom: 2rem; 
  color: var(--text-muted); 
  font-size: 1.2rem; 
  max-width: 600px;
}

.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--star-gold);
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

/* Brushstroke Fragments (Replaces Cards) */
.fragment {
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  padding: 4rem;
  position: relative;
  border-left: 4px solid var(--star-gold);
  clip-path: polygon(0 0, 100% 5%, 95% 100%, 5% 95%);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: var(--shadow-glow);
}

.fragment--alt {
  clip-path: polygon(5% 0, 95% 5%, 100% 95%, 0% 100%);
  border-left: 0;
  border-right: 4px solid var(--star-gold);
}

.fragment:hover {
  transform: scale(1.02) rotate(0.5deg);
  background: rgba(10, 25, 50, 0.9);
}

/* Navbar (Minimalist Floating) */
.navbar {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 300px;
  z-index: 1000;
  transition: all 0.5s;
}

.navbar__inner {
  background: rgba(4, 11, 26, 0.5);
  backdrop-filter: blur(20px);
  padding: 1rem 3rem;
  border-radius: 100px;
  border: var(--border);
  display: flex;
  gap: 3rem;
  align-items: center;
}

.navbar__menu {
  display: flex;
  gap: 2.5rem;
}

.navbar__menu a {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.3s;
}

.navbar__menu a:hover { color: var(--star-gold); transform: translateY(-2px); }

/* Hero: The Swirl Layout */
.hero {
  min-height: 110vh;
  display: flex;
  align-items: center;
  overflow: visible;
}

.hero__content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero__panel {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%) rotate(-3deg);
  width: 500px;
  z-index: 5;
  background: linear-gradient(135deg, var(--deep-ocean), var(--night));
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
  padding: 5rem;
  border: none;
}

.hero__lead {
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--cream);
  opacity: 0.9;
  border-left: 2px solid var(--star-gold);
  padding-left: 2rem;
  margin: 3rem 0;
}

/* Gallery: Artistic Chaos */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  padding: 4rem 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  filter: grayscale(0.5);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item:hover {
  filter: grayscale(0);
  z-index: 50;
  transform: scale(1.1);
  box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item--1 { grid-column: 1 / 7; grid-row: 1 / 3; height: 600px; clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%); }
.gallery-item--2 { grid-column: 7 / 13; grid-row: 1 / 2; height: 350px; clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%); margin-top: 2rem; }
.gallery-item--3 { grid-column: 7 / 10; grid-row: 2 / 3; height: 230px; clip-path: polygon(0 0, 100% 10%, 90% 100%, 5% 90%); }
.gallery-item--4 { grid-column: 10 / 13; grid-row: 2 / 3; height: 230px; clip-path: polygon(5% 5%, 100% 0, 100% 100%, 0 95%); }

/* Swirling Sky Backdrop */
.sky-backdrop {
  position: fixed;
  inset: -10%;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(circle at 70% 20%, #1a458a 0%, #040b1a 60%);
}

.sky-backdrop__swirls {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1000 1000' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.005' numOctaves='2'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='100'/%3E%3C/filter%3E%3Cpath d='M0 500 Q 250 200 500 500 T 1000 500' stroke='rgba(252, 194, 59, 0.1)' fill='none' stroke-width='100' filter='url(%23f)'/%3E%3C/svg%3E");
  opacity: 0.2;
  animation: swirl 60s linear infinite;
}

@keyframes swirl {
  from { transform: rotate(0deg) scale(1.2); }
  to { transform: rotate(360deg) scale(1.2); }
}

/* Timeline: Vertical Brushstroke */
.timeline {
  max-width: 800px;
  margin-left: 10%;
  border-left: 1px solid rgba(252, 194, 59, 0.2);
  padding-left: 4rem;
}

.timeline__item {
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 6rem;
  padding: 0;
  display: block;
}

.timeline__time {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
  transform: translateX(-6rem);
  color: var(--star-gold);
}

/* Button (The Gold Highlight) */
.button {
  background: var(--star-gold);
  color: var(--ink);
  padding: 1.5rem 4rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  border: none;
  clip-path: polygon(5% 0, 100% 0, 95% 100%, 0% 100%);
  transition: all 0.4s;
}

.button:hover {
  transform: scale(1.05) translateX(10px);
  background: var(--burning-gold);
}

.button--ghost {
  background: transparent;
  color: var(--star-gold);
  border: 1px solid var(--star-gold);
}

/* Countdown */
.countdown {
  display: flex;
  gap: 2rem;
}

.countdown div {
  text-align: center;
}

.countdown strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  display: block;
  color: var(--star-gold);
}

.countdown span {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

/* Responsive Swirls */
@media (max-width: 1024px) {
  .hero__panel {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    margin-top: 4rem;
    clip-path: none;
  }
  .hero { height: auto; padding: 10rem 0; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item { height: 400px !important; clip-path: none !important; margin: 0 !important; }
}

/* Reveal Overrides */
.reveal {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================================
   ADMIN LAYOUT
   ========================================================================== */

/* Shell */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--midnight);
  border-right: 1px solid rgba(252, 194, 59, 0.15);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 900;
}

.admin-logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--star-gold);
  text-decoration: none;
  letter-spacing: -0.02em;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(252, 194, 59, 0.15);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.admin-nav a,
.admin-nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.admin-nav a:hover,
.admin-nav button:hover {
  background: rgba(252, 194, 59, 0.08);
  color: var(--cream);
}

.admin-nav a.active {
  background: rgba(252, 194, 59, 0.12);
  color: var(--star-gold);
}

.admin-logout {
  margin-top: auto;
  color: rgba(253, 246, 227, 0.4) !important;
  font-size: 0.8rem !important;
}

.admin-logout:hover {
  color: #e74c3c !important;
  background: rgba(231, 76, 60, 0.08) !important;
}

/* Main content area */
.admin-content {
  flex: 1;
  margin-left: 240px;
  padding: 2rem 3rem;
  min-height: 100vh;
  background: var(--night);
}

/* Page header */
.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(252, 194, 59, 0.1);
}

.admin-page-header h1 {
  font-size: 2rem;
  margin: 0;
  filter: none;
}

.admin-page-header .eyebrow {
  margin-bottom: 0.5rem;
}

/* Metrics cards */
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.admin-metric {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(252, 194, 59, 0.12);
  border-radius: 8px;
  padding: 1.5rem;
}

.admin-metric p {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  max-width: none;
}

.admin-metric h2 {
  font-size: 2rem;
  margin: 0;
  color: var(--star-gold);
  line-height: 1;
}

/* Messages grid (dashboard) */
.messages-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Tables */
.admin-table {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(252, 194, 59, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
}

.admin-table h3 {
  font-size: 1rem;
  margin: 0 0 1rem;
  color: var(--cream);
  font-family: "Manrope", sans-serif;
  font-weight: 700;
}

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

.admin-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(252, 194, 59, 0.15);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--cream);
  border-bottom: 1px solid rgba(252, 194, 59, 0.05);
}

.admin-table tr:hover td {
  background: rgba(252, 194, 59, 0.03);
}

.admin-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.admin-actions a {
  color: var(--star-gold);
  font-size: 0.8rem;
  text-decoration: none;
}

.admin-actions a:hover {
  text-decoration: underline;
}

.admin-actions .button--small {
  font-size: 0.7rem;
  padding: 0.4rem 1rem;
  clip-path: none;
  border-radius: 4px;
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.admin-actions .button--small:hover {
  background: rgba(231, 76, 60, 0.25);
}

/* Buttons (admin context) */
.admin-page-header .button,
.admin-page-header .button--small {
  font-size: 0.75rem;
  padding: 0.6rem 1.5rem;
  clip-path: none;
  border-radius: 6px;
  letter-spacing: 0.1em;
}

/* Forms */
.admin-form-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(252, 194, 59, 0.1);
  border-radius: 8px;
  padding: 2rem;
  max-width: 600px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(4, 11, 26, 0.6);
  border: 1px solid rgba(252, 194, 59, 0.15);
  border-radius: 6px;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--star-gold);
  box-shadow: 0 0 0 2px rgba(252, 194, 59, 0.1);
}

.admin-form input::placeholder,
.admin-form textarea::placeholder {
  color: rgba(253, 246, 227, 0.3);
}

.admin-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-form input[type="submit"] {
  background: var(--star-gold);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s;
}

.admin-form input[type="submit"]:hover {
  background: var(--burning-gold);
}

/* Admin public (login) */
.admin-public-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--night);
}

.admin-public-card {
  background: var(--card-bg);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(252, 194, 59, 0.15);
  border-radius: 10px;
  padding: 3rem;
  width: 100%;
  max-width: 400px;
}

.admin-public-card h2 {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 2rem;
}

.admin-public-card .admin-form input {
  margin-bottom: 0;
}

.admin-public-card h1 {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 0.5rem;
  filter: none;
}

.admin-public-card .eyebrow {
  text-align: center;
}

.admin-public-card label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.admin-public-card label input[type="checkbox"] {
  width: auto;
}

.admin-public-card a {
  color: var(--star-gold);
  font-size: 0.8rem;
}

/* Flash messages */
.flash-messages {
  margin-bottom: 1.5rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.flash--notice {
  background: rgba(252, 194, 59, 0.1);
  border: 1px solid rgba(252, 194, 59, 0.2);
  color: var(--star-gold);
}

.flash--alert {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

/* Admin responsive */
@media (max-width: 768px) {
  .admin-sidebar {
    width: 100%;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 1rem;
    gap: 1rem;
  }

  .admin-logo {
    border-bottom: none;
    padding-bottom: 0;
  }

  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .admin-content {
    margin-left: 0;
    padding: 1.5rem;
  }

  .admin-layout {
    flex-direction: column;
  }

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

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