/* Ratel Technical Solutions - first draft site
   Colours sampled from the company logo:
   Navy  #112B44  |  Teal  #01819A  |  Grey-navy  #47505E  */
:root {
  --navy: #112B44;
  --navy-deep: #0B1D30;
  --teal: #01819A;
  --teal-hover: #016B80;
  --teal-light: #4DA6B8;
  --teal-soft: #E6F4F7;
  --grey: #47505E;
  --grey-mid: #5C6673;
  --line: #D5DBE2;
  --wash: #F4F6F8;
  --white: #ffffff;
  --hero-muted: #C5CDD6;
  --placeholder: #EEF6F8;
  --shadow: 0 1px 2px rgba(17, 43, 68, 0.06), 0 8px 24px rgba(17, 43, 68, 0.06);
  --radius: 8px;
  --max: 70rem;
  --pad: clamp(1.25rem, 4vw, 2rem);
  --header-h: 4.75rem;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans.woff") format("woff");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--grey);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--teal-hover);
}

h1, h2, h3, h4 {
  color: var(--navy);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--teal);
  color: var(--white);
  padding: 0.5rem 0.9rem;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  color: var(--white);
}

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

.wrap {
  width: min(var(--max), 100% - 2 * var(--pad));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.logo img {
  height: 3.15rem;
  width: auto;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.6rem;
}

.site-nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--teal);
}

.site-nav a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--teal);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--teal);
  color: var(--white) !important;
  border-radius: 6px;
  padding: 0.45rem 0.9rem !important;
  border-bottom: 0 !important;
  font-weight: 600 !important;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--teal-hover);
  color: var(--white) !important;
}

/* Hero */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  padding: clamp(3.25rem, 8vw, 6.25rem) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}

.hero .eyebrow {
  color: var(--teal-light);
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.1rem;
}

.hero-lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--hero-muted);
  max-width: 38rem;
  margin-bottom: 1.75rem;
}

.hero-mark {
  justify-self: end;
  width: min(22rem, 100%);
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
}

.hero-mark img {
  width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--teal-hover);
  border-color: var(--teal-hover);
  color: var(--white);
}

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

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--navy);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn[disabled],
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Sections */
main {
  flex: 1;
}

.section {
  padding: clamp(3.25rem, 7vw, 5.25rem) 0;
}

.section-wash {
  background: var(--wash);
}

.section-navy {
  background: var(--navy);
  color: var(--hero-muted);
}

.section-navy h2,
.section-navy h3 {
  color: var(--white);
}

.section-intro {
  max-width: 40rem;
  margin-bottom: 2.25rem;
}

.section-intro h2 {
  margin-bottom: 0.85rem;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 2.25rem;
}

/* Three pillars / cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.5rem;
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-top: 0.35rem;
}

.card p {
  font-size: 1rem;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.card-link:hover,
a.card-link:focus-visible {
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(17, 43, 68, 0.12);
}

.card-link .more {
  display: inline-block;
  margin-top: auto;
  padding-top: 0.9rem;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.95rem;
}

.icon {
  width: 2.4rem;
  height: 2.4rem;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Why */
.why-grid {
  display: block;
}

.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.35rem 2rem;
}

.why-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.why-list h3 {
  margin: 0 0 0.25rem;
}

.tick {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.15rem;
  flex: none;
  color: var(--teal);
}

.cta-band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-band p {
  max-width: 38rem;
}

/* Page header (inner pages) */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: clamp(2.5rem, 6vw, 4.25rem) 0 3rem;
  position: relative;
  overflow: hidden;
}

.page-header h1 {
  color: var(--white);
}

.page-header p {
  color: var(--hero-muted);
  max-width: 40rem;
  font-size: 1.12rem;
}

.page-header .eyebrow {
  color: var(--teal-light);
}

/* Services detail */
.service-block {
  display: grid;
  grid-template-columns: minmax(0, 0.35fr) minmax(0, 0.65fr);
  gap: 1.5rem 2.5rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

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

.service-block:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.service-block h2 {
  font-size: 1.45rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}

.steps li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.9rem;
  align-items: start;
}

.step-num {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--navy);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  gap: 2.5rem;
  align-items: start;
}

.photo-placeholder {
  background: var(--wash);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--grey-mid);
  min-height: 18rem;
}

