:root {
  color-scheme: light;
  --accent: #155263;
  --accent-strong: #0b3f4d;
  --gold: #d58a18;
  --green: #2f7a4b;
  --paper: #f3f7f6;
  --panel: #ffffff;
  --border: #d5e1df;
  --text: #06151a;
  --muted: #5d6d70;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: grid;
  grid-template-columns: 44px auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(16px, 4vw, 64px);
  border-bottom: 1px solid rgba(6, 21, 26, 0.12);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand img,
.side-menu-header img {
  width: 138px;
  height: auto;
  display: block;
}

.hamburger,
.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent-strong);
  cursor: pointer;
}

.hamburger span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 2px 0;
  border-radius: 2px;
  background: currentColor;
}

.icon-button {
  font-size: 28px;
  line-height: 1;
}

.top-nav {
  justify-self: end;
}

.top-nav a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.side-menu {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: min(340px, 88vw);
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 18px;
  border-right: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 18px 0 42px rgba(15, 23, 42, 0.18);
  transform: translateX(-105%);
  transition: transform 180ms ease;
}

.menu-open .side-menu {
  transform: translateX(0);
}

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav a {
  padding: 13px 12px;
  border-radius: 8px;
  color: var(--accent-strong);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.side-nav a:hover {
  background: #eef6f4;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  border: 0;
  background: rgba(6, 21, 26, 0.42);
}

.menu-open .menu-backdrop {
  display: block;
}

main {
  padding: 18px clamp(16px, 4vw, 64px) 48px;
}

.hero {
  min-height: calc(100svh - 112px);
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  padding: clamp(24px, 5vw, 56px);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(8, 47, 57, 0.92), rgba(8, 47, 57, 0.68) 48%, rgba(8, 47, 57, 0.2)),
    url('/assets/hero.png') center / cover no-repeat;
}

.hero > div {
  max-width: 760px;
  display: grid;
  gap: 16px;
}

.hero p,
.section-title p,
.contact-band p {
  margin: 0;
  color: #d7edf0;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.hero span {
  max-width: 560px;
  color: #e8f4f2;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-link,
.secondary-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.primary-link {
  background: var(--gold);
  color: #241404;
}

.secondary-link {
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

.commercial-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.commercial-strip article,
.contact-band {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.commercial-strip article {
  display: grid;
  gap: 7px;
  padding: 18px;
}

.commercial-strip strong {
  color: var(--accent-strong);
  font-size: 20px;
}

.commercial-strip span,
.rubro-card p,
.detail-body p {
  color: var(--muted);
  line-height: 1.45;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 28px 0 14px;
}

.section-title p {
  color: var(--accent);
}

.section-title a {
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: none;
}

.page-title {
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.rubro-card {
  display: grid;
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  text-decoration: none;
}

.rubro-card img,
.image-placeholder {
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  background: #dcebe8;
}

.rubro-card div {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
}

.rubro-card span,
.code {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 13px;
}

.rubro-card strong {
  font-size: 21px;
}

.rubro-card p,
.detail-body p {
  margin: 0;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: clamp(20px, 4vw, 36px);
}

.contact-band p {
  color: var(--accent);
}

.contact-band .primary-link {
  white-space: nowrap;
}

.rubro-detail {
  display: grid;
  gap: 18px;
  max-width: 980px;
}

.cover {
  width: 100%;
  aspect-ratio: 1.91 / 1;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.detail-body {
  display: grid;
  gap: 10px;
}

.empty {
  min-height: 300px;
  display: grid;
  place-items: center;
  text-align: center;
}

.data-load-error {
  align-content: center;
  gap: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.data-load-error h1 {
  font-size: clamp(28px, 5vw, 46px);
}

.data-load-error p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 44px 1fr;
  }

  .top-nav {
    display: none;
  }

  .commercial-strip {
    grid-template-columns: 1fr;
  }

  .contact-band,
  .section-title {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero {
    min-height: calc(100svh - 100px);
    padding: 22px;
  }
}
