:root {
  --color-primary: #0d3b79;
  --color-primary-dark: #082a58;
  --color-accent: #116bb9;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f8fb;
  --color-text: #17242f;
  --color-text-muted: #566372;
  --color-border: #e3e9ef;
  --shadow: 0 10px 30px rgba(13, 59, 121, 0.08);
  --radius: 14px;
  --max-width: 1180px;
  --font: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

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

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 16px; color: var(--color-primary); }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 16px; color: var(--color-text-muted); }

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--color-accent); color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: #ffffff;
  color: #ffffff;
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.25s ease;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  transition: height 0.25s ease;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  height: 66px;
  width: auto;
  transition: height 0.25s ease;
}
.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(13, 59, 121, 0.08);
}
.site-header.scrolled .container { height: 64px; }
.site-header.scrolled .brand img { height: 40px; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.98rem;
}
.nav-links a:hover { color: var(--color-accent); text-decoration: none; }

.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-cta .btn { padding: 10px 22px; font-size: 0.92rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  margin: 5px 0;
  transition: 0.2s;
}

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(8,42,88,0.92) 0%, rgba(13,59,121,0.78) 45%, rgba(17,107,185,0.55) 100%);
}
.hero .container { position: relative; z-index: 2; padding-top: 60px; padding-bottom: 60px; }
.hero-content { max-width: 640px; scroll-margin-top: 100px; }
.hero .eyebrow { color: #bcdcff; }
.hero h1 { color: #fff; }
.hero p.lead { color: rgba(255,255,255,0.9); font-size: 1.15rem; max-width: 540px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }

/* Sections */
section { padding: 100px 0; scroll-margin-top: 90px; }
.section-alt { background: var(--color-bg-alt); }

/* Edit mode */
.edit-bar {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.9rem;
}
.edit-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
}
.edit-bar a { color: #fff; text-decoration: underline; }
.edit-panel { padding: 60px 0; }
.edit-panel h3 { margin-bottom: 20px; }
.edit-form, .add-image-form {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 640px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.hero-cropper {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 740px;
  box-shadow: var(--shadow);
}
.hero-cropper input[type="file"] { margin-bottom: 18px; }
.crop-stage {
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  line-height: 0;
}
.crop-stage canvas { max-width: 100%; height: auto; cursor: grab; touch-action: none; }
.crop-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.crop-controls label { font-weight: 600; font-size: 0.9rem; }
.crop-controls input[type="range"] { flex: 1; min-width: 160px; }
.crop-controls .btn { padding: 10px 22px; font-size: 0.9rem; }
#cropStatus { font-size: 0.88rem; color: var(--color-text-muted); }
.gallery-edit-controls {
  background: rgba(8,42,88,0.92);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-form { display: flex; gap: 4px; margin: 0; }
.inline-form input[type="text"] {
  padding: 6px 8px;
  border-radius: 6px;
  border: none;
  font-size: 0.82rem;
  width: 110px;
}
.inline-form button {
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 6px;
  padding: 6px 9px;
  cursor: pointer;
  font-size: 0.9rem;
}
.inline-form button:hover { background: rgba(255,255,255,0.3); }
.inline-form button:disabled { opacity: 0.35; cursor: not-allowed; }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head p { margin: 0 auto; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery-media { position: relative; }
.gallery img { width: 100%; height: 340px; object-fit: cover; transition: transform 0.4s ease; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 20px;
  background: linear-gradient(to top, rgba(8,42,88,0.85), transparent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  pointer-events: none;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}
.contact-info-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-info-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contact-info-list .ico {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.contact-info-list a { color: var(--color-text); font-weight: 500; }
.contact-info-list a:hover { color: var(--color-accent); }

.contact-form {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--color-text);
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.98rem;
  background: var(--color-bg-alt);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: #fff;
}
.form-row.consent { display: flex; align-items: flex-start; gap: 10px; }
.form-row.consent input { width: auto; margin-top: 4px; }
.form-row.consent label { font-weight: 400; font-size: 0.88rem; color: var(--color-text-muted); }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; }

.form-note {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
}
.form-note.success { background: #e8f6ec; color: #1e6b34; }
.form-note.error { background: #fdeceb; color: #9c2b22; }

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 28px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { color: #fff; font-weight: 700; font-size: 1.15rem; }
.footer-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.75); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  padding-top: 20px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Legal pages */
.legal-page { padding: 140px 0 100px; }
.legal-page h2 { margin-top: 40px; }
.legal-page h2:first-of-type { margin-top: 0; }
.legal-page p, .legal-page li { color: var(--color-text-muted); }
.legal-page a { word-break: break-word; }

/* Responsive */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 10px 24px 20px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
  }
  .nav-links.open li { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
  .nav-links.open li:last-child { border-bottom: none; }
  .nav-cta .btn { padding: 9px 16px; font-size: 0.85rem; }
  .nav-toggle { display: block; }
  section { padding: 70px 0; }
}

@media (max-width: 640px) {
  .hero { min-height: auto; padding-top: 40px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .contact-form { padding: 24px; }
}
