:root {
  --ink: #14212b;
  --muted: #53636f;
  --paper: #f6f8f7;
  --white: #fff;
  --navy: #12344a;
  --blue: #176b87;
  --line: #d8e0e2;
  --accent: #d9852b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 17px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
.site-header, footer { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1rem clamp(1.25rem, 5vw, 5rem); background: var(--white); }
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; max-width: min(58vw, 390px); text-decoration: none; }
.brand img { display: block; width: 100%; height: auto; }
nav { display: flex; gap: 1.5rem; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav a:hover { color: var(--blue); }
.nav-contact { color: var(--navy); font-weight: 750; }
.hero, .section, .dashboard, .form-shell { max-width: 1180px; margin: auto; padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 5vw, 5rem); }
.hero { min-height: 76vh; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { max-width: 850px; margin: .4rem 0 1rem; font: 750 clamp(3rem, 8vw, 6.8rem)/.98 Georgia, serif; letter-spacing: -.05em; color: var(--navy); }
.lede { max-width: 720px; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); }
.eyebrow { color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.button { display: inline-block; border: 1px solid var(--navy); padding: .75rem 1.1rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.primary { background: var(--navy); color: white; }
.secondary { background: transparent; color: var(--navy); }
.section h2, .dashboard h1, .form-shell h1 { max-width: 760px; font: 700 clamp(2rem, 4vw, 3.5rem)/1.1 Georgia, serif; color: var(--navy); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2rem; }
article { padding: 1.5rem; background: var(--white); border-top: 3px solid var(--blue); box-shadow: 0 8px 30px rgb(18 52 74 / 7%); }
article h2, article h3 { margin-top: 0; color: var(--navy); }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.flip-card { display: block; min-height: 22rem; padding: 0; border: 0; background: transparent; box-shadow: none; perspective: 1100px; text-decoration: none; }
.flip-card:focus { outline: 3px solid var(--accent); outline-offset: 5px; }
.flip-card-inner { position: relative; width: 100%; min-height: 22rem; transition: transform .65s ease; transform-style: preserve-3d; }
.flip-card:hover .flip-card-inner, .flip-card:focus .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border-top: 3px solid var(--blue); box-shadow: 0 8px 30px rgb(18 52 74 / 12%); backface-visibility: hidden; }
.flip-card-front { color: var(--white); background: var(--navy); }
.flip-card-front::after { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(8 30 43 / 8%) 24%, rgb(8 30 43 / 88%) 100%); content: ""; }
.flip-card-front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.flip-card-title { position: relative; z-index: 1; padding: 1.5rem; }
.flip-card-title h3, .flip-card-back h3 { margin: 0; color: inherit; }
.flip-card-title p { margin: .3rem 0 0; font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.flip-card-back { justify-content: center; padding: 1.75rem; color: var(--white); background: var(--navy); transform: rotateY(180deg); }
.flip-card-back h3 { font: 700 1.8rem/1.1 Georgia, serif; }
.flip-card-back p { margin: 1rem 0 0; font-size: 1rem; }
.service-hero { min-height: 56vh; }
.service-summary { max-width: 760px; color: var(--muted); font-size: clamp(1.15rem, 2vw, 1.45rem); }
.training { display: flex; align-items: end; justify-content: space-between; gap: 2rem; border-block: 1px solid var(--line); }
.form-shell { max-width: 600px; }
.form-shell label { display: block; font-weight: 700; }
.form-shell input { width: 100%; padding: .75rem; border: 1px solid var(--line); background: white; font: inherit; }
.text-button { margin-top: 2rem; border: 0; background: none; color: var(--blue); text-decoration: underline; cursor: pointer; }
footer { color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.footer-contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: .15rem;
  font-style: normal;
  text-align: right;
}
.footer-contact a { color: var(--navy); }
@media (max-width: 760px) {
  .site-header, footer, .training { align-items: flex-start; flex-direction: column; }
  nav { flex-wrap: wrap; gap: .75rem 1rem; }
  .grid, .services-grid { grid-template-columns: 1fr; }
  .footer-contact { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .flip-card { min-height: auto; perspective: none; }
  .flip-card-inner { min-height: auto; transform: none !important; transition: none; }
  .flip-card-front, .flip-card-back { position: relative; min-height: 16rem; transform: none; }
  .flip-card-back { min-height: auto; }
}
