:root {
  --ink: #07111f;
  --muted: #5c6675;
  --line: #dce6f0;
  --paper: #ffffff;
  --soft: #f2f7fb;
  --blue: #0785df;
  --blue-dark: #063f7d;
  --cyan: #14b6e8;
  --red: #d3131d;
  --black: #05070a;
  --shadow: 0 18px 44px rgba(7, 17, 31, 0.12);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-140%);
  background: var(--black);
  color: var(--paper);
  padding: 10px 14px;
  border-radius: 8px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(220, 230, 240, 0.84);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(var(--max), calc(100% - 40px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.brand img {
  width: 36px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 8px;
  color: #263241;
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--soft);
  color: var(--blue-dark);
  outline: none;
}

.nav-links .header-cta {
  margin-left: 6px;
  background: var(--black);
  color: var(--paper);
}

.nav-links .header-cta:hover,
.nav-links .header-cta:focus-visible {
  background: var(--blue-dark);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.hero {
  min-height: 620px;
  display: flex;
  align-items: center;
  background-image: url("assets/hero/intechgrasi-hero.webp");
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 64px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero h1,
.section h2 {
  margin: 0;
  max-width: 720px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.04;
}

.hero h1 {
  font-size: 4.45rem;
}

.hero-copy {
  max-width: 610px;
  margin: 24px 0 0;
  color: #263241;
  font-size: 1.07rem;
}

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

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.btn.primary {
  background: var(--black);
  color: var(--paper);
  box-shadow: 0 12px 30px rgba(7, 17, 31, 0.18);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  background: var(--blue-dark);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.76);
  border-color: #b8c9d9;
  color: var(--ink);
}

.btn.secondary:hover,
.btn.secondary:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 10px 26px rgba(7, 133, 223, 0.14);
}

.btn.full {
  width: 100%;
}

.hero-proof {
  max-width: 680px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 36px 0 0;
}

.hero-proof div {
  min-height: 98px;
  padding: 16px;
  border: 1px solid rgba(184, 201, 217, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-proof dt {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1.32rem;
  font-weight: 900;
  line-height: 1.15;
}

.hero-proof dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 700;
}

.section {
  padding: 92px 0;
  scroll-margin-top: 94px;
}

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

.section-heading {
  max-width: 760px;
  margin: 0 0 38px;
}

.section-heading.compact {
  margin-bottom: 30px;
}

.section h2 {
  font-size: 3.05rem;
}

.section-heading p:not(.section-kicker),
.intro-grid p,
.contact-grid p {
  color: var(--muted);
  font-size: 1.02rem;
}

.intro-section {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
  background: var(--black);
  color: var(--paper);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr);
  gap: 44px;
  align-items: center;
}

.intro-grid h2,
.intro-grid p {
  color: var(--paper);
}

.intro-grid p {
  margin: 0;
  opacity: 0.8;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  min-height: 312px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(7, 17, 31, 0.05);
}

.service-card span,
.process-grid span {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
}

.service-card h3,
.process-grid h3 {
  margin: 10px 0 10px;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.24;
}

.service-card p,
.process-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.service-card ul {
  display: grid;
  gap: 8px;
  margin: auto 0 0;
  padding: 18px 0 0;
  list-style: none;
}

.service-card li {
  position: relative;
  padding-left: 18px;
  color: #354150;
  font-size: 0.88rem;
  font-weight: 700;
}

.service-card li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 8px;
  height: 2px;
  background: var(--red);
}

.tech-section {
  padding: 70px 0;
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tech-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-list span,
.project-tag,
.modal-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #c9d9e7;
  border-radius: 6px;
  background: var(--paper);
  color: #243242;
  font-size: 0.82rem;
  font-weight: 800;
}

.portfolio-section {
  background: var(--paper);
}

.portfolio-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -12px 0 28px;
}

.filter-btn {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: #354150;
  cursor: pointer;
  font-weight: 800;
}

.filter-btn:hover,
.filter-btn:focus-visible,
.filter-btn.active {
  background: var(--black);
  color: var(--paper);
  border-color: var(--black);
  outline: none;
}

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

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(7, 17, 31, 0.07);
}

.project-media {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 320ms ease;
}

.project-card:hover .project-media img {
  transform: scale(1.035);
}

