:root {
  --bg: #f8f7f2;
  --surface: #ffffff;
  --surface-strong: #f0eee7;
  --ink: #0a0c2f;
  --muted: #5d5463;
  --line: #e2ddd0;
  --primary: #66136d;
  --primary-dark: #3d0b4f;
  --accent: #b7862c;
  --accent-soft: #efe4cf;
  --violet-soft: #8f5aa0;
  --meralda-ink: #090d2b;
  --blue: #28396d;
  --shadow: 0 18px 55px rgba(10, 12, 47, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(239, 228, 207, 0.28), transparent 420px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link:focus {
  z-index: 20;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: var(--ink);
  color: white;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  background: rgba(248, 247, 242, 0.94);
  border-bottom: 1px solid rgba(226, 221, 208, 0.9);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
}

.brand img {
  width: 176px;
  height: auto;
  filter: drop-shadow(0 8px 14px rgba(10, 12, 47, 0.08));
}

.menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.menu a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.menu a:hover,
.menu a:focus {
  color: var(--primary-dark);
  border-color: var(--accent);
}

.language-switcher {
  display: flex;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.language-button {
  min-width: 42px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.language-button.is-active {
  background: var(--meralda-ink);
  color: var(--accent-soft);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.menu-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.section {
  padding: 92px 0;
}

.section-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: center;
  padding: 64px 0 76px;
  background:
    linear-gradient(135deg, rgba(102, 19, 109, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(183, 134, 44, 0.12), transparent 30%),
    var(--bg);
}

.hero-grid,
.split,
.projects-grid,
.contact-grid,
.method-grid,
.cms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.65rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.55rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.hero-lead,
.section-heading p,
.content-copy p,
.contact-section p,
.method-band p {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
  cursor: pointer;
}

.button-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 12px 26px rgba(102, 19, 109, 0.24);
}

.button-primary:hover,
.button-primary:focus {
  background: var(--primary-dark);
}

.button-secondary {
  background: #faf8f2;
  border-color: rgba(102, 19, 109, 0.18);
  color: var(--primary-dark);
}

.hero-visual {
  position: relative;
  min-height: 470px;
  display: grid;
  place-items: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% -2% 2% 5%;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(102, 19, 109, 0.16), rgba(183, 134, 44, 0.13));
  box-shadow: var(--shadow);
}

.hero-visual img {
  position: relative;
  z-index: 1;
  width: min(660px, 96%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(10, 12, 47, 0.18);
}

.status-panel {
  position: absolute;
  z-index: 2;
  right: -12px;
  bottom: 8px;
  width: min(300px, 70%);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 252, 244, 0.96);
  box-shadow: var(--shadow);
}

.status-panel strong,
.status-panel span:last-child {
  display: block;
}

.status-panel span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.intro-band,
.management-band,
.meralda-band {
  background:
    linear-gradient(135deg, rgba(102, 19, 109, 0.08), transparent 36%),
    linear-gradient(315deg, rgba(40, 57, 109, 0.07), transparent 28%),
    var(--surface);
}

.quote-wrap {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(239, 228, 207, 0.46), transparent 72%),
    var(--surface-strong);
}

.about-visual {
  width: 100%;
  margin-bottom: 22px;
  border-radius: var(--radius);
  box-shadow: 0 16px 42px rgba(10, 12, 47, 0.14);
}

blockquote {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.5vw, 2.1rem);
  line-height: 1.18;
  font-weight: 800;
}

.quote-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.quote-author img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: white;
}

.quote-author span {
  display: block;
  color: var(--muted);
}

.section-copy {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
}

.meralda-intro {
  display: grid;
  align-content: start;
}

