:root {
  --ink: #0a1628;
  --ink-soft: #1a2d45;
  --paper: #f2f5f8;
  --paper-muted: #d8e0e8;
  --accent: #1f7a6c;
  --accent-bright: #2a9b8a;
  --text: #0a1628;
  --text-muted: #3d5166;
  --hero-text: #f2f5f8;
  --hero-muted: #b8c5d4;
  --rule: rgba(10, 22, 40, 0.12);
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* —— Nav —— */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  padding-top: 1.25rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  position: relative;
}

.brand img {
  display: block;
  width: clamp(1.85rem, 5vw, 2.25rem);
  height: clamp(1.85rem, 5vw, 2.25rem);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.45rem;
  border: 1px solid rgba(242, 245, 248, 0.25);
  border-radius: 0.4rem;
  background: rgba(10, 22, 40, 0.35);
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--hero-text);
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--hero-muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--hero-text);
}

.nav-lang {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-lang-sep {
  color: rgba(242, 245, 248, 0.35);
  font-family: var(--font-display);
  font-size: 0.85rem;
}

.nav-lang-link {
  opacity: 0.65;
}

.nav-lang-link.is-active {
  opacity: 1;
  color: var(--hero-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  color: var(--hero-text);
  overflow: hidden;
}

.hero-plane {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(42, 155, 138, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 50% at 15% 80%, rgba(26, 45, 69, 0.9), transparent 50%),
    linear-gradient(155deg, #061018 0%, #0a1628 42%, #123048 78%, #0d3d38 100%);
  z-index: 0;
}

.hero-plane::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 60V0h60' fill='none' stroke='rgba(242,245,248,0.04)' stroke-width='1'/%3E%3C/svg%3E");
  opacity: 0.9;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 52rem;
}

.hero-person {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0 0 0.75rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.25rem, 12vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: var(--hero-text);
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  line-height: 1.3;
  margin: 0 0 1rem;
  max-width: 28ch;
  color: var(--hero-text);
}

.hero-support {
  margin: 0;
  max-width: 38ch;
  font-size: 1.1rem;
  color: var(--hero-muted);
}

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  animation: rise 0.85s var(--ease) forwards;
}

.reveal:nth-child(1) { animation-delay: 0.05s; }
.reveal:nth-child(2) { animation-delay: 0.18s; }
.reveal:nth-child(3) { animation-delay: 0.32s; }
.reveal:nth-child(4) { animation-delay: 0.46s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Sections —— */
.section {
  padding: 5rem 0;
  border-top: 1px solid var(--rule);
}

.section-inner {
  max-width: 52rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--ink);
}

.section-lead {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  max-width: 42ch;
}

.section-body {
  margin: 0;
  color: var(--text-muted);
  max-width: 48ch;
}

.about {
  background:
    linear-gradient(180deg, #eef3f7 0%, var(--paper) 100%);
}

.services {
  background:
    linear-gradient(180deg, #dce8e5 0%, #e8f0ee 45%, #eef3f2 100%);
  border-top: none;
  padding: 6.5rem 0;
  position: relative;
}

.services::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-bright) 55%, transparent 100%);
}