.project-body {
  display: flex;
  flex-direction: column;
  min-height: 306px;
  padding: 18px;
}

.project-topline {
  color: var(--blue-dark);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-body h3 {
  margin: 8px 0 8px;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.16;
}

.project-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 18px;
}

.project-card .btn {
  margin-top: auto;
  min-height: 42px;
  width: 100%;
  border-color: var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.project-card .btn:hover,
.project-card .btn:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.process-section {
  background: var(--black);
  color: var(--paper);
}

.process-section .section-kicker,
.process-section h2 {
  color: var(--paper);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.process-grid article {
  min-height: 210px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: #0e1520;
}

.process-grid h3 {
  color: var(--paper);
}

.process-grid p {
  color: rgba(255, 255, 255, 0.72);
}

.contact-section {
  background:
    linear-gradient(90deg, rgba(242, 247, 251, 0.94), rgba(255, 255, 255, 0.98)),
    url("assets/catalog/services-catalog-cover.webp");
  background-size: cover;
  background-position: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: start;
}

.contact-panel {
  display: grid;
  gap: 10px;
}

.contact-panel a:not(.btn) {
  display: grid;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.contact-panel a:not(.btn):hover,
.contact-panel a:not(.btn):focus-visible {
  border-color: var(--blue);
  outline: none;
}

.contact-panel span {
  color: var(--muted);
  font-size: 0.81rem;
  font-weight: 800;
}

.contact-panel strong {
  color: var(--ink);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 30px 0;
  background: var(--black);
  color: var(--paper);
}

.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner .brand {
  color: var(--paper);
}

.footer-inner p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.72);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.9fr);
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(7, 17, 31, 0.14);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--black);
  color: var(--paper);
  outline: none;
}

.modal-media {
  min-height: 520px;
  background: var(--soft);
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.modal-copy {
  overflow: auto;
  padding: 44px 34px 34px;
}

.modal-copy h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.3rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.modal-copy p {
  margin: 0;
  color: var(--muted);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.modal-copy ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.modal-copy li {
  position: relative;
  padding-left: 18px;
  color: #263241;
  font-weight: 700;
}

.modal-copy li::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  width: 8px;
  height: 2px;
  background: var(--red);
}

@media (max-width: 1180px) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .process-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    justify-content: flex-start;
  }

  .nav-links .header-cta {
    margin-left: 0;
    justify-content: center;
  }

  .hero {
    min-height: 560px;
    background-position: 40% center;
  }

  .hero h1 {
    max-width: 620px;
    font-size: 3.45rem;
  }

  .hero-copy {
    max-width: 560px;
  }

  .intro-grid,
  .tech-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .section h2 {
    font-size: 2.55rem;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-dialog {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .modal-media {
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  .nav-shell,
  .section-inner,
  .hero-inner,
  .footer-inner {
    width: min(100% - 28px, var(--max));
  }

  .nav-shell {
    min-height: 66px;
  }

  .hero {
    min-height: 480px;
    background-position: 12% center;
  }

  .hero-inner {
    padding: 50px 0 46px;
  }

  .hero h1 {
    font-size: 2.62rem;
  }

  .hero-copy {
    font-size: 0.98rem;
  }

  .hero-proof {
    display: none;
  }

  .section {
    padding: 68px 0;
  }

  .intro-section {
    padding: 36px 0;
  }

  .section h2 {
    font-size: 2.1rem;
  }

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

  .service-card,
  .project-body,
  .process-grid article {
    min-height: unset;
  }

  .project-media {
    aspect-ratio: 16 / 12;
  }

  .contact-panel {
    padding: 12px;
  }

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

  .modal {
    padding: 10px;
  }

  .modal-dialog {
    max-height: calc(100vh - 20px);
  }

  .modal-media {
    min-height: 300px;
  }

  .modal-copy {
    padding: 28px 20px 24px;
  }

  .modal-copy h2 {
    font-size: 1.9rem;
  }
}

@media (max-width: 460px) {
  .brand span {
    font-size: 0.96rem;
  }

  .hero {
    min-height: 460px;
    background-position: 8% center;
  }

  .hero h1 {
    font-size: 2.22rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .portfolio-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-btn {
    width: 100%;
  }
}

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