/* ===========================================================
   GCA Insurance Solutions — Modern redesign (v2)
   Design system: CSS custom properties + fluid type/spacing
   =========================================================== */

@font-face {
  font-family: "Constantia";
  src: url("../assets/fonts/constantia-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Constantia";
  src: url("../assets/fonts/constantia-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Brand */
  --brand-500: #10b5e9;   /* decorative / large accents only — fails text contrast */
  --brand-600: #047a9a;   /* accessible text/link/button colour, 4.96:1 on white */
  --brand-700: #03627d;
  --brand-50: #eefaff;
  --brand-100: #d4f2fe;

  /* Ink (text) */
  --ink-900: #0d162c;
  --ink-700: #30405f;
  --ink-600: #44556c;
  --ink-500: #61738e;

  /* Surfaces */
  --surface: #ffffff;
  --surface-alt: #f6f9fb;
  --surface-card: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Feedback */
  --success: #0d824a;
  --success-bg: #e9fcf2;
  --error: #be1c13;
  --error-bg: #feebe9;

  /* Type */
  --font-sans: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Constantia", "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Scale */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.12);

  --header-height: 76px;
}

/* ---------- Reset ---------- */

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-700);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand-600); }
a:hover { color: var(--brand-700); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 1000;
  background: var(--ink-900);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 12px;
}

/* Consistent, visible focus ring everywhere (mouse users don't see it, keyboard users do) */
:focus-visible {
  outline: 3px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap--narrow {
  max-width: 760px;
}

.section {
  padding: 88px 0;
}
.section--alt {
  background: var(--surface-alt);
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin: 0 0 12px;
}

.section-intro {
  max-width: 640px;
  margin: 0 0 48px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 26px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand-600);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--brand-700);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink-900);
}
.btn-ghost:hover {
  border-color: var(--brand-600);
  color: var(--brand-600);
}

.btn-large { padding: 16px 32px; font-size: 16px; }
.btn-small { padding: 9px 18px; font-size: 14px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-900);
  flex-shrink: 0;
}
.brand:hover { color: var(--ink-900); }

.brand-logo { width: auto; height: 56px; display: block; }

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
}

.primary-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink-700);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.primary-nav a:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}
.primary-nav a.is-active {
  background: var(--brand-50);
  color: var(--brand-700);
}

.mobile-nav a.is-active {
  color: var(--brand-600);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--ink-700);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
}
.header-phone svg { width: 17px; height: 17px; }
.header-phone:hover { color: var(--brand-600); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.menu-toggle .bar {
  display: block;
  height: 2.5px;
  width: 22px;
  margin: 0 auto;
  background: var(--ink-900);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-nav {
  display: none;
}

@media (max-width: 900px) {
  .primary-nav, .header-actions { display: none; }
  .menu-toggle { display: flex; }

  .mobile-nav {
    display: block;
    max-height: 0;
    overflow: hidden;
    border-top: 1px solid var(--border);
    background: var(--surface);
    transition: max-height 0.25s ease;
  }
  .mobile-nav.is-open { max-height: 420px; }

  .mobile-nav ul {
    list-style: none;
    padding: 12px 24px 0;
  }
  .mobile-nav a {
    display: block;
    padding: 13px 4px;
    color: var(--ink-800, var(--ink-900));
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .mobile-nav-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 24px;
    color: var(--ink-700);
    font-weight: 600;
    text-decoration: none;
  }
  .mobile-nav-phone svg { width: 18px; height: 18px; }
  .mobile-nav .btn { margin: 4px 24px 20px; width: calc(100% - 48px); }
}

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

.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--brand-100), transparent 60%),
    var(--surface);
  padding: 72px 0 96px;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  margin-bottom: 0.4em;
}

.hero-lead {
  font-size: 18px;
  color: var(--ink-600);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 32px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  list-style: none;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-500);
}
.hero-trust li { position: relative; padding-left: 18px; }
.hero-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-500);
}

.hero-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}

.hero-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media-v {
  grid-column: 1;
  grid-row: 1 / 3;
  aspect-ratio: 3 / 4;
}

.hero-media-h {
  grid-column: 2;
  aspect-ratio: 4 / 3;
}

.hero-media-h1 { grid-row: 1; }
.hero-media-h2 { grid-row: 2; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { order: -1; }
  .hero { padding: 48px 0 56px; }
}

@media (max-width: 560px) {
  .hero-media { gap: 10px; }
}

/* ---------- Split (About) ---------- */

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.split--reverse { grid-template-columns: 1.1fr 0.9fr; }
.split--reverse .split-media { order: 2; }

