/* ========================================
   EDIAL SUSTEEMID OÜ — style.css
   ======================================== */

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

:root {
  --accent:      #2563EB;
  --accent-dark: #1d4ed8;
  --text:        #1e293b;
  --text-light:  #64748b;
  --bg:          #ffffff;
  --bg-alt:      #f8fafc;
  --border:      #e2e8f0;
  --radius:      8px;
  --shadow:      0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  --max-w:       1100px;
  --font:        system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --section-pad: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========================================
   LAYOUT
   ======================================== */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--section-pad) 0;
}

.section-alt {
  background: var(--bg-alt);
}

/* ========================================
   HEADER & NAV
   ======================================== */

header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
}

.logo span { color: var(--accent); }

nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
}

nav a {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 7px 14px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}

nav a:hover,
nav a.active {
  color: var(--accent);
  background: rgba(37,99,235,0.07);
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  border-radius: var(--radius);
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================================
   FOOTER
   ======================================== */

footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 48px 0 28px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}

.footer-brand .logo {
  color: #f1f5f9;
  display: inline-block;
  margin-bottom: 10px;
}

.footer-brand .logo span { color: #60a5fa; }

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 300px;
}

.footer-contact { font-size: 0.85rem; }

.footer-contact h4 {
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-contact p { margin-bottom: 6px; line-height: 1.55; }
.footer-contact a { color: #60a5fa; }

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #334155;
  font-size: 0.78rem;
  text-align: center;
  color: #475569;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  text-decoration: none;
  border: none;
  font-family: var(--font);
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

.btn-primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.btn-full { width: 100%; text-align: center; }

/* ========================================
   HERO
   ======================================== */

.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #1d4ed8 100%);
  color: #fff;
  padding: 88px 0 80px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 18px;
  background: rgba(147,197,253,0.1);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(147,197,253,0.2);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.hero h1 span { color: #93c5fd; }

.hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #cbd5e1;
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-section {
  text-align: center;
}

.about-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.about-section .section-lead {
  color: var(--text-light);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
  font-weight: 600;
}

.about-section p {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 720px;
  margin: 0 auto 12px;
  line-height: 1.7;
}

.about-section p:last-child { margin-bottom: 0; }

/* ========================================
   ADVANTAGES
   ======================================== */

.advantages h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 36px;
  letter-spacing: -0.02em;
  text-align: center;
}

.adv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.adv-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}

.adv-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent);
}

.adv-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ========================================
   CTA SECTION
   ======================================== */

.cta-section {
  text-align: center;
}

.cta-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.cta-section p {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 28px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   PAGE HERO (inner pages)
   ======================================== */

.page-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #fff;
  padding: 52px 0 48px;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.page-hero p {
  color: #94a3b8;
  font-size: 1rem;
  max-width: 480px;
}

/* ========================================
   SERVICES
   ======================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.service-card:hover {
  box-shadow: 0 4px 20px rgba(37,99,235,0.1);
  transform: translateY(-2px);
}

.service-number {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(37,99,235,0.07);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 6px;
}

.service-card p:last-child { margin-bottom: 0; }

/* ========================================
   CONTACT PAGE
   ======================================== */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
}

.contact-info h2,
.contact-form h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.contact-detail {
  margin-bottom: 18px;
}

.contact-detail strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 3px;
  font-weight: 700;
}

.contact-detail span { font-size: 0.95rem; color: var(--text); }
.contact-detail a { font-size: 0.95rem; color: var(--accent); }

.map-container {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: none;
}

/* Contact Form */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: 0.01em;
}

.req { color: #e53e3e; }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #a0aec0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
  .adv-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root { --section-pad: 48px; }

  .burger { display: flex; }

  nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 99;
  }

  nav.open { display: block; }

  nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 16px;
  }

  nav a {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .hero { padding: 64px 0 56px; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

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

@media (max-width: 540px) {
  .container { padding: 0 16px; }

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

  .hero h1 { letter-spacing: -0.02em; }
}
