/* PALTA — colors & type mirrored from live Elementor kit (post-151) */
:root {
  --color-primary: #334eac;
  --color-secondary: #f7f2eb;
  --color-text: #081f5c;
  --color-accent: #edf1f6;
  --color-cream: #fff9f0;
  --color-sky: #d0e3ff;
  --color-sand: #f2f0de;
  --color-button: #7096d1;
  --color-white: #ffffff;
  --font: "Montserrat", sans-serif;
  /* Shared shell: inner content/columns only (section backgrounds stay full-bleed) */
  --shell-max-width: 1200px;
  --shell-gutter: 1.5rem;
  /* Contact hero image inset — reused on Home section panels */
  --panel-inset: 1.25rem;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-button);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-text);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.4em;
  line-height: 1.15;
  font-weight: 800;
  text-transform: uppercase;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-text);
  color: var(--color-secondary);
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

/* ——— Shared shell (header / footer / section inners align) ———
   Colored section wrappers stay full viewport width; only .shell
   (and header/footer inners) are capped at --shell-max-width. */
.shell,
.header-inner,
.footer-inner {
  width: 100%;
  max-width: var(--shell-max-width);
  margin-inline: auto;
  padding-inline: var(--shell-gutter);
}

/* ——— Header / Nav ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid rgba(8, 31, 92, 0.06);
}

.header-inner {
  padding-block: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo img {
  width: 150px;
  max-width: 150px;
  height: auto;
}

.site-navigation .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.75rem;
}

.site-navigation .menu a {
  color: var(--color-text);
  font-size: 16px;
  font-weight: 400;
}

.site-navigation .menu a:hover,
.site-navigation .menu a[aria-current="page"] {
  color: var(--color-primary);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: var(--color-text);
}

/* ——— Footer ——— */
.site-footer {
  background: var(--color-text);
  color: var(--color-secondary);
  padding-block: 2.5rem 2rem;
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
  text-align: center;
}

.footer-brand img {
  margin: 0 auto 0.75rem;
  width: 120px;
  /* light logo on dark footer */
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.footer-tagline {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--color-secondary);
}

.footer-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.footer-nav a {
  color: var(--color-secondary);
  font-weight: 400;
}

.footer-nav a:hover {
  color: var(--color-sky);
}

.copyright {
  margin: 0.5rem 0 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--color-secondary);
}

/* ——— Shared section helpers ——— */
.section {
  position: relative;
  width: 100%;
}

/* Full-bleed colored wrappers. Grid lives on .section-panel__inner
   (inside .shell) so backgrounds span the viewport while columns
   stay at --shell-max-width. Ratios mirror live Elementor home. */
.section-panel {
  width: 100%;
  background: var(--color-text);
  padding-block: var(--panel-inset);
}

.section-panel__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  padding-block: 0;
  /* Horizontal inset already from .shell gutter; keep panel pad via block only */
}

/* Welcome — navy band (live: --e-global-color-text) */
.section-panel--welcome {
  background: var(--color-text);
}

.section-panel--welcome .section-panel__inner {
  /* Live Welcome image ~366px tall; 4:3 contain → ~488px wide */
  grid-template-columns: minmax(0, 488px) 1fr;
  align-items: stretch;
}

/* Digital Solution — white band (live: no section bg → page white) */
.section-panel--digital {
  background: var(--color-white);
}

.section-panel__inner--digital {
  grid-template-columns: 67% 33%;
}

/* Circuits — accent→white gradient (live post-154 c8493b9) */
.section-panel--circuits {
  background-color: transparent;
  background-image: linear-gradient(
    90deg,
    var(--color-accent) 75%,
    var(--color-white) 100%
  );
}

.section-panel__inner--circuits {
  grid-template-columns: 33% 67%;
}

.section-media {
  background-color: transparent;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 200px;
}

/* Live Welcome image: contain + top left; sized like indopalta.net (~565×366) */
.section-media--contain {
  background-size: contain;
  background-position: top left;
}

.section-panel--welcome .section-media--contain {
  width: 100%;
  height: 366px;
  max-height: 366px;
  min-height: 200px;
  align-self: center;
}

.section-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5%;
}

.section-copy--on-dark {
  color: var(--color-accent);
}

.section-copy--on-dark .eyebrow {
  color: var(--color-accent);
}

.section-copy--on-dark .headline {
  color: var(--color-accent);
}

.section-copy--on-dark p {
  color: var(--color-accent);
}

.section-copy--on-light {
  color: var(--color-text);
}

/* Live light panels: headings use primary (#334EAC) */
.section-copy--on-light .eyebrow,
.section-copy--on-light .headline {
  color: var(--color-primary);
}

.eyebrow {
  font-size: clamp(1.25rem, 2.5vw, 1.875rem);
  font-weight: 300;
  text-transform: none;
  margin-bottom: -0.35rem;
  letter-spacing: 0.01em;
}

