:root {
  --ink: #17202a;
  --ink-soft: #51606b;
  --paper: #f2fbf8;
  --paper-soft: #e9f7ef;
  --paper-blue: #e8f6ff;
  --paper-peach: #fff1ea;
  --paper-lemon: #fff8d8;
  --line: #bddedb;
  --cyan: #008aa0;
  --coral: #df563f;
  --green: #158260;
  --amber: #bd8615;
  --radius: 8px;
  --shadow: 0 14px 36px rgba(23, 32, 42, 0.12);
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, #dff5ef 0%, #e9f6ff 38%, #fff3e5 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 42px;
  border-bottom: 1px solid rgba(0, 138, 160, 0.26);
  color: var(--ink);
  background: rgba(220, 245, 239, 0.92);
  backdrop-filter: blur(16px);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  font-weight: 850;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  width: 184px;
  height: auto;
  max-height: 52px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.94rem;
  font-weight: 750;
}

.site-nav a {
  color: var(--ink-soft);
  transition: color 180ms ease;
}

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

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--paper-lemon);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 410px;
  padding: 62px 42px 46px;
  overflow: hidden;
  color: var(--ink);
  border-bottom: 1px solid rgba(0, 138, 160, 0.18);
  background-image: url("/assets/hero-digital-agency.png");
  background-position: center;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(224, 247, 238, 0.94) 0%, rgba(232, 246, 255, 0.82) 45%, rgba(255, 229, 211, 0.32) 100%),
    linear-gradient(0deg, rgba(255, 246, 211, 0.55), rgba(222, 247, 245, 0.14));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
}

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

.hero h1 {
  margin: 0;
  font-size: 4.8rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy {
  width: min(620px, 100%);
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 1.16rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  white-space: normal;
  text-align: center;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(23, 32, 42, 0.12);
}

.button.primary {
  color: #ffffff;
  background: var(--coral);
}

.button.secondary {
  color: var(--ink);
  background: var(--paper-lemon);
  border-color: var(--line);
}

.button.quiet {
  color: var(--ink);
  background: #dff4f1;
  border-color: var(--line);
}

.button.danger {
  color: #a83222;
}

.button.full {
  width: 100%;
}

.section {
  padding: 32px 0;
  background: rgba(242, 251, 248, 0.72);
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.section-heading {
  display: grid;
  gap: 6px;
  width: min(760px, 100%);
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  margin: 0;
  color: var(--ink-soft);
}

.service-grid,
.reference-grid {
  display: grid;
  gap: 12px;
}

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

.service-card,
.reference-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-blue);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.service-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 16px;
  align-items: center;
  min-height: 150px;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0 58%, rgba(255, 255, 255, 0.36) 58% 100%);
  pointer-events: none;
}

.service-card:nth-child(2n) {
  border-top: 4px solid var(--cyan);
  background: #e3f7ff;
  --service-accent: var(--cyan);
}

.service-card:nth-child(2n + 1) {
  border-top: 4px solid var(--green);
  background: #e8f8ed;
  --service-accent: var(--green);
}

.service-card:nth-child(3n) {
  border-top-color: var(--amber);
  background: var(--paper-lemon);
  --service-accent: var(--amber);
}

.service-card:nth-child(4n) {
  background: var(--paper-peach);
  --service-accent: var(--coral);
}

.service-index {
  position: relative;
  z-index: 1;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--coral);
  background: rgba(255, 255, 255, 0.52);
  font-size: 0.9rem;
  font-weight: 900;
}

