:root {
  color-scheme: light dark;
  --bg: #f3f6fb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #dce5f1;
  --accent: #0f766e;
  --accent-contrast: #effcf9;
  --ring: rgba(15, 118, 110, 0.22);
  --shadow: 0 30px 80px -50px rgba(15, 23, 42, 0.38);
  --radius-xl: 1.25rem;
  --radius-lg: 0.95rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #020617;
    --surface: rgba(15, 23, 42, 0.86);
    --surface-strong: #0f172a;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --line: #1e293b;
    --accent: #14b8a6;
    --accent-contrast: #042f2e;
    --ring: rgba(20, 184, 166, 0.28);
    --shadow: 0 35px 90px -60px rgba(2, 6, 23, 0.7);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 6rem;
}

body {
  background:
    radial-gradient(1300px 500px at 85% -10%, rgba(15, 118, 110, 0.09), transparent 65%),
    radial-gradient(900px 360px at -10% -5%, rgba(30, 64, 175, 0.07), transparent 68%),
    var(--bg);
  color: var(--text);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

main {
  display: block;
}

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

.container {
  width: min(1120px, calc(100% - 1.25rem));
  margin-inline: auto;
}

.slim {
  width: min(760px, calc(100% - 1.25rem));
}

.section {
  padding: 3.5rem 0;
}

.kicker {
  margin: 0;
  font-size: 0.77rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head.between {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.25rem;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  margin-top: 0.9rem;
  font-size: clamp(1.35rem, 4.6vw, 2.15rem);
}

h3 {
  font-size: 1.06rem;
}

.section-note {
  margin-top: 0.8rem;
  color: var(--muted);
}

.legal-page .legal-content h2 {
  margin-top: 1.6rem;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
}

.legal-page .legal-content p {
  margin-top: 0.6rem;
  color: var(--muted);
}

.legal-page .legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid color-mix(in oklab, var(--line), transparent 35%);
  backdrop-filter: blur(13px);
  background: color-mix(in oklab, var(--bg), transparent 20%);
}

.nav-wrap {
  min-height: 4.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}

.brand-logo {
  display: block;
  height: 2rem;
  width: auto;
  max-width: min(46vw, 14rem);
}

@media (prefers-color-scheme: dark) {
  .brand-logo,
  .hero-brand-logo,
  .footer-logo {
    filter: brightness(0) invert(1);
  }
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface), white 12%);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.brand-text {
  font-size: 0.96rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.94rem;
  transition: color 180ms ease;
}

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

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.48rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.93rem;
  border: 1px solid transparent;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
  padding: 0.86rem 1.25rem;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 16px 28px -20px color-mix(in oklab, var(--accent), transparent 44%);
}

.btn-primary:hover {
  background: color-mix(in oklab, var(--accent), black 8%);
}

.btn-secondary {
  border-color: var(--line);
  background: color-mix(in oklab, var(--surface), white 10%);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: color-mix(in oklab, var(--line), var(--accent) 30%);
}

.btn-sm {
  padding: 0.62rem 1rem;
  font-size: 0.88rem;
}

.hero {
  padding-top: 4.4rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}

.hero-title {
  margin-top: 0.9rem;
  font-size: clamp(1.85rem, 8vw, 3.35rem);
  max-width: 19ch;
  text-wrap: balance;
}

.hero-brand-logo {
  display: block;
  height: clamp(2.2rem, 7vw, 3.2rem);
  width: auto;
}

.hero-subtitle {
  margin-top: 1.25rem;
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(0.98rem, 2.8vw, 1.08rem);
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-rotator {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(150deg, color-mix(in oklab, var(--surface), white 8%), var(--surface-strong));
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.code-header {
  margin-bottom: 0.95rem;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  font-family: "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;
}

.phrase-stack {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 2.65rem;
}

.phrase {
  position: absolute;
  inset: 0;
  font-size: 0.98rem;
  font-weight: 520;
  font-family: "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;
  color: color-mix(in oklab, var(--text), var(--accent) 17%);
  opacity: 0;
  transition: opacity 680ms ease;
  display: flex;
  align-items: center;
}

.phrase.is-active {
  opacity: 1;
}

.card-grid {
  display: grid;
  gap: 1rem;
}

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

.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.15rem;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

.panel:hover,
.project-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--line), var(--accent) 34%);
  box-shadow: 0 26px 55px -34px rgba(15, 23, 42, 0.48);
}

