/* ==========================================================================
   Datong Apps — static site stylesheet
   One file, no build step, no framework. Edit colours in :root below.
   ========================================================================== */

:root {
  --navy:        #0f2038;
  --navy-soft:   #1b3453;
  --accent:      #2b7fd4;
  --accent-dark: #1f63a8;
  --paper:       #ffffff;
  --mist:        #f3f6fa;
  --line:        #dfe6ef;
  --body:        #40536b;
  --heading:     #0f2038;

  --wrap: 1140px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(15, 32, 56, 0.08);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  background: var(--paper);
}

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

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

h1, h2, h3, h4 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; max-width: 70ch; }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.logo img { max-height: 46px; width: auto; }
.logo:hover { text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  cursor: pointer;
  color: var(--navy);
  font-size: 1rem;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--accent); text-decoration: none; border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 14px 30px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--mist); color: var(--navy); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  color: #fff;
  text-align: center;
  padding: clamp(90px, 14vw, 170px) 0;
  background: var(--navy) center/cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.72), rgba(10, 22, 40, 0.82));
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 20ch; margin-inline: auto; }
.hero .lead {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: #d8e4f2;
  max-width: 46ch;
  margin: 0 auto 8px;
}
.hero .kicker {
  font-size: 1rem;
  color: #9fbde0;
  max-width: 46ch;
  margin: 0 auto 34px;
}

/* ---------- Page header (inner pages) ---------- */

.page-head {
  background: var(--navy);
  color: #fff;
  padding: clamp(60px, 9vw, 96px) 0;
  text-align: center;
}
.page-head h1 { color: #fff; margin-bottom: 10px; }
.page-head p { color: #cddaea; margin: 0 auto; max-width: 55ch; }

/* ---------- Sections ---------- */

section { padding: clamp(56px, 8vw, 90px) 0; }
.section-mist { background: var(--mist); }

.eyebrow {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 6px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.split.reverse .split-media { order: 2; }

.banner img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.prose { max-width: 75ch; }
.prose h2 { margin-bottom: 0.6em; }
.prose h3 { margin-top: 1.8em; }

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 34px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; }

/* ---------- Contact form ---------- */

.form { max-width: 620px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  color: var(--heading);
  background: #fff;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(43,127,212,.18); }
.form-note { font-size: 0.9rem; color: var(--body); margin-top: 14px; }

/* ---------- Contact details ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  max-width: 540px;
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  background: #fff;
}
.contact-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.contact-card a { font-size: 1.05rem; word-break: break-word; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #b9c9dd;
  padding: 56px 0 34px;
}
.site-footer h2 { color: #fff; font-size: 1.3rem; margin-bottom: 10px; }
.site-footer a { color: #d5e3f4; }
.site-footer a:hover { color: #fff; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; list-style: none; margin: 0; padding: 0; }
.footer-bottom { padding-top: 22px; font-size: 0.92rem; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .cards { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 18px; }
  .nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:hover { border-bottom-color: var(--line); }
  .site-header .wrap { position: relative; }
}

@media (max-width: 560px) {
  .form .row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