.service-card h3,
.reference-card h3,
.info-panel h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.service-copy {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.service-card p,
.reference-card span,
.info-panel p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.service-card p {
  max-width: 760px;
}

.service-visual {
  position: relative;
  z-index: 1;
  justify-self: end;
  display: block;
  width: min(390px, 100%);
  height: 118px;
  object-fit: cover;
  border: 1px solid rgba(0, 138, 160, 0.2);
  border-radius: var(--radius);
  box-shadow: 0 16px 28px rgba(23, 32, 42, 0.1);
  filter: saturate(0.98) contrast(1.02);
}

.service-card:hover {
  border-color: rgba(0, 138, 160, 0.38);
  box-shadow: 0 18px 34px rgba(23, 32, 42, 0.1);
}

.references-section {
  background: linear-gradient(135deg, rgba(255, 248, 216, 0.72), rgba(232, 246, 255, 0.72));
}

.compact-panels {
  padding-top: 30px;
  background: linear-gradient(135deg, #e3f7ff 0%, #ecf8e8 48%, #fff0e7 100%);
}

.compact-grid {
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  gap: 30px;
  align-items: start;
}

.accordion-stack {
  display: grid;
  gap: 12px;
}

.info-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(236, 250, 246, 0.94);
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.06);
  overflow: hidden;
}

.info-panel:nth-child(2n) {
  background: rgba(232, 246, 255, 0.96);
}

.info-panel:nth-child(3n) {
  background: rgba(255, 248, 216, 0.96);
}

.info-panel:nth-child(4n) {
  background: rgba(255, 241, 234, 0.96);
}

.info-panel summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 68px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.info-panel summary::-webkit-details-marker {
  display: none;
}

.info-panel summary::after {
  content: "+";
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--cyan);
  font-weight: 900;
}

.info-panel[open] summary::after {
  content: "-";
  background: var(--coral);
}

.info-panel summary span {
  font-size: 1.08rem;
  font-weight: 900;
}

.info-panel summary small {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
}

.panel-content {
  padding: 0 20px 22px;
}

.identity-grid,
.legal-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.value-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.value-list li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.5);
  font-weight: 750;
}

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

.reference-card {
  min-height: 132px;
  background: rgba(255, 255, 255, 0.42);
}

.reference-card p {
  margin: 0 0 10px;
  color: var(--cyan);
  font-weight: 900;
}

.company-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.company-list div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.company-list dt {
  color: var(--ink-soft);
  font-weight: 850;
}

.company-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.modal-open {
  overflow: hidden;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(23, 32, 42, 0.36);
  backdrop-filter: blur(10px);
}

.modal-layer[hidden],
.modal-panel[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  width: min(1040px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ecfaf6 0%, #e8f6ff 52%, #fff1ea 100%);
  box-shadow: 0 28px 80px rgba(23, 32, 42, 0.28);
}

.modal-content {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 36px);
}

.modal-content h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.modal-close {
  position: sticky;
  top: 14px;
  z-index: 2;
  float: right;
  display: grid;
  width: 42px;
  height: 42px;
  margin: 14px 14px 0 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--coral);
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 850;
}

input,
textarea,
select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #ccd8dd;
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(0, 155, 184, 0.18);
  border-color: var(--cyan);
}

.check-row {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  font-weight: 650;
}

.check-row input {
  min-height: auto;
  margin-top: 4px;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--green);
  font-weight: 850;
}

.form-status.error {
  color: #a83222;
}

.legal-copy {
  display: grid;
  gap: 10px;
}

.legal-copy p {
  margin: 0;
}

.site-footer {
  padding: 24px 0;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  background: #dff4ef;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.footer-grid p {
  margin: 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: flex-end;
}

.footer-nav a {
  color: var(--cyan);
  font-weight: 850;
}

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

.admin-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #e3f7ff, #e8f8ed, #fff1ea);
}

.admin-shell {
  min-height: 100vh;
}

.admin-login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.admin-card,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(250, 255, 253, 0.9);
  box-shadow: var(--shadow);
}

.admin-card {
  width: min(430px, 100%);
  padding: 28px;
}

.admin-brand {
  margin-bottom: 24px;
}

.admin-brand .brand-logo {
  width: 210px;
}

.admin-card h1,
.admin-panel h1,
.admin-panel h2 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0;
}