.split-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: auto;
  aspect-ratio: 620 / 414;
  object-fit: cover;
}

.split-copy h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

@media (max-width: 900px) {
  .split, .split--reverse { grid-template-columns: 1fr; gap: 32px; }
  .split--reverse .split-media { order: -1; }
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 380px;
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.stat dt {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--brand-600);
}
.stat dd { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-500); font-weight: 600; }

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

/* ---------- Service cards ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 780px) {
  .service-grid { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.service-card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: center 25%;
}

.service-card-img--pos-40 {
  object-position: center 40%;
}

.service-card-body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-card-body h3 {
  font-size: 1.35rem;
  margin-bottom: 0.4em;
}

.chip-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 20px;
}
.chip-list li {
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
}

.service-card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-decoration: none;
  font-size: 14.5px;
}
.service-card-link span { transition: transform 0.15s ease; }
.service-card-link:hover span { transform: translateX(3px); }

/* Progressive disclosure for long lists */
.service-details {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.service-details + .service-details { margin-top: 0; padding-top: 14px; }

.service-details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--brand-600);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.service-details summary::-webkit-details-marker { display: none; }
.service-details summary::before {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  flex-shrink: 0;
}
.service-details[open] summary::before { transform: rotate(45deg); }

.service-details ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.service-details li {
  font-size: 14.5px;
  color: var(--ink-600);
  padding-left: 18px;
  position: relative;
}
.service-details li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
}

.two-col-list {
  grid-template-columns: 1fr 1fr;
}

.service-details-note {
  font-size: 13.5px;
  color: var(--ink-500);
  margin: 14px 0 0;
}

/* ---------- Vision ---------- */

.pull-quote {
  margin: 32px 0;
  padding: 28px 32px;
  border-left: 4px solid var(--brand-500);
  background: var(--surface-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.pull-quote p {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink-900);
  margin-bottom: 0.3em;
}
.pull-quote cite {
  font-style: normal;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-500);
}
.pull-quote--accent {
  border-left-color: var(--brand-600);
  background: var(--brand-50);
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

.contact-copy h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.contact-details {
  list-style: none;
  margin: 32px 0 0;
  display: grid;
  gap: 20px;
}
.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  color: var(--ink-700);
}
.contact-details svg {
  width: 20px;
  height: 20px;
  color: var(--brand-600);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-details a { font-weight: 700; text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }
.contact-details-label { color: var(--ink-500); font-weight: 400; }

.contact-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px;
}

@media (max-width: 480px) {
  .contact-card { padding: 24px; }
}

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

.form-field {
  margin-bottom: 20px;
}

.contact-form fieldset.form-field {
  border: none;
  padding: 0;
  margin: 0 0 24px;
}

.contact-form legend {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-900);
  margin-bottom: 10px;
  padding: 0;
}

.form-field label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-900);
  margin-bottom: 7px;
}

.required-mark { color: var(--error); }
.optional-mark { font-weight: 500; color: var(--ink-500); text-transform: none; }

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-900);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 4px var(--brand-100);
}

.form-field input:invalid[aria-invalid="true"],
.form-field textarea:invalid[aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  display: block;
  min-height: 1.2em;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--error);
}

.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 14.5px;
  color: var(--ink-700);
}
.checkbox-list input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand-600);
}

.hidden-field {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  left: -9999px;
}

.recaptcha-field { margin: 4px 0 24px; }

.form-submit { width: 100%; }

.form-status {
  margin-top: 16px;
  padding: 0;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.form-status:empty { display: none; }
.form-status.success {
  padding: 14px 16px;
  color: var(--success);
  background: var(--success-bg);
}
.form-status.error {
  padding: 14px 16px;
  color: var(--error);
  background: var(--error-bg);
}

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

.site-footer {
  background: var(--ink-900);
  color: #cbd5e1;
}

.footer-inner {
  padding: 64px 24px 40px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 40px;
}

@media (max-width: 780px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

.footer-logo {
  display: block;
  width: 220px;
  height: auto;
  background: #ffffff;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.footer-nav h2, .footer-contact h2 {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 16px;
}

.footer-nav ul { list-style: none; display: grid; gap: 10px; }
.footer-nav a, .footer-contact a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 14.5px;
}
.footer-nav a:hover, .footer-contact a:hover { color: #ffffff; text-decoration: underline; }

.footer-contact p { font-size: 14.5px; margin: 0 0 12px; color: #cbd5e1; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 22px 0;
}
.footer-bottom p { margin: 0; font-size: 13px; color: #94a3b8; }

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-900);
  color: #ffffff;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--brand-600); }
