:root {
  --bg: #070707;
  --bg-soft: #0d0d0f;
  --panel: rgba(17, 17, 19, .88);
  --panel-2: #151518;
  --text: #f6f6f6;
  --muted: #a6a6ad;
  --line: rgba(255,255,255,.10);
  --red: #e30613;
  --red-2: #ff2230;
  --red-soft: rgba(227, 6, 19, .16);
  --shadow: 0 25px 70px rgba(0,0,0,.45);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 12%, rgba(227, 6, 19, .12), transparent 26rem),
    radial-gradient(circle at 88% 38%, rgba(227, 6, 19, .08), transparent 25rem),
    var(--bg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.page-glow {
  position: fixed;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: rgba(227,6,19,.09);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}
.page-glow-one { left: -8rem; top: 20rem; }
.page-glow-two { right: -7rem; top: 50rem; }

.site-header {
  width: min(1220px, calc(100% - 36px));
  margin: 18px auto 0;
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 14px 12px 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(7,7,7,.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 15px 50px rgba(0,0,0,.22);
  position: sticky;
  top: 12px;
  z-index: 30;
}

.brand { display: flex; align-items: center; min-width: 0; }
.brand-logo {
  display: block;
  width: min(500px, 58vw);
  max-height: 72px;
  object-fit: contain;
  object-position: left center;
}

.admin-trigger,
.icon-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,.05);
}
.admin-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  border-radius: 14px;
  white-space: nowrap;
  transition: .25s ease;
}
.admin-trigger:hover { border-color: rgba(227,6,19,.55); background: var(--red-soft); transform: translateY(-1px); }
.admin-icon { font-size: 1rem; }