.photo-placeholder strong {
  color: var(--navy);
  display: block;
  margin-bottom: 0.35rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 1.6rem 1.5rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -0.4rem;
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--white);
}

.timeline .when {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.15rem;
}

.timeline h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 2.5rem;
  align-items: start;
}

.detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}

.detail-list li {
  margin: 0;
}

.detail-list .label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.3rem;
}

.placeholder-value {
  display: block;
  background: var(--placeholder);
  border: 1px dashed var(--teal);
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  color: var(--navy);
  font-style: italic;
}

.placeholder-value .hint {
  display: block;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--grey-mid);
  margin-top: 0.2rem;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.4rem 1.6rem;
}

.form-note {
  background: var(--placeholder);
  border-left: 3px solid var(--teal);
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

label {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.92rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  font: inherit;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  outline: 3px solid var(--teal-soft);
}

textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.form-actions {
  margin-top: 0.4rem;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: var(--hero-muted);
  padding: 2.4rem 0 1.6rem;
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
  height: 2.1rem;
  width: auto;
  margin-bottom: 0.85rem;
  opacity: 0.9;
}

.footer-brand p {
  max-width: 20rem;
  font-size: 0.95rem;
}

.site-footer h2 {
  color: var(--white);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.footer-nav a,
.site-footer a {
  color: var(--hero-muted);
  text-decoration: none;
}

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

.copyright {
  padding-top: 1.15rem;
  font-size: 0.88rem;
}

/* Mobile nav */
@media (max-width: 800px) {
  .logo img {
    height: 2.55rem;
  }

  .nav-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 6px;
    border: 1px solid var(--line);
    cursor: pointer;
    margin-left: auto;
    background: var(--white);
  }

  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    display: block;
    width: 1.15rem;
    height: 2px;
    background: var(--navy);
    position: relative;
    transition: transform 0.15s ease, opacity 0.15s ease;
  }

  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .nav-toggle-label span::before { top: -6px; }
  .nav-toggle-label span::after { top: 6px; }

  .header-inner {
    flex-wrap: wrap;
    min-height: 4.25rem;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 0 0 1rem;
    gap: 0.15rem;
  }

  .site-nav a {
    padding: 0.7rem 0.2rem;
    border-bottom: 0;
    border-left: 3px solid transparent;
    padding-left: 0.7rem;
  }

  .site-nav a[aria-current="page"] {
    border-left-color: var(--teal);
    border-bottom: 0;
    background: var(--teal-soft);
  }

  .nav-cta {
    justify-content: center;
    margin-top: 0.4rem;
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .nav-toggle:checked + .nav-toggle-label span {
    background: transparent;
  }

  .nav-toggle:checked + .nav-toggle-label span::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle:checked + .nav-toggle-label span::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .hero-grid,
  .cards,
  .why-grid,
  .why-list,
  .about-grid,
  .contact-grid,
  .service-block,
  .footer-inner,
  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .hero-mark {
    display: none;
  }

  .service-block {
    gap: 0.6rem;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 1rem;
  }

  .hero-lead {
    font-size: 1.05rem;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.card-link,
  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    transition: none;
  }
}

/* Contact details */
.detail-list a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.detail-list a:hover,
.detail-list a:focus-visible {
  color: var(--teal);
}

.founder-teaser .btn {
  margin-top: 1.1rem;
}

.founder-copy {
  max-width: 46rem;
}

.name-teaser {
  margin: 2.25rem 0 0;
  max-width: 40rem;
}

.name-teaser a {
  font-weight: 600;
  white-space: nowrap;
}

#why-ratel {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.social-link svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
  flex: none;
}

.detail-list .social-link {
  color: var(--teal);
}

.social-link:hover,
.social-link:focus-visible,
.detail-list .social-link:hover,
.detail-list .social-link:focus-visible {
  color: var(--teal-hover);
}

.site-footer .social-link {
  color: var(--teal-light);
  font-weight: 600;
}

.site-footer .social-link:hover,
.site-footer .social-link:focus-visible {
  color: var(--white);
}

.enquiry-card .btn {
  margin-top: 0.35rem;
}

.enquiry-alt {
  margin-top: 1rem;
  font-size: 0.98rem;
}

.page-actions {
  margin-top: 1.25rem;
}