.panel p,
.project-card p {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.process-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  display: flex;
  gap: 0.95rem;
}

.process-list span {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in oklab, var(--accent), transparent 86%);
}

.process-list p {
  margin-top: 0.35rem;
  color: var(--muted);
}

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

.client-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 0;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  text-align: left;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.client-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--line), var(--accent) 34%);
  box-shadow: 0 28px 58px -34px rgba(15, 23, 42, 0.52);
}

.client-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.client-caption {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 18px rgba(2, 6, 23, 0.92);
}

.project-lightbox[hidden] {
  display: none !important;
}

.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.88);
  padding: 1rem;
}

.project-lightbox-panel {
  width: min(1320px, 100%);
  max-height: 94vh;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid color-mix(in oklab, var(--line), transparent 10%);
  padding: 0.85rem;
  position: relative;
}

.project-lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(94vh - 5rem);
  object-fit: contain;
  border-radius: 0.7rem;
}

.project-lightbox-title {
  margin: 0.7rem 0 0.15rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 620;
}

.project-lightbox-close {
  border: 1px solid color-mix(in oklab, var(--line), transparent 10%);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  font-size: 1.42rem;
  line-height: 1;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 1rem;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.55rem 1rem;
  background: var(--surface);
  transition: border-color 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 220ms ease, color 220ms ease;
}

.faq-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 260ms ease, opacity 220ms ease, transform 220ms ease;
}

.faq-list p {
  margin-top: 0.4rem;
  padding-bottom: 0.55rem;
  color: var(--muted);
}

.faq-list details[open] {
  border-color: color-mix(in oklab, var(--line), var(--accent) 30%);
  box-shadow: 0 20px 40px -34px rgba(15, 23, 42, 0.5);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-list details[open] .faq-content {
  max-height: 220px;
  opacity: 1;
  transform: translateY(0);
}

.final-cta {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, color-mix(in oklab, var(--surface), white 7%), var(--surface-strong));
  box-shadow: var(--shadow);
  padding: 2rem;
}

.final-cta p {
  margin-top: 0.95rem;
  color: var(--muted);
  max-width: 66ch;
}

.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.field-row {
  margin-bottom: 0.95rem;
}

.field-row label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.field-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: color-mix(in oklab, var(--surface), white 6%);
  color: var(--text);
  padding: 0.78rem 0.85rem;
  font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
  border-radius: 0.35rem;
  accent-color: var(--accent);
  box-shadow: none;
  flex-shrink: 0;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--accent), var(--line) 50%);
  box-shadow: 0 0 0 4px var(--ring);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 1rem;
}

select:hover {
  border-color: color-mix(in oklab, var(--line), var(--accent) 26%);
}

.form-actions {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
}

.form-actions p {
  color: var(--muted);
  font-size: 0.9rem;
}