main { width: min(1220px, calc(100% - 36px)); margin: 0 auto; }
.hero {
  min-height: 610px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  padding: 90px 0 74px;
}
.hero::after {
  content: "";
  position: absolute;
  right: 2%;
  top: 20%;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(227,6,19,.20);
  transform: rotate(45deg);
  box-shadow: inset 0 0 80px rgba(227,6,19,.06), 0 0 80px rgba(227,6,19,.06);
  z-index: -1;
}
.hero-kicker,
.eyebrow {
  color: #d4d4d8;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 800;
}
.hero-kicker { display: flex; align-items: center; gap: 10px; }
.hero-kicker span { width: 30px; height: 1px; background: var(--red); }
.hero h1 {
  margin: 18px 0 18px;
  max-width: 900px;
  font-size: clamp(3rem, 7vw, 6.3rem);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 760;
}
.hero h1 strong { color: var(--red-2); font-weight: 790; }
.hero > p {
  margin: 0;
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.75;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button {
  border-radius: 14px;
  padding: 13px 18px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 780;
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: linear-gradient(135deg, #bb020d, var(--red-2)); box-shadow: 0 14px 35px rgba(227,6,19,.24); }
.button-ghost { color: var(--text); background: rgba(255,255,255,.045); border-color: var(--line); }
.button-ghost:hover { border-color: rgba(255,255,255,.25); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  width: min(860px, 100%);
  margin-top: 52px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-stats > div { padding: 20px 20px 20px 0; }
.hero-stats > div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.hero-stats strong, .hero-stats span { display: block; }
.hero-stats strong { font-size: 1.03rem; }
.hero-stats span { color: var(--muted); margin-top: 5px; font-size: .9rem; }

.catalog-section { padding: 46px 0 84px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 30px;
}
.eyebrow { margin: 0 0 8px; color: #c9c9ce; }
.section-heading h2, .cta-panel h2, .admin-header h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.035em; }
.filters { display: inline-flex; gap: 8px; padding: 6px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.filter { border: 0; border-radius: 10px; padding: 9px 13px; color: var(--muted); background: transparent; font-weight: 720; }
.filter.active { color: #fff; background: var(--red-soft); box-shadow: inset 0 0 0 1px rgba(227,6,19,.28); }

.catalog-status { color: var(--muted); min-height: 24px; margin-bottom: 12px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.project-card {
  min-height: 310px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  box-shadow: 0 16px 45px rgba(0,0,0,.18);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.project-card:hover { transform: translateY(-5px); border-color: rgba(227,6,19,.42); box-shadow: 0 26px 60px rgba(0,0,0,.34); }
.project-accent { position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(to bottom, transparent, var(--red), transparent); opacity: .75; }
.project-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--red-soft); border: 1px solid rgba(227,6,19,.25); font-size: 1.3rem; }
.project-category { font-size: .73rem; letter-spacing: .12em; text-transform: uppercase; color: #d2d2d8; border: 1px solid var(--line); padding: 7px 9px; border-radius: 999px; }
.project-card h3 { margin: 30px 0 10px; font-size: 1.52rem; letter-spacing: -.025em; }
.project-description { margin: 0; color: var(--muted); line-height: 1.65; font-size: .96rem; }
.project-card-footer { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.project-domain { color: #77777f; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-link { color: #fff; font-weight: 780; font-size: .9rem; white-space: nowrap; }
.project-link:hover { color: var(--red-2); }

.cta-panel {
  margin-bottom: 70px;
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border: 1px solid rgba(227,6,19,.24);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(227,6,19,.12), rgba(255,255,255,.025));
}
.cta-panel p:not(.eyebrow) { color: var(--muted); max-width: 760px; line-height: 1.65; margin-bottom: 0; }

footer {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto 110px;
  border-top: 1px solid var(--line);
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: .9rem;
}
.footer-mark { color: #fff; font-weight: 900; letter-spacing: .16em; }

.floating-actions {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.floating-button {
  height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(15,15,17,.92);
  box-shadow: 0 14px 40px rgba(0,0,0,.32);
  backdrop-filter: blur(14px);
  font-size: .86rem;
  font-weight: 740;
  transition: .2s ease;
}
.floating-button:hover { transform: translateX(-3px); border-color: rgba(255,255,255,.28); }
.floating-button svg { width: 21px; height: 21px; fill: currentColor; }
.floating-button.whatsapp { color: #7df0a1; }
.floating-button.location { color: #ff6b75; }
.floating-button.facebook { color: #9cbcff; }

.modal { position: fixed; inset: 0; z-index: 80; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(8px); }
.admin-panel {
  position: absolute;
  inset: 3vh max(18px, calc((100vw - 980px)/2));
  max-height: 94vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 26px;
  background: #101012;
  box-shadow: var(--shadow);
}
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.admin-header h2 { font-size: 2rem; }
.icon-button { width: 42px; height: 42px; border-radius: 13px; font-size: 1.7rem; line-height: 1; }
.admin-login { max-width: 620px; padding: 18px 0 8px; }
.admin-login > p, .editor-toolbar p { color: var(--muted); line-height: 1.6; }
.admin-login label { display: block; margin: 18px 0 8px; font-weight: 700; }
.password-row { display: flex; gap: 10px; }
.password-row input, .form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  color: var(--text);
  background: #0a0a0b;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  outline: none;
}
.password-row input:focus, .form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus { border-color: rgba(227,6,19,.66); box-shadow: 0 0 0 3px rgba(227,6,19,.1); }
.form-message { min-height: 22px; color: var(--muted); margin-top: 12px; }
.form-message.error { color: #ff8b94; }
.form-message.success { color: #8bf0ad; }
.editor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.editor-toolbar p { margin: 0; }
.admin-items { display: grid; gap: 14px; }
.admin-item { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.025); }
.admin-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.admin-item-number { color: #d6d6dc; }
.delete-item { color: #ff8891; background: transparent; border: 0; font-weight: 760; }
.form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.form-grid label { display: grid; gap: 7px; color: #c8c8ce; font-size: .85rem; font-weight: 700; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid textarea { resize: vertical; min-height: 70px; }
.toggle-label { display: inline-flex !important; grid-column: 1 / -1; grid-template-columns: auto 1fr !important; align-items: center; justify-content: start; }
.toggle-label input { width: 18px; height: 18px; accent-color: var(--red); }
.editor-footer { position: sticky; bottom: -26px; margin: 22px -26px -26px; padding: 16px 26px 22px; background: linear-gradient(180deg, rgba(16,16,18,.85), #101012 25%); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.editor-buttons { display: flex; gap: 10px; }

@media (max-width: 960px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero::after { width: 230px; height: 230px; opacity: .5; }
  .section-heading, .cta-panel { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 680px) {
  .site-header, main, footer { width: min(100% - 22px, 1220px); }
  .site-header { top: 6px; min-height: 82px; padding: 10px 11px; border-radius: 20px; }
  .brand-logo { width: min(66vw, 390px); max-height: 60px; }
  .admin-trigger span:last-child { display: none; }
  .admin-trigger { padding: 10px 12px; }
  .hero { min-height: auto; padding: 70px 4px 58px; }
  .hero h1 { font-size: clamp(2.65rem, 14vw, 4.5rem); }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .section-heading { align-items: stretch; }
  .filters { width: 100%; overflow-x: auto; }
  .filter { flex: 1; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 285px; }
  .cta-panel { padding: 26px 22px; }
  footer { flex-direction: column; align-items: flex-start; margin-bottom: 95px; }
  .floating-button span { display: none; }
  .floating-button { width: 48px; padding: 0; border-radius: 50%; }
  .admin-panel { inset: 10px; max-height: calc(100vh - 20px); padding: 20px; border-radius: 20px; }
  .password-row, .editor-toolbar, .editor-footer { flex-direction: column; align-items: stretch; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide, .toggle-label { grid-column: 1; }
  .editor-footer { bottom: -20px; margin: 20px -20px -20px; padding: 14px 20px 20px; }
  .editor-buttons { width: 100%; }
  .editor-buttons .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
