/* ==========================================================================
   Crawley Tech - Core Stylesheet
   ========================================================================== */

:root {
  --navy: #0a1f3d;
  --navy-dark: #071731;
  --blue: #1462b0;
  --blue-bright: #2c7be5;
  --blue-light: #e8f1fb;
  --grey-bg: #f5f7fa;
  --border: #dde3ec;
  --text: #202b3c;
  --text-muted: #56617a;
  --white: #ffffff;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(10, 31, 61, 0.08);
  --shadow-md: 0 12px 28px rgba(10, 31, 61, 0.12);
  --shadow-lg: 0 24px 48px rgba(10, 31, 61, 0.16);
  --font-base: "Inter", "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  --ease: 0.22s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--text);
  background-color: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-base);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--navy);
}

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

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover,
a:focus {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

ul {
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section--alt {
  background-color: var(--grey-bg);
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-heading h2 {
  font-size: 2.15rem;
  color: var(--navy);
  margin: 0 0 14px;
}

.section-heading p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background-color: var(--blue);
  display: inline-block;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  z-index: 1000;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ease);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.nav__brand {
  display: flex;
  align-items: center;
}

.nav__brand img {
  height: 46px;
  width: auto;
}

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
}

.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--navy);
  margin: 4px 0;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav__menu a:not(.btn) {
  position: relative;
  color: var(--text);
  font-weight: 500;
  padding: 6px 0;
}

.nav__menu a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: var(--blue);
  transition: width var(--ease);
}

.nav__menu a.is-active,
.nav__menu a:hover {
  color: var(--blue);
  text-decoration: none;
}

.nav__menu a.is-active::after,
.nav__menu a:hover::after {
  width: 100%;
}

.nav__menu .nav__cta {
  display: none;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.btn:hover,
.btn:focus {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background-color: var(--blue);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(20, 98, 176, 0.25);
}

.btn--primary:hover {
  background-color: var(--navy);
  color: var(--white);
}

.btn--outline {
  background-color: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn--outline:hover {
  background-color: var(--navy);
  color: var(--white);
}

.btn--light {
  background-color: var(--white);
  color: var(--navy);
}

.btn--light:hover {
  background-color: var(--blue-light);
}

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

.hero {
  position: relative;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0) 0 0 / 28px 28px,
    linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 108px 0 96px;
  overflow: hidden;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9cc4ef;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 16px;
}

.hero__eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background-color: var(--blue-bright);
  display: inline-block;
}

.hero h1 {
  font-size: 2.85rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0 0 22px;
}

.hero p {
  font-size: 1.15rem;
  color: #cfd9ea;
  margin: 0 0 32px;
  max-width: 560px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.hero__visual svg {
  width: 100%;
  height: auto;
}

.hero__visual-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--blue-bright);
  border-style: solid;
  opacity: 0.8;
}

.hero__visual-corner--tl {
  top: -10px;
  left: -10px;
  border-width: 2px 0 0 2px;
}

.hero__visual-corner--br {
  bottom: -10px;
  right: -10px;
  border-width: 0 2px 2px 0;
}

/* Simple page header for inner pages */
.page-header {
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0) 0 0 / 28px 28px,
    linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 72px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2.3rem;
  color: var(--white);
  margin: 0 0 12px;
}

.page-header p {
  color: #cfd9ea;
  max-width: 640px;
  margin: 0 auto;
}

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

.grid {
  display: grid;
  gap: 28px;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  position: relative;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: rgba(20, 98, 176, 0.25);
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  color: var(--navy);
  font-size: 1.15rem;
  margin: 0 0 10px;
}

.card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.97rem;
}

/* Capability list */
.capability-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 32px;
}

.capability-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.capability-list li:hover {
  border-color: rgba(20, 98, 176, 0.3);
  box-shadow: var(--shadow-sm);
}

.capability-list li::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background-color: var(--blue);
}

/* Delivery model list */
.delivery-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.delivery-list li {
  padding: 22px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius);
  background-color: var(--grey-bg);
  transition: transform var(--ease), box-shadow var(--ease);
}

.delivery-list li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.delivery-list h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 1.05rem;
}

.delivery-list p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Engagement list */
.engagement-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.engagement-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--white);
  font-weight: 500;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.engagement-list li:hover {
  border-color: rgba(20, 98, 176, 0.3);
  box-shadow: var(--shadow-sm);
}

