:root {
  --orange: #ff6a00;
  --orange-deep: #e45500;
  --violet: #4b1f6b;
  --violet-soft: #6b3a8c;
  --ink: #121212;
  --paper: #f7f1e8;
  --cream: #fff8f0;
  --muted: #6a5f55;
  --line: rgba(18, 18, 18, 0.12);
  --shadow: 0 18px 50px rgba(18, 18, 18, 0.18);
  --font-display: "Caveat", cursive;
  --font-head: "Bricolage Grotesque", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 106, 0, 0.28), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(75, 31, 107, 0.22), transparent 50%),
    linear-gradient(165deg, var(--cream), #efe4d6 40%, #e8dcc8);
  position: relative;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  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.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.topbar, .main, .site-foot, .flash-wrap { position: relative; z-index: 1; }

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  background: rgba(255, 248, 240, 0.72);
}

.brand { text-decoration: none; color: inherit; display: grid; gap: 0.1rem; }
.brand-script {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1;
  color: var(--orange-deep);
}
.brand-sub { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--violet); font-weight: 600; }

.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: center; }
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0.2rem;
  border-bottom: 2px solid transparent;
}
.nav a.is-active, .nav a:hover { border-color: var(--orange); color: var(--orange-deep); }

.logout-form { margin: 0; }
.logout-form button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
}
.logout-form button:hover { border-color: var(--violet); color: var(--violet); }

.main { padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 3rem; max-width: 1120px; margin: 0 auto; }

.hero {
  position: relative;
  padding: clamp(2rem, 6vw, 4rem) 0 2.5rem;
  overflow: hidden;
  animation: rise 0.7s ease both;
}
.hero-glow {
  position: absolute;
  width: 420px; height: 420px;
  right: -80px; top: -120px;
  background: radial-gradient(circle, rgba(255,106,0,0.45), transparent 65%);
  filter: blur(10px);
  animation: pulse 5s ease-in-out infinite;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--violet);
  margin: 0 0 0.6rem;
}
.hero-title { margin: 0; }
.hero-script, h1.hero-script {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10vw, 6rem);
  line-height: 0.92;
  color: var(--ink);
  margin: 0;
  text-shadow: 3px 4px 0 rgba(255, 106, 0, 0.35);
}
.hero-lead {
  max-width: 36rem;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 1.1rem 0 1.5rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hero-stamp {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.45rem 1rem;
  background: var(--violet);
  color: white;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  transform: rotate(-6deg);
  box-shadow: var(--shadow);
  animation: stamp 0.8s 0.3s cubic-bezier(.2,1.4,.4,1) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-orange {
  background: var(--orange);
  color: white;
  box-shadow: 0 8px 24px rgba(255, 106, 0, 0.35);
}
.btn-orange:hover { background: var(--orange-deep); }
.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.services, .gallery, .sector, .page-head {
  margin: 2.5rem 0;
  animation: rise 0.6s ease both;
}
.services h2, .gallery h2, .sector h2, .page-head h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.8rem;
}
.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}
.service-list li {
  position: relative;
  padding: 0.75rem 1rem 0.75rem 2.2rem;
  background: rgba(255,255,255,0.55);
  border-left: 4px solid var(--orange);
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0.85rem; top: 1.05rem;
  width: 0.55rem; height: 0.55rem;
  border-radius: 50%;
  background: var(--violet);
}
.tagline {
  font-style: italic;
  color: var(--violet);
  margin-top: 1.2rem;
  font-size: 1.05rem;
}

.section-head p { color: var(--muted); margin: 0 0 1.2rem; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-card {
  margin: 0;
  background: #111;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}
.gallery-card:hover { transform: translateY(-6px) rotate(-0.5deg); }
.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
}
.gallery-card figcaption {
  padding: 0.65rem 0.85rem;
  color: #fff;
  font-size: 0.85rem;
  background: linear-gradient(90deg, var(--orange), var(--violet));
}

.sector-line {
  font-family: var(--font-head);
  font-size: 1.15rem;
  line-height: 1.5;
}
.muted { color: var(--muted); }
.stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.stats div {
  background: var(--ink);
  color: white;
  padding: 1rem 1.3rem;
  min-width: 140px;
}
.stats strong {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--orange);
}
.stats span { font-size: 0.85rem; opacity: 0.8; }

.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1.2rem;
}
.filter-bar .count { margin-left: auto; color: var(--muted); font-size: 0.9rem; }

.table-wrap {
  overflow-x: auto;
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.data-table th {
  text-align: left;
  padding: 0.85rem 1rem;
  background: var(--ink);
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.data-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table tr:hover td { background: rgba(255, 106, 0, 0.06); }
.data-table code {
  font-size: 0.82rem;
  background: rgba(75,31,107,0.08);
  padding: 0.1rem 0.35rem;
}
.actions { white-space: nowrap; }
.actions a {
  color: var(--violet);
  font-weight: 600;
  margin-right: 0.7rem;
  text-decoration: none;
}
.actions a:hover { color: var(--orange-deep); }
.empty { text-align: center; color: var(--muted); padding: 2rem !important; }

.contact-form.paper {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(1rem, 3vw, 1.8rem);
  box-shadow: var(--shadow);
  background-image:
    linear-gradient(rgba(255,106,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75,31,107,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}
fieldset {
  border: 2px solid var(--ink);
  margin: 0 0 1.2rem;
  padding: 1rem 1.1rem 1.2rem;
  background: rgba(255,255,255,0.72);
}
legend {
  font-family: var(--font-head);
  font-weight: 700;
  padding: 0 0.4rem;
  background: var(--orange);
  color: white;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
label, .label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.field, input[type="text"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.65rem 0.75rem;
  border: 1.5px solid rgba(18,18,18,0.25);
  background: white;
  font: inherit;
  border-radius: 0;
}
.field:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--orange);
  border-color: var(--orange);
}
.radio-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.35rem;
}
.radio-list label, .radio-list li label {
  font-weight: 500;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.hint-box {
  background: var(--violet);
  color: white;
  padding: 0.9rem 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
.mt { margin-top: 0.6rem; }
.form-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.login-wrap {
  min-height: 60vh;
  display: grid;
  place-items: center;
}
.login-card {
  width: min(420px, 100%);
  padding: 2rem;
  background: rgba(18,18,18,0.92);
  color: white;
  box-shadow: var(--shadow);
}
.login-card .hero-script { color: var(--orange); text-shadow: none; font-size: 3rem; }
.login-card .muted { color: rgba(255,255,255,0.65); }
.login-form { display: grid; gap: 0.9rem; margin-top: 1.2rem; }
.login-form label { color: rgba(255,255,255,0.85); }

.flash-wrap { padding: 0.8rem clamp(1rem, 4vw, 2.5rem) 0; max-width: 1120px; margin: 0 auto; }
.flash {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.flash-success, .flash-info { background: #d8f5c8; border-left: 4px solid #3a8a1e; }
.flash-error, .flash-error { background: #ffd5d0; border-left: 4px solid #c0392b; }

.site-foot {
  margin-top: 2rem;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.site-foot a { color: var(--violet); }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes stamp {
  from { opacity: 0; transform: rotate(-20deg) scale(1.4); }
  to { opacity: 1; transform: rotate(-6deg) scale(1); }
}

@media (max-width: 640px) {
  .topbar { align-items: flex-start; }
  .hero-script { font-size: 3.4rem; }
}