.admin-card form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.hidden {
  display: none !important;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 42px;
  border-bottom: 1px solid var(--line);
  background: rgba(220, 245, 239, 0.94);
}

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

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.42fr);
  gap: 22px;
  width: min(1380px, calc(100% - 36px));
  margin: 22px auto;
  align-items: start;
}

.admin-panel {
  padding: 28px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.panel-heading.compact {
  margin-top: 4px;
  margin-bottom: 16px;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.subpanel {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.reference-editor {
  display: grid;
  gap: 14px;
}

.reference-edit {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(232, 246, 255, 0.72);
}

.reference-edit .danger {
  justify-self: end;
}

.messages-panel {
  position: sticky;
  top: 90px;
}

.message-list {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding-right: 4px;
}

.message-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 248, 216, 0.72);
}

.message-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.message-item h3,
.message-item p {
  margin: 0 0 8px;
}

.message-item small {
  color: var(--ink-soft);
  font-weight: 700;
}

.empty-state {
  margin: 0;
  color: var(--ink-soft);
}

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

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-content,
  .section-heading,
  .service-card,
  .reference-card,
  .site-footer {
    opacity: 0;
    transform: translateY(22px);
    transition:
      opacity 720ms var(--ease),
      transform 720ms var(--ease),
      border-color 220ms ease,
      box-shadow 220ms ease;
    transition-delay: var(--reveal-delay, 0ms);
  }

  .hero-content.is-visible,
  .section-heading.is-visible,
  .service-card.is-visible,
  .reference-card.is-visible,
  .site-footer.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .service-card.is-visible:hover,
  .reference-card.is-visible:hover {
    transform: translateY(-4px);
  }

  .service-visual {
    transition: transform 700ms var(--ease), filter 700ms var(--ease);
  }

  .service-card:hover .service-visual {
    transform: scale(1.035);
    filter: saturate(1.1) contrast(1.04);
  }

  .modal-layer:not([hidden]) {
    animation: layerIn 180ms ease both;
  }

  .modal-panel:not([hidden]) {
    animation: modalIn 420ms var(--ease) both;
  }
}

@media (max-width: 1120px) {
  .compact-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .messages-panel {
    position: static;
  }

  .message-list {
    max-height: none;
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 64px;
    padding: 10px 18px;
  }

  .brand-logo {
    width: 156px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    padding: 10px 18px 16px;
    border-top: 1px solid var(--line);
    background: #dff4ef;
  }

  .site-nav.open {
    display: grid;
  }

  .hero {
    min-height: 324px;
    padding: 30px 20px 28px;
    background-position: 62% center;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(224, 247, 238, 0.97), rgba(232, 246, 255, 0.84)),
      linear-gradient(0deg, rgba(255, 246, 211, 0.68), rgba(255, 226, 211, 0.25));
  }

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

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

  .container {
    width: min(100% - 28px, 1160px);
  }

  .section {
    padding: 28px 0;
  }

  .section-heading h2 {
    font-size: 1.58rem;
  }

  .reference-grid,
  .identity-grid,
  .legal-grid,
  .contact-grid,
  .value-list,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 0;
    padding: 13px;
    gap: 10px;
  }

  .service-card h3 {
    font-size: 0.92rem;
  }

  .service-copy {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .service-card p {
    font-size: 0.82rem;
  }

  .service-visual {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: auto;
    height: 124px;
  }

  .modal-layer {
    align-items: end;
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
  }

  .info-panel summary {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 16px;
  }

  .info-panel summary small {
    grid-column: 1 / -1;
    text-align: left;
  }

  .panel-content {
    padding: 0 16px 18px;
  }

  .company-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .footer-grid,
  .admin-topbar,
  .panel-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    padding: 14px 18px;
  }

  .admin-panel {
    padding: 20px;
  }

  .admin-actions {
    width: 100%;
  }

  .admin-actions .button {
    flex: 1;
  }

  .footer-nav {
    justify-content: flex-start;
  }
}