.engagement-list .num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Why us */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.why-grid .card {
  border-top: 3px solid var(--blue);
}

/* CTA band */
.cta-band {
  position: relative;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0) 0 0 / 28px 28px,
    var(--navy);
  color: var(--white);
  text-align: center;
  padding: 76px 0;
}

.cta-band h2 {
  font-size: 1.9rem;
  color: var(--white);
  margin: 0 0 12px;
}

.cta-band p {
  color: #cfd9ea;
  margin: 0 0 30px;
}

/* ---------------------------------------------------------------------- */
/* Services page                                                          */
/* ---------------------------------------------------------------------- */

.service-block {
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}

.service-block:first-child {
  padding-top: 0;
}

.service-block:last-child {
  border-bottom: none;
}

.service-block__inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
}

.service-block h2 {
  color: var(--navy);
  font-size: 1.5rem;
  margin: 0 0 12px;
}

.service-block .lead {
  color: var(--text-muted);
  margin: 0;
}

.service-block h3 {
  font-size: 1rem;
  color: var(--navy);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.service-block ul {
  list-style: none;
  margin: 0 0 24px;
}

.service-block ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text);
}

.service-block ul li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

.service-block .example-box {
  background-color: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.service-toc {
  background-color: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 48px;
}

.service-toc h2 {
  font-size: 1.1rem;
  color: var(--navy);
  margin: 0 0 14px;
}

.service-toc ul {
  list-style: none;
  columns: 2;
  gap: 10px 32px;
}

.service-toc li {
  margin-bottom: 8px;
}

/* ---------------------------------------------------------------------- */
/* About page                                                             */
/* ---------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-grid h2 {
  color: var(--navy);
  font-size: 1.6rem;
  margin: 0 0 16px;
}

.focus-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.focus-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--white);
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
}

.contact-card {
  background-color: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  height: fit-content;
}

.contact-card h2 {
  font-size: 1.3rem;
  color: var(--white);
  margin: 0 0 6px;
}

.contact-card .tagline {
  color: #b9c6de;
  margin: 0 0 24px;
  font-size: 0.95rem;
}

.contact-card a {
  color: var(--white);
  font-weight: 600;
}

.contact-card__row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 0.92rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background-color: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-note {
  background-color: var(--blue-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-success {
  display: none;
  background-color: #e7f5ea;
  border: 1px solid #b8dfc0;
  color: #1f5c2c;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 20px;
  font-weight: 500;
}

.form-success.is-visible {
  display: block;
}

.form-error {
  display: none;
  background-color: #fbeaea;
  border: 1px solid #f0bcbc;
  color: #7a2020;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 20px;
  font-weight: 500;
}

.form-error.is-visible {
  display: block;
}

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

.site-footer {
  background-color: var(--navy-dark);
  color: #b9c6de;
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
  height: 38px;
  margin-bottom: 14px;
  border-radius: 4px;
}

.footer-brand p {
  color: #8fa0bf;
  font-size: 0.9rem;
  max-width: 320px;
}

.site-footer h3 {
  color: var(--white);
  font-size: 0.95rem;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-footer ul {
  list-style: none;
}

.site-footer ul li {
  margin-bottom: 10px;
}

.site-footer a {
  color: #b9c6de;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 24px;
  font-size: 0.85rem;
  color: #7f90b0;
  text-align: center;
}

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

@media (max-width: 991px) {
  .hero__inner,
  .about-grid,
  .contact-grid,
  .service-block__inner {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
  }

  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .delivery-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .capability-list,
  .engagement-list {
    grid-template-columns: 1fr;
  }

  .service-toc ul {
    columns: 1;
  }
}

@media (max-width: 767px) {
  .nav__toggle {
    display: block;
  }

  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 600;
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px;
    display: none;
  }

  .nav__menu.is-open {
    display: flex;
  }

  .nav__menu li {
    width: 100%;
  }

  .nav__menu a {
    display: block;
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav__actions .btn {
    display: none;
  }

  .nav__menu .nav__cta {
    display: block;
    padding: 14px 0;
  }

  .hero {
    padding: 64px 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 64px 0;
  }

  .section-heading {
    margin-bottom: 40px;
  }

  .page-header {
    padding: 56px 0;
  }

  .grid--3,
  .grid--4,
  .why-grid,
  .delivery-list,
  .engagement-list {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
