/* ==========================================================================
   ESA GmbH — Design tokens
   ========================================================================== */
:root {
  --ink: #1E2E2A;
  --ink-soft: #4B5D57;
  --bg: #F6F4EF;
  --white: #FFFFFF;

  --sage: #4F7B6C;
  --sage-dark: #2F4B41;
  --sage-light: #E3EAE4;

  --gold: #B5892E;
  --gold-dark: #8F6C22;

  --sand: #EFE6D3;
  --rose: #C97C74;

  --line: rgba(30, 46, 42, 0.14);
  --shadow: 0 12px 30px rgba(30, 46, 42, 0.08);

  --font-display: 'Lora', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1180px;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 28px;

  --transition: 200ms ease;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--sage-dark);
}
p { margin: 0 0 1em; max-width: 62ch; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--sage-dark);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { left: 0; }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--sage);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.section-lead {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
h3 { font-size: 1.2rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--sage-dark);
  color: var(--white);
}
.btn-primary:hover { background: var(--sage); }
.btn-ghost {
  background: transparent;
  color: var(--sage-dark);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--sage-dark); }
.btn-small { padding: 0.6rem 1.15rem; font-size: 0.9rem; }
.btn-full { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--sage-dark);
  flex-shrink: 0;
}
.brand-mark { color: var(--sage); display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.brand-text em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.main-nav ul {
  display: flex;
  gap: 2rem;
}
.main-nav a {
  font-weight: 500;
  font-size: 0.97rem;
  position: relative;
  padding: 0.3rem 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.header-phone {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--sage-dark);
}
.header-phone svg { color: var(--gold); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--sage-dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: 4rem 0 6rem;
  overflow: hidden;
}
.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 140px;
  color: var(--sage-light);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.hero-copy {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-in 700ms ease forwards 120ms;
}
.hero-visual {
  opacity: 0;
  transform: scale(0.96);
  animation: hero-in-visual 800ms ease forwards 280ms;
}
@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-in-visual {
  to { opacity: 1; transform: scale(1); }
}
.hero-lead { font-size: 1.12rem; color: var(--ink-soft); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.75rem 0 2.5rem;
}
.hero-stats {
  display: flex;
  gap: 2.25rem;
  margin: 0;
  flex-wrap: wrap;
}
.hero-stats dt {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--sage-dark);
}
.hero-stats dd {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.hero-illustration { width: 100%; height: auto; }

/* ==========================================================================
   About
   ========================================================================== */
.about { padding: 5rem 0; }
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3.5rem;
  align-items: center;
}
.about-illustration { width: 100%; max-width: 320px; margin: 0 auto; }
.about-points {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.about-points li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink-soft);
}
.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* ==========================================================================
   Services
   ========================================================================== */
.services { padding: 5rem 0; background: var(--white); }
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section-head .section-lead { margin: 0 auto; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.service-card {
  background: var(--white);
  padding: 2.25rem 1.75rem;
  transition: background var(--transition);
}
.service-card:hover { background: var(--sage-light); }
.service-icon {
  width: 40px;
  height: 40px;
  color: var(--sage);
  margin-bottom: 1.1rem;
}
.service-card h3 { margin-bottom: 0.5rem; }
.service-card p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }

/* ==========================================================================
   Why Us
   ========================================================================== */
.why-us { padding: 5rem 0; background: var(--sage-light); }
.why-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: start;
}
.why-copy .btn { margin-top: 0.5rem; }
.why-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem 2rem;
}
.why-item {
  border-top: 2px solid var(--sage-dark);
  padding-top: 0.9rem;
}
.why-item h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }
.why-item p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { padding: 5rem 0 6rem; background: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
}
.contact-details {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--ink-soft);
}
.contact-details svg { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.contact-details a:hover { color: var(--sage-dark); }

.contact-form {
  background: var(--sage-light);
  border-radius: var(--radius-l);
  padding: 2.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-field { margin-bottom: 1.25rem; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--sage-dark);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--white);
  color: var(--ink);
  transition: border-color var(--transition);
  resize: vertical;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--sage);
  outline: none;
}
.form-field.has-error input,
.form-field.has-error textarea { border-color: #B3453B; }
.field-error {
  display: block;
  min-height: 1.2em;
  font-size: 0.82rem;
  color: #B3453B;
  margin-top: 0.3rem;
}
.form-note {
  min-height: 1.4em;
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--sage-dark);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--sage-dark);
  color: var(--sand);
  padding-top: 4rem;
}
.site-footer h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-brand .brand-text strong { color: var(--white); font-size: 1.2rem; }
.footer-brand .brand-text em { color: var(--sand); opacity: 0.8; }
.footer-brand p { margin-top: 0.9rem; color: var(--sand); opacity: 0.85; font-size: 0.92rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a, .footer-col li { font-size: 0.92rem; color: var(--sand); opacity: 0.85; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }

.footer-bottom { padding: 1.5rem 0; }
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.85rem;
  opacity: 0.75;
}
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a:hover { text-decoration: underline; }

/* ==========================================================================
   Back to top
   ========================================================================== */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--sage-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 400;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--sage); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
  .about-grid, .why-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media { order: -1; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .why-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--bg);
    padding: 2rem 1.5rem;
    transform: translateX(100%);
    transition: transform 260ms ease;
    z-index: 400;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 0.25rem; }
  .main-nav a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }
  .header-phone { display: none; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .service-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .contact-form { padding: 1.5rem; }
}