.field-note {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.field-note.is-valid {
  color: var(--accent);
}

.field-counter {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.quotation-page h1 {
  margin-top: 0.9rem;
  font-size: clamp(1.7rem, 4.4vw, 2.8rem);
}

.quotation-page p {
  margin-top: 0.95rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid color-mix(in oklab, var(--line), transparent 35%);
  margin-top: 2.4rem;
}

.footer-wrap {
  min-height: 7rem;
  padding: 1.3rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  font-size: 0.96rem;
  font-weight: 700;
}

.footer-logo {
  display: block;
  height: 1.85rem;
  width: auto;
}

.footer-copy {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.flash-wrap {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
  display: grid;
  gap: 0.6rem;
  width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.flash {
  margin: 0;
  border-radius: 0.8rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--line);
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
  pointer-events: auto;
}

.flash p {
  margin: 0;
}

.flash-message {
  display: flex;
  align-items: start;
  gap: 0.6rem;
}

.flash-kind-icon {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.08rem;
  flex-shrink: 0;
}

.flash-close {
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface), white 8%);
  color: var(--muted);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.flash-close-icon {
  width: 1rem;
  height: 1rem;
}

.flash-close:hover {
  color: var(--text);
  border-color: color-mix(in oklab, var(--line), var(--accent) 28%);
}

.flash-notice {
  background: var(--surface-strong);
  border-color: color-mix(in oklab, var(--accent), var(--line) 35%);
  box-shadow: 0 14px 30px -18px color-mix(in oklab, var(--accent), transparent 50%);
}

.flash-alert {
  background: var(--surface-strong);
  border-color: color-mix(in oklab, #dc2626, var(--line) 35%);
  box-shadow: 0 14px 30px -18px color-mix(in oklab, #dc2626, transparent 55%);
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.quotation-form .evaluation-step {
  display: none;
}

.quotation-form .evaluation-step.is-active {
  display: block;
}

.quotation-form h2 {
  font-size: 1.35rem;
  margin-bottom: 0.9rem;
}

.step-actions {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.check-grid {
  display: grid;
  gap: 0.8rem;
}

.check-grid label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--text);
  line-height: 1.35;
}

.form-errors {
  border: 1px solid color-mix(in oklab, #dc2626, var(--line) 35%);
  background: color-mix(in oklab, #dc2626, transparent 90%);
  border-radius: 0.8rem;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.9rem;
}

.form-errors ul {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
}

.form-errors li {
  margin: 0.2rem 0;
  color: color-mix(in oklab, var(--text), #dc2626 35%);
}

.field-error {
  margin-top: 0.35rem;
  font-size: 0.86rem;
  color: #ef4444;
}

.input-invalid {
  border-color: color-mix(in oklab, #dc2626, var(--line) 45%) !important;
  box-shadow: 0 0 0 3px color-mix(in oklab, #dc2626, transparent 85%) !important;
}

.step-errors {
  margin-bottom: 0.8rem;
}

.step-errors p {
  font-size: 0.92rem;
}

.code-block {
  margin-top: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: color-mix(in oklab, var(--surface), var(--bg) 22%);
  color: var(--muted);
  padding: 0.8rem;
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-x: auto;
}

.admin-main {
  padding-top: 2.4rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 680px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  font-size: 0.9rem;
  padding: 0.78rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.admin-table thead th {
  color: var(--muted);
  font-weight: 600;
}

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

.compact-gap {
  gap: 0.8rem;
}

@media (max-width: 1024px) {
  .four-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 760px) {
  .container,
  .slim {
    width: min(1120px, calc(100% - 2rem));
  }

  .section {
    padding: 4.6rem 0;
  }
}

@media (min-width: 1025px) {
  .container {
    width: min(1120px, calc(100% - 2.5rem));
  }

  .slim {
    width: min(760px, calc(100% - 2.5rem));
  }

  .section {
    padding: 5.2rem 0;
  }

  .hero {
    padding-top: 5.6rem;
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

@media (max-width: 760px) {
  .section {
    padding: 4.3rem 0;
  }

  .container,
  .slim {
    width: min(1120px, calc(100% - 1.5rem));
  }

  .nav-links {
    display: none;
  }

  .field-row.two-col,
  .two-col,
  .three-col,
  .four-col {
    grid-template-columns: 1fr;
  }

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

  .section-head.between,
  .footer-wrap {
    flex-direction: column;
    align-items: start;
  }

  .hero {
    padding-top: 4rem;
  }

  .brand-logo {
    height: 1.72rem;
    max-width: min(58vw, 12.5rem);
  }

  .footer-logo {
    height: 1.6rem;
  }

  .flash-wrap {
    top: auto;
    right: 0.75rem;
    left: 0.75rem;
    bottom: 0.75rem;
    width: auto;
  }
}