.services .section-title {
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.services .section-lead {
  font-size: clamp(1.2rem, 2.4vw, 1.35rem);
  max-width: 36ch;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.services-list {
  display: grid;
  gap: 2.25rem 3.5rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .services-list {
    grid-template-columns: 1fr 1fr;
  }
}

.service-item {
  padding: 0 0 0 1rem;
  border: none;
  border-left: 2px solid var(--accent);
  background: transparent;
  transition: transform 0.3s var(--ease), border-color 0.25s var(--ease);
}

.service-item:hover {
  transform: translateX(4px);
  border-left-color: var(--accent-bright);
}

.service-item h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(31, 122, 108, 0.35);
  display: inline-block;
}

.service-item p {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.stack {
  background:
    linear-gradient(165deg, #0a1628 0%, #123048 55%, #0d3d38 100%);
  color: var(--hero-text);
  border-top: none;
}

.stack .section-title,
.stack .section-lead {
  color: var(--hero-text);
}

.stack .section-lead {
  color: var(--hero-muted);
  font-weight: 400;
}

.stack-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stack-list li {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(242, 245, 248, 0.15);
  letter-spacing: 0.01em;
  transition: padding-left 0.3s var(--ease), color 0.25s var(--ease);
}

.stack-list li:hover {
  padding-left: 0.5rem;
  color: var(--accent-bright);
}

.closing {
  background: #e8eef3;
}

/* —— Contact —— */
.contact {
  background: #e8eef3;
}

.contact-closing {
  margin-bottom: 2rem;
}

.contact-status {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  max-width: 36rem;
  margin: 0 0 1.75rem;
  padding: 1.15rem 1.25rem;
  border-radius: 0.45rem;
  border: 1px solid transparent;
  outline: none;
}

.contact-status--enter {
  animation: contact-status-in 0.45s var(--ease) both;
}

.contact-status--success {
  background: rgba(31, 122, 108, 0.14);
  border-color: rgba(31, 122, 108, 0.45);
  color: var(--ink);
}

.contact-status--error {
  background: rgba(163, 58, 58, 0.12);
  border-color: rgba(163, 58, 58, 0.4);
  color: #5c1f1f;
}

.contact-status-mark {
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  position: relative;
}

.contact-status--success .contact-status-mark::before {
  content: "";
  position: absolute;
  left: 0.38rem;
  top: 0.18rem;
  width: 0.45rem;
  height: 0.85rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(40deg);
}

.contact-status--error .contact-status-mark::before,
.contact-status--error .contact-status-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.9rem;
  height: 2px;
  background: currentColor;
  transform-origin: center;
}

.contact-status--error .contact-status-mark::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.contact-status--error .contact-status-mark::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.contact-status-copy {
  min-width: 0;
  flex: 1;
}

.contact-status-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.contact-status-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
}

.contact-status-actions {
  margin: 1rem 0 0;
}

.contact-status-again {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(10, 22, 40, 0.28);
  border-radius: 0.35rem;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.contact-status-again:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--ink);
}

.contact-status-again:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-form.is-hidden {
  display: none;
}

@keyframes contact-status-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-status--enter {
    animation: none;
  }
}

.contact-form {
  max-width: 36rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(10, 22, 40, 0.18);
  border-radius: 0.35rem;
  padding: 0.75rem 0.9rem;
  line-height: 1.4;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 122, 108, 0.18);
}

.contact-field textarea {
  resize: vertical;
  min-height: 9rem;
}

.contact-turnstile {
  margin-top: 0.25rem;
}

.contact-actions {
  margin-top: 0.35rem;
}

.contact-submit {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--hero-text);
  background: var(--ink);
  border: none;
  border-radius: 0.35rem;
  padding: 0.9rem 1.4rem;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.contact-submit:hover {
  background: var(--ink-soft);
  transform: translateY(-2px);
}

.contact-submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .contact-submit {
    transition: none;
  }

  .contact-submit:hover {
    transform: none;
  }
}

/* —— Footer —— */
.site-footer {
  background: var(--ink);
  color: var(--hero-muted);
  padding: 2.5rem 0;
}

.footer-inner {
  max-width: 52rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--hero-text);
  margin: 0 0 0.35rem;
}

.footer-note {
  margin: 0;
  font-size: 0.95rem;
}

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

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(242, 245, 248, 0.12);
    background: rgba(6, 16, 24, 0.92);
    border-radius: 0.5rem;
  }

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

  .nav-links li {
    border-bottom: 1px solid rgba(242, 245, 248, 0.08);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 1rem;
  }

  .hero {
    min-height: auto;
    min-height: unset;
    padding: 6.5rem 0 3.5rem;
  }

  @supports (height: 100dvh) {
    .hero {
      min-height: min(100dvh, 40rem);
    }
  }

  @media (orientation: landscape) and (max-height: 500px) {
    .hero {
      min-height: auto;
      padding: 5rem 0 2.5rem;
    }
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .service-item,
  .stack-list li,
  .nav-links a,
  .nav-toggle-bar {
    transition: none;
  }
}

/* —— Error pages —— */
.error-page {
  position: relative;
  min-height: min(100dvh, 40rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(165deg, #0a1628 0%, #123048 55%, #0d3d38 100%);
  color: var(--hero-text);
  padding-top: 4.5rem;
}

.error-plane {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 60V0h60' fill='none' stroke='rgba(242,245,248,0.04)' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}

.error-content {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.error-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  color: var(--hero-text);
}

.error-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0 0 0.75rem;
}

.error-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.2;
  margin: 0 0 0.85rem;
  color: var(--hero-text);
}

.error-message {
  margin: 0 0 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--hero-muted);
  max-width: 32rem;
}

.error-actions {
  margin: 0;
}

.error-home {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  text-decoration: none;
  padding: 0.85rem 1.35rem;
  border-radius: 0.35rem;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.error-home:hover {
  background: #fff;
  color: var(--ink);
  transform: translateY(-2px);
}

.error-home:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .error-home {
    transition: none;
  }

  .error-home:hover {
    transform: none;
  }
}