.headline {
  font-size: clamp(1.875rem, 4vw, 2.8125rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-copy p {
  max-width: 36rem;
  font-size: 16px;
  font-weight: 300;
}

.section-copy p strong {
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  padding: 0.85rem 1.75rem;
  background: var(--color-button);
  color: var(--color-secondary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  width: fit-content;
}

.btn:hover {
  background: var(--color-primary);
  color: var(--color-accent);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn--ghost:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ——— Page heroes (inner pages) — full-bleed bg, shelled columns ——— */
.page-hero {
  width: 100%;
  background: var(--color-accent);
  padding-block: var(--panel-inset);
  min-height: 320px;
}

.page-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 280px;
}

.page-hero__media {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 240px;
}

.page-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.page-hero .eyebrow {
  color: var(--color-primary);
}

.page-hero .headline {
  color: var(--color-primary);
}

.page-hero p {
  color: var(--color-text);
  max-width: 32rem;
}

/* ——— Services / content blocks ——— */
.content-wrap {
  width: 100%;
  padding-block: 3rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}

.service-card {
  background: var(--color-accent);
  padding: 0;
  overflow: hidden;
}

.service-card__image {
  aspect-ratio: 3 / 2;
  background-size: cover;
  background-position: center;
}

.service-card__body {
  padding: 1.25rem 1.35rem 1.5rem;
}

.service-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: none;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.service-card p {
  margin: 0;
  font-size: 15px;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 2rem 0 1.25rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.portfolio-item {
  display: block;
  background: var(--color-cream);
  transition: transform 0.2s ease;
}

.portfolio-item:hover {
  transform: translateY(-3px);
}

.portfolio-item img {
  width: 100%;
  aspect-ratio: 768 / 548;
  object-fit: cover;
}

.portfolio-item span {
  display: block;
  padding: 0.65rem 0.85rem;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text);
}

/* ——— Products ——— */
.product-list {
  display: grid;
  gap: 2.5rem;
  margin: 2rem 0;
}

.product {
  display: grid;
  grid-template-columns: minmax(140px, 280px) 1fr;
  gap: 1.5rem;
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(8, 31, 92, 0.08);
}

.product:last-child {
  border-bottom: 0;
}

.product__image {
  background: var(--color-accent);
  padding: 0.75rem;
}

.product__image img {
  margin: 0 auto;
  max-height: 220px;
  width: auto;
  object-fit: contain;
}

.product h2 {
  font-size: 1.35rem;
  font-weight: 600;
  text-transform: none;
  color: var(--color-primary);
}

.product p {
  margin-bottom: 0.75rem;
}

.wiki-note {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-sand);
  font-size: 15px;
}

/* ——— Contact ——— */
.contact-block {
  max-width: 36rem;
}

.contact-block a {
  font-weight: 400;
}

.contact-meta {
  margin-top: 1.5rem;
  font-size: 15px;
  color: var(--color-text);
}

/* ——— Welcome / marketplaces ——— */
.marketplace-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin: 1.5rem 0 2rem;
}

.marketplace-row a {
  display: inline-block;
}

.marketplace-row img {
  max-height: 72px;
  width: auto;
}

.prose {
  max-width: 42rem;
}

.prose p + p {
  margin-top: 1rem;
}

/* ——— Scroll reveals (Elementor fadeIn / slideInLeft / slideInRight) ——— */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
  }

  .reveal.is-inview.reveal--fade {
    animation: fadeIn 1.25s ease-in both;
  }

  .reveal.is-inview.reveal--slide-right {
    animation: slideInRight 1.25s ease-out both;
  }

  .reveal.is-inview.reveal--slide-left {
    animation: slideInLeft 1.25s ease-out both;
  }

  .page-hero__copy,
  .service-card,
  .product {
    animation: fadeIn 0.9s ease-in both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translate3d(100%, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translate3d(-100%, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .section-panel__inner,
  .section-panel--welcome .section-panel__inner,
  .section-panel__inner--digital,
  .section-panel__inner--circuits,
  .page-hero__inner,
  .product {
    grid-template-columns: 1fr;
  }

  .section-panel__inner--digital .section-media {
    order: -1;
  }

  .section-panel--welcome .section-media--contain {
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 200px;
    aspect-ratio: 4 / 3;
  }

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

  .section-media {
    min-height: 200px;
  }
}

@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .site-navigation .menu {
    display: none;
    position: absolute;
    right: 1rem;
    top: calc(100% - 0.25rem);
    flex-direction: column;
    gap: 0;
    background: var(--color-white);
    border: 1px solid rgba(8, 31, 92, 0.1);
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(8, 31, 92, 0.08);
  }

  .site-navigation.is-open .menu {
    display: flex;
  }

  .site-navigation .menu a {
    display: block;
    padding: 0.85rem 1.1rem;
  }

  .site-navigation {
    position: relative;
  }

  .eyebrow {
    font-size: 1.25rem;
  }

  .headline {
    font-size: 1.875rem;
  }
}
