/* ==========================================================================
   Stratovia — header, navigation, forms, footer
   ========================================================================== */

/* Header ------------------------------------------------------------------ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: 100%;
}

/* The wordmark is 10.7:1 and set in an ultra-black weight, so it carries far
   more optical weight per pixel of height than a normal logo. Height is kept
   low deliberately: 13px tall is still ~139px wide, which is the right size
   next to 15px nav links. Intrinsic width/height on the <img> reserves the
   box before the file loads. */
.brand { display: inline-flex; align-items: center; flex: none; }

.brand img {
  display: block;
  width: auto;
  height: 11px;
  max-width: 100%;
}

@media (min-width: 400px) { .brand img { height: 12px; } }
@media (min-width: 900px) { .brand img { height: 13px; } }

.brand--footer img { height: 13px; }
@media (min-width: 900px) { .brand--footer img { height: 14px; } }

.nav { display: flex; align-items: center; gap: 0.25rem; margin-right: auto; }

.nav__link {
  padding: 0.4rem 0.7rem;
  border-radius: var(--r-sm);
  font-size: var(--sm);
  color: var(--text);
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.nav__link:hover { color: var(--ink); background: var(--bg-tint); }
.nav__link[aria-current="page"] { color: var(--accent); font-weight: 500; }

.header__actions { display: flex; align-items: center; gap: 0.75rem; }

.nav-toggle {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.nav-toggle__bars { display: grid; gap: 4px; width: 15px; }

.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.15s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Mobile menu sheet ------------------------------------------------------- */
.menu {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 99;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 0.5rem var(--gutter) 1.25rem;
  display: none;
}

.menu.is-open { display: block; }

.menu__link {
  display: block;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
}

.menu__foot { margin-top: 1rem; display: grid; gap: 0.6rem; }

@media (max-width: 900px) {
  .nav,
  .header__actions { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* Forms ------------------------------------------------------------------- */
.form { display: grid; gap: 1.15rem; max-width: 34rem; }

.field { display: grid; gap: 0.35rem; }

.field__label { font-size: var(--sm); font-weight: 500; color: var(--ink); }
.field__label .req { color: var(--accent); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink);
  font-size: var(--sm);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: #94a3b4; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 91, 216, 0.14);
}

.field select {
  appearance: none;
  background-image: url("/assets/img/chevron.svg");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 11px;
  padding-right: 2rem;
}

.field__hint { font-size: var(--xs); color: var(--muted); }
.field__error { font-size: var(--xs); color: #b42318; min-height: 1em; }

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: #d9534f; }

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

.form__consent {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: var(--xs);
  color: var(--muted);
}

.form__consent input { width: 15px; height: 15px; margin-top: 0.25rem; flex: none; accent-color: var(--accent); }
.form__consent a { color: var(--accent); text-decoration: underline; }

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

.form-status {
  display: none;
  padding: 0.65rem 0.85rem;
  border-radius: var(--r-sm);
  font-size: var(--sm);
}

.form-status[data-state="error"] { display: block; background: #fdf0ef; border: 1px solid #f4c7c3; color: #9b241d; }
.form-status[data-state="success"] { display: block; background: #eef8f3; border: 1px solid #bfe3d4; color: #0f6b52; }

@media (max-width: 620px) {
  .form__row { grid-template-columns: minmax(0, 1fr); }
}

/* Footer ------------------------------------------------------------------ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding-bottom: 2.25rem;
}

.footer__about { max-width: 26rem; }
.footer__about p { font-size: var(--sm); color: var(--muted); margin-top: 0.75rem; }

.footer__title {
  font-size: var(--xs);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.footer__links { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.footer__links a { font-size: var(--sm); color: var(--muted); }
.footer__links a:hover { color: var(--accent); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.15rem;
  border-top: 1px solid var(--border);
  font-size: var(--xs);
  color: var(--muted);
}

.footer__bottom nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer__bottom a:hover { color: var(--accent); }

.social { display: flex; gap: 0.4rem; margin-top: 1.15rem; }

.social a {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--muted);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.social a:hover { color: var(--accent); border-color: var(--border-strong); }
.social svg { width: 15px; height: 15px; }

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__about { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
}
