/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #2E4557;
  --primary: #5e8a93;
  --text: #e8e4e2;
  --text-muted: #a8b0a8;
  --accent: #486D89;
  --btn-text: #f5f5f5;
  --bg-light: rgba(255, 255, 255, 0.05);
  --radius: 8px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f2ef;
    --primary: #3d7a85;
    --text: #1e2d36;
    --text-muted: #5c6b72;
    --accent: #c5cdd2;
    --btn-text: #ffffff;
    --bg-light: rgba(0, 0, 0, 0.04);
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--btn-text);
  padding: 0.5rem 1rem;
  z-index: 200;
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

html, body {
  height: 100%;
  overflow: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
}

/* === Nav === */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  flex-shrink: 0;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.nav-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: var(--btn-text);
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-contact:hover {
  opacity: 0.85;
}

.btn-contact-mobile {
  display: none;
}

/* === Hero === */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  min-height: min-content;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.hero-content {
  margin-bottom: 3rem;
}

.hero-heading {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
}

/* === Cards === */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: background 0.2s;
}

.card:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: light) {
  .card:hover {
    background: rgba(0, 0, 0, 0.07);
  }
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--primary);
}

.card-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* === Footer === */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 2rem;
  width: 90%;
  max-width: 440px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: var(--bg-light);
  color: var(--text);
}

.modal-close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

#modal-title {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-light);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.btn-contact:focus-visible,
.btn-submit:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.btn-submit {
  width: 100%;
  background: var(--primary);
  color: var(--btn-text);
  border: none;
  padding: 0.6rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-submit:hover {
  opacity: 0.85;
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-status {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

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

.form-status.success {
  color: #7ac7a0;
}

/* === Mobile === */
@media (max-width: 768px) {
  .nav {
    padding: 0.75rem 1rem;
  }

  .nav-logo {
    height: 28px;
  }

  .hero {
    padding: 1.5rem 1rem;
  }

  .hero-heading {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-content {
    margin-bottom: 2rem;
  }

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

  .btn-contact-nav {
    display: none;
  }

  .btn-contact-mobile {
    display: inline-flex;
    margin-top: 2rem;
    align-self: center;
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
  }

  .footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 0.75rem 1rem;
  }
}

