:root {
  --ink: #303040;
  --muted: #5b6478;
  --line: #c8e0f0;
  --paper: #f7fbfd;
  --white: #ffffff;
  --teal: #28b8c0;
  --teal-dark: #307080;
  --navy: #303040;
  --green: #287a5d;
  --amber: #a87321;
  --red: #9b3e52;
}

* {
  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;
  line-height: 1.5;
}

a {
  color: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 14px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid rgba(48, 48, 64, 0.12);
  background: rgba(247, 251, 253, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  font-size: 14px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.nav a {
  text-decoration: none;
}

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

.subapps-menu {
  position: relative;
}

.subapps-menu summary {
  list-style: none;
  cursor: pointer;
}

.subapps-menu summary::-webkit-details-marker {
  display: none;
}

.subapps-menu summary::after {
  content: "▾";
  margin-left: 6px;
  font-size: 11px;
}

.subapps-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 232px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(48, 48, 64, 0.14);
}

.subapps-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
}

.subapps-dropdown a:hover {
  background: #eef7fb;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.language-switch button {
  width: auto;
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.language-switch button[aria-pressed="true"] {
  background: var(--teal);
  color: #101822;
}

.hero {
  min-height: calc(100vh - 132px);
  display: grid;
  align-items: end;
  padding: 90px clamp(20px, 6vw, 76px) 76px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(48, 48, 64, 0.98), rgba(48, 48, 64, 0.94) 50%, rgba(48, 48, 64, 0.72)),
    url("portfolio-hero.png") right center / cover no-repeat;
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #c8e0f0;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: 76px;
  line-height: 0.98;
}

h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
}

h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.18;
}

p {
  margin: 0;
}

.hero-copy {
  max-width: 650px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 22px;
}

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

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button.primary,
button {
  background: var(--teal);
  color: #101822;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.56);
  color: var(--white);
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--line);
}

.proof-strip div {
  min-height: 118px;
  padding: 24px;
  background: var(--white);
}

.proof-strip strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.proof-strip span {
  color: var(--muted);
}

.section {
  padding: 84px clamp(20px, 5vw, 64px);
}

.intro,
.showcase,
.formation,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}

.intro p,
.showcase-copy p,
.formation > div > p,
.contact > div > p {
  color: var(--muted);
  font-size: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 30px;
}

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

.service-grid article,
.training-list article,
.method-steps li,
.contact-form,
.contact-card,
.case-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.service-grid article {
  min-height: 252px;
  padding: 24px;
}

.service-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  margin-bottom: 22px;
  border-radius: 8px;
  background: #eef7fb;
  color: var(--teal-dark);
  font-weight: 900;
}

.service-grid p,
.training-list p,
.method-steps p,
.case-card p {
  margin-top: 12px;
  color: var(--muted);
}

.realizations {
  background: linear-gradient(180deg, var(--white), #eef7fb);
}

.realizations .section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.75fr);
  align-items: start;
}

.realizations .section-head > p {
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
}

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

.case-card {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 360px;
  padding: 24px;
}

.case-card h3 {
  font-size: 28px;
}

.case-date {
  margin-top: -6px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

.case-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.case-topline span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.case-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.case-actions a,
.detail-actions a {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.case-actions a:hover,
.detail-actions a:hover {
  border-color: var(--teal);
  background: #eef7fb;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.58fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: end;
  min-height: 520px;
  padding: 110px clamp(20px, 6vw, 76px) 72px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(48, 48, 64, 0.98), rgba(48, 48, 64, 0.9) 54%, rgba(48, 48, 64, 0.68)),
    url("portfolio-hero.png") right center / cover no-repeat;
}

.detail-hero h1 {
  font-size: 62px;
}

.detail-hero p {
  max-width: 720px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 21px;
}

.detail-panel {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.detail-panel dl {
  display: grid;
  gap: 16px;
  margin: 0;
}

.detail-panel dt {
  color: #c8e0f0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-panel dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.detail-actions a {
  min-height: 42px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
}

.detail-media {
  display: grid;
  gap: 24px;
  background: var(--white);
}

.detail-media figure {
  margin: 0;
}

.detail-media img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(48, 48, 64, 0.13);
}

.detail-media figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 72px);
}

.detail-copy {
  display: grid;
  gap: 22px;
}

.detail-copy p {
  color: var(--muted);
  font-size: 18px;
}

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

.detail-list li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.detail-list strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.detail-list span {
  color: var(--muted);
}

.case-card ul {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.case-card li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.case-card li::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.showcase {
  background: #eef7fb;
}

.delivery-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 24px 72px rgba(48, 48, 64, 0.13);
  overflow: hidden;
}

.board-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}

.board-head span {
  color: var(--teal-dark);
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.board-grid div {
  min-height: 112px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.board-grid div:last-child {
  border-right: 0;
}

.board-grid b {
  display: block;
  color: var(--teal-dark);
  font-size: 34px;
  line-height: 1;
}

.board-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.board-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px;
  list-style: none;
}

.board-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #dceaf2;
  border-radius: 8px;
}

.board-list span {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}

.formation {
  background: var(--white);
}

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

.training-list article {
  min-height: 160px;
  padding: 22px;
}

.method {
  background: var(--paper);
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.method-steps li {
  min-height: 214px;
  padding: 22px;
}

.method-steps span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 900;
}

.method-steps li:nth-child(2) span {
  background: var(--teal-dark);
}

.method-steps li:nth-child(3) span {
  background: var(--green);
}

.method-steps li:nth-child(4) span {
  background: var(--amber);
}

.contact-stack,
.contact-form,
.contact-card {
  display: grid;
  gap: 14px;
}

.contact-form,
.contact-card {
  padding: 24px;
}

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

.form-status {
  display: none;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 900;
}

.form-status.is-success {
  display: block;
  background: #e8f8f3;
  color: var(--green);
}

.form-status.is-error {
  display: block;
  background: #fff1f4;
  color: var(--red);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

.form-note {
  color: var(--muted);
  font-size: 14px;
}

.contact-card > div {
  display: grid;
  gap: 6px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.contact-card > div:last-child {
  border-bottom: 0;
}

.contact-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-card strong {
  overflow-wrap: anywhere;
  font-size: 28px;
  line-height: 1.16;
}

.contact-card strong a {
  color: inherit;
  text-decoration-color: var(--teal);
  text-underline-offset: 4px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1040px) {
  .service-grid,
  .method-steps,
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    min-height: 62px;
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    width: 100%;
    font-size: 14px;
  }

  .subapps-dropdown {
    left: 0;
    right: auto;
  }

  .hero {
    min-height: calc(100vh - 140px);
    padding: 74px 20px 44px;
    background-position: center;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 32px;
  }

  .hero-copy {
    font-size: 19px;
  }

  .section {
    padding: 54px 20px;
  }

  .intro,
  .showcase,
  .formation,
  .realizations .section-head,
  .detail-hero,
  .detail-layout,
  .contact,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    min-height: auto;
    padding: 74px 20px 44px;
  }

  .detail-hero h1 {
    font-size: 44px;
  }

  .service-grid,
  .training-list,
  .method-steps,
  .case-grid,
  .board-grid,
  .proof-strip {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  button,
  .detail-actions a {
    width: 100%;
  }

  .footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .proof-strip div {
    min-height: 96px;
  }

  .contact-card strong {
    font-size: 22px;
  }
}