.meralda-logo {
  width: min(210px, 58vw);
  margin: 0 0 24px;
  border: 1px solid rgba(9, 13, 43, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 16px 42px rgba(9, 13, 43, 0.16);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0 0;
}

.metrics div,
.service-card,
.project-card,
.portfolio-card,
.management-feature,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metrics div {
  padding: 18px;
}

.metrics dt {
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 900;
}

.metrics dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.service-grid,
.management-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.service-card,
.management-feature,
.project-card {
  padding: 22px;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(102, 19, 109, 0.1), var(--accent-soft));
  color: var(--primary-dark);
  font-weight: 900;
}

.service-card p,
.project-card p,
.management-feature p {
  margin: 0;
  color: var(--muted);
}

.method-band {
  background:
    linear-gradient(135deg, rgba(102, 19, 109, 0.32), transparent 45%),
    linear-gradient(315deg, rgba(143, 90, 160, 0.22), transparent 34%),
    var(--meralda-ink);
  color: white;
}

.method-band .eyebrow,
.method-band p {
  color: #e9e4d7;
}

.timeline {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.timeline span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-weight: 900;
}

.timeline p {
  margin: 4px 0 0;
  color: #ebe6d8;
}

.projects-section {
  background:
    linear-gradient(90deg, rgba(183, 134, 44, 0.08), transparent 28%),
    linear-gradient(315deg, rgba(102, 19, 109, 0.08), transparent 34%),
    var(--bg);
}

.portfolio-layout {
  display: grid;
  gap: 28px;
}

.portfolio-layout .section-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: end;
  max-width: none;
  margin-bottom: 0;
}

.portfolio-layout .section-heading p {
  max-width: 780px;
}

.portfolio-layout .section-heading .button {
  align-self: end;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.portfolio-card {
  overflow: hidden;
  background: var(--surface);
}

.portfolio-media {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 6px;
  padding: 6px;
  background: #eee9de;
}

.portfolio-media img,
.portfolio-video {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--ink);
}

.portfolio-media img:first-child {
  grid-row: span 2;
}

.portfolio-video {
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  text-align: center;
}

.portfolio-video span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
}

.portfolio-body {
  padding: 22px;
}

.portfolio-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.portfolio-meta span,
.project-card small {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--primary-dark);
  font-weight: 900;
}

.portfolio-html {
  color: var(--muted);
}

.portfolio-html p {
  margin: 0 0 12px;
}

.portfolio-html ul {
  margin: 0;
  padding-left: 18px;
}

.portfolio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.portfolio-links a {
  color: var(--primary-dark);
  font-weight: 900;
}

.management-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.management-feature {
  background: #faf8f2;
}

.contact-section {
  background:
    linear-gradient(135deg, rgba(102, 19, 109, 0.1), transparent 35%),
    linear-gradient(315deg, rgba(40, 57, 109, 0.08), transparent 30%),
    var(--surface);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(102, 19, 109, 0.14);
}

.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2366136d' fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-message {
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.form-message--success {
  background: #e6f7ed;
  color: #1a6e36;
  border: 1px solid #b7e4c8;
}

.form-message--error {
  background: #fdecea;
  color: #a12b2b;
  border: 1px solid #f5c4c4;
}

.contact-form button[type=submit]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-form--sent > :not(.form-message) {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.footer img {
  width: 150px;
}

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

  .menu {
    position: absolute;
    top: 78px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

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

  .menu a {
    padding: 12px;
  }

  .hero-grid,
  .split,
  .projects-grid,
  .contact-grid,
  .method-grid,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 390px;
  }

  .service-grid,
  .portfolio-grid,
  .management-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-layout .section-heading {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .section {
    padding: 64px 0;
  }

  .nav {
    gap: 12px;
    min-height: 68px;
  }

  .brand img {
    width: 138px;
  }

  .menu {
    top: 68px;
  }

  .language-button {
    min-width: 36px;
  }

  .hero-visual {
    min-height: 300px;
  }

  .status-panel {
    right: 8px;
    bottom: 0;
    width: 86%;
  }

  .metrics,
  .service-grid,
  .portfolio-grid,
  .management-features {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
