/* ==========================================================================
   REKOVE Business Solutions Limited - Responsive Stylesheet
   ISO229 Assessment 3 (A3): Responsive HTML5 + CSS3 Website

   Approach: MOBILE-FIRST. The base rules below style the smallest screens.
   min-width media queries then progressively enhance the layout:

     Base    : 0 - 599px      phones (single column)
     Tablet  : 600px and up   two-column grids, horizontal header
     Laptop  : 900px and up   multi-column page layouts
     Desktop : 1200px and up  wider spacing, max content width

   Contents
     1.  Design tokens (CSS custom properties)
     2.  Reset & base elements
     3.  Typography
     4.  Accessibility helpers (skip link, focus)
     5.  Layout utilities (container, section spacing)
     6.  Header & navigation (Flexbox)
     7.  Hero (Grid)
     8.  Buttons
     9.  Cards & feature grids (CSS Grid)
     10. Numbered steps (Grid + CSS counters)
     11. Tables (responsive stacked tables)
     12. Figures & images
     13. Page intro banner & in-page links
     14. Contact page layout & form (Grid)
     15. Footer (Grid)
     16. Media queries (tablet / laptop / desktop)
     17. User preference queries (reduced motion) & print
   ========================================================================== */


/* 1. DESIGN TOKENS -------------------------------------------------------
   Colours, spacing, type and radii are stored once as custom properties so
   the whole site can be re-themed by changing a single value.            */
:root {
  /* Brand colours (taken from the REKOVE logo) */
  --clr-navy:        #11172d;   /* logo mark - primary text/background   */
  --clr-navy-700:    #1f2a4d;   /* hover / secondary dark                */
  --clr-teal:        #1ce5d3;   /* logo accent - decorative highlights   */
  --clr-teal-dark:   #0a7c80;   /* accessible teal for text on white     */
  --clr-teal-soft:   #e3faf7;   /* light tint for panels                 */
  --clr-gold:        #e8b923;   /* call-to-action colour                 */

  /* Neutrals */
  --clr-text:        #222834;
  --clr-muted:       #5a6272;
  --clr-border:      #d9dee7;
  --clr-surface:     #ffffff;
  --clr-surface-alt: #f4f6fa;
  --clr-error:       #b3261e;

  /* Typography */
  --font-body:    "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --fs-base: 1rem;
  --fs-sm:   0.9rem;
  --fs-h1:   clamp(1.9rem, 1.3rem + 2.6vw, 3rem);    /* fluid type */
  --fs-h2:   clamp(1.45rem, 1.15rem + 1.3vw, 2rem);
  --fs-h3:   clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
  --lh:      1.65;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Shape, depth, motion */
  --radius-sm: 4px;
  --radius:    10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(17, 23, 45, 0.08);
  --shadow:    0 6px 18px rgba(17, 23, 45, 0.10);
  --shadow-lg: 0 14px 34px rgba(17, 23, 45, 0.16);
  --transition: 0.25s ease;

  /* Layout */
  --container: 1140px;
  --gutter: var(--space-4);
}


/* 2. RESET & BASE --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh);
  color: var(--clr-text);
  background-color: var(--clr-surface);
  /* Sticky footer: body is a flex column, main grows to fill space */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Responsive images: never wider than their container */
img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  padding-left: 1.25rem;
}


/* 3. TYPOGRAPHY ----------------------------------------------------------- */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  color: var(--clr-navy);
  line-height: 1.25;
  margin: 0 0 var(--space-4);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

/* Decorative underline on section headings using a pseudo-element */
.section-title {
  position: relative;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-5);
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--clr-teal), var(--clr-gold));
}

.section-title.center {
  text-align: center;
}

.section-title.center::after {
  left: 50%;
  transform: translateX(-50%);
}

p {
  margin: 0 0 var(--space-4);
  max-width: 72ch;
}

.lead {
  font-size: 1.1rem;
  color: var(--clr-muted);
}

a {
  color: var(--clr-teal-dark);
  text-underline-offset: 3px;
  transition: color var(--transition);
}

a:hover {
  color: var(--clr-navy);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-teal-dark);
  margin-bottom: var(--space-2);
}

.required {
  color: var(--clr-error);
}


/* 4. ACCESSIBILITY HELPERS ------------------------------------------------ */
.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -100px;
  z-index: 1000;
  padding: var(--space-3) var(--space-4);
  background: var(--clr-navy);
  color: #ffffff;
  border-radius: var(--radius-sm);
  transition: top var(--transition);
}

.skip-link:focus {
  top: var(--space-3);
  color: #ffffff;
}

/* Clear focus ring for keyboard users only */
:focus-visible {
  outline: 3px solid var(--clr-gold);
  outline-offset: 3px;
}


/* 5. LAYOUT UTILITIES ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-7);
}

.section-alt {
  background-color: var(--clr-surface-alt);
}

.mt-5 {
  margin-top: var(--space-5);
}


/* 6. HEADER & NAVIGATION (Flexbox) ----------------------------------------
   Mobile: logo on top, the three navigation links share one full-width row
   (no JavaScript menu needed with only three links).
   Tablet+: logo left, navigation right on one line.                       */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.96);
  border-bottom: 3px solid var(--clr-navy);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-3);
}

.brand-link img {
  width: 180px;
}

.main-nav {
  width: 100%;
}

.main-nav ul {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  flex: 1 1 0;                 /* three equal-width tabs on phones */
}

.main-nav a {
  display: block;
  text-align: center;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: var(--clr-navy);
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}

.main-nav a:hover {
  background-color: var(--clr-teal-soft);
  color: var(--clr-navy);
}

.main-nav a[aria-current="page"] {
  background-color: var(--clr-navy);
  color: #ffffff;
}


/* 7. HERO (Grid) ---------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 15%, rgba(28, 229, 211, 0.28), transparent 45%),
    linear-gradient(135deg, var(--clr-navy) 0%, var(--clr-navy-700) 100%);
  padding-block: var(--space-7);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
}

.hero h1,
.hero h2 {
  color: #ffffff;
}

.hero p {
  color: #d7deea;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* Quick-facts panel beside the hero text */
.hero-panel {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.hero-panel h2 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-3);
}

.fact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

.fact-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: #e9eef6;
}

.fact-list li::before {
  content: "\2713";                 /* tick mark */
  flex: 0 0 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--clr-teal);
  color: var(--clr-navy);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Call-to-action banner (reuses hero colours) */
.cta-banner {
  text-align: center;
}

.cta-banner p {
  margin-inline: auto;
}

.cta-banner .hero-actions {
  justify-content: center;
}


/* 8. BUTTONS -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;                 /* comfortable touch target */
  padding: var(--space-3) var(--space-5);
  border: 2px solid var(--clr-gold);
  border-radius: var(--radius-sm);
  background-color: var(--clr-gold);
  color: var(--clr-navy);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}

.btn:hover {
  background-color: var(--clr-navy);
  border-color: var(--clr-navy);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border-color: #ffffff;
  color: #ffffff;
}

.btn-outline:hover {
  background-color: #ffffff;
  border-color: #ffffff;
  color: var(--clr-navy);
}

/* Buttons that sit on the dark hero use a teal hover instead of navy */
.hero .btn:not(.btn-outline):hover {
  background-color: var(--clr-teal);
  border-color: var(--clr-teal);
  color: var(--clr-navy);
}


/* 9. CARDS & FEATURE GRIDS (CSS Grid) --------------------------------------
   auto-fit + minmax lets the grid choose 1, 2 or 3 columns by itself.    */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--space-5);
}

.card {
  display: flex;
  flex-direction: column;
  background-color: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-top: 4px solid var(--clr-teal);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card img {
  width: 72px;
  margin-bottom: var(--space-4);
}

.card p {
  flex-grow: 1;                     /* equal-height cards, links aligned */
}

.card-link {
  font-weight: 700;
  text-decoration: none;
}

.card-link::after {
  content: " \2192";
}

/* Two-by-two "why choose us" features */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-grid li {
  background: var(--clr-surface);
  border-left: 4px solid var(--clr-gold);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-sm);
}

.feature-grid strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--clr-navy);
  margin-bottom: var(--space-1);
}

/* Two-column text + aside split used on the Home page */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.info-panel {
  background: var(--clr-teal-soft);
  border-radius: var(--radius);
  padding: var(--space-5);
  align-self: start;
}

.info-panel h3 {
  margin-bottom: var(--space-3);
}

.info-panel ul {
  margin: 0;
}


/* 10. NUMBERED STEPS (Grid + CSS counters) -------------------------------- */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.steps li {
  counter-increment: step;
  position: relative;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-5) var(--space-5) 4.5rem;
  box-shadow: var(--shadow-sm);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: var(--space-4);
  top: var(--space-5);
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--clr-navy);
  color: var(--clr-teal);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.steps strong {
  display: block;
  color: var(--clr-navy);
}


/* 11. TABLES ----------------------------------------------------------------
   Phones: each row becomes a stacked "card"; the column heading is shown
   beside each value using the data-label attribute and attr().
   Tablet+: a normal table layout is restored.                            */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-6);
  font-size: 0.95rem;
}

caption {
  text-align: left;
  font-weight: 700;
  color: var(--clr-navy);
  padding-bottom: var(--space-3);
}

th,
td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  vertical-align: top;
}

th {
  background-color: var(--clr-navy);
  color: #ffffff;
}

/* --- stacked version (phones) --- */
.table-responsive thead {
  /* visually hidden but still read by screen readers */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.table-responsive tr {
  display: block;
  margin-bottom: var(--space-4);
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-teal);
  border-radius: var(--radius-sm);
  background: var(--clr-surface);
}

.table-responsive td {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--space-3);
  border-bottom: 1px solid var(--clr-border);
}

.table-responsive td:last-child {
  border-bottom: 0;
}

.table-responsive td::before {
  content: attr(data-label);
  font-weight: 700;
  color: var(--clr-navy);
}


/* 12. FIGURES & IMAGES ---------------------------------------------------- */
figure {
  margin: 0 0 var(--space-6);
  padding: var(--space-4);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
}

figure img {
  width: 100%;
  margin-inline: auto;
}

figcaption {
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  text-align: center;
}


/* 13. PAGE INTRO BANNER & IN-PAGE LINKS ----------------------------------- */
.page-banner {
  background:
    linear-gradient(135deg, rgba(17, 23, 45, 0.94), rgba(31, 42, 77, 0.94)),
    var(--clr-navy);
  color: #ffffff;
  padding-block: var(--space-7);
}

.page-banner h1 {
  color: #ffffff;
}

.page-banner p {
  color: #d7deea;
}

.page-banner .eyebrow {
  color: var(--clr-teal);
}

.pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 0;
}

.pill-nav a {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #ffffff;
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: background-color var(--transition), color var(--transition);
}

.pill-nav a:hover {
  background: var(--clr-teal);
  border-color: var(--clr-teal);
  color: var(--clr-navy);
}

/* Offset in-page anchor targets so the sticky header doesn't hide them */
[id] {
  scroll-margin-top: 140px;
}

/* Services page: service list beside its documents table */
.service-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
  display: grid;
  gap: var(--space-3);
}

.service-list li {
  padding: var(--space-3) var(--space-4);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
}

.service-list strong {
  color: var(--clr-navy);
}

/* Service package cards */
.package-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.package {
  display: flex;
  flex-direction: column;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.package h3 {
  margin-bottom: var(--space-1);
}

.package .best-for {
  font-size: var(--fs-sm);
  color: var(--clr-teal-dark);
  font-weight: 700;
}

.package.featured {
  border: 2px solid var(--clr-teal);
  box-shadow: var(--shadow);
  position: relative;
}

.package.featured::before {
  content: "Most popular";
  position: absolute;
  top: -0.8rem;
  right: var(--space-4);
  background: var(--clr-teal);
  color: var(--clr-navy);
  font-size: 0.75rem;
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
}


/* 14. CONTACT PAGE LAYOUT & FORM (Grid) ----------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.contact-card {
  background: var(--clr-surface-alt);
  border-radius: var(--radius);
  padding: var(--space-5);
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
  display: grid;
  gap: var(--space-3);
}

.contact-details li {
  display: grid;
  grid-template-columns: 1fr;
}

.contact-details strong {
  color: var(--clr-navy);
}

.contact-details a {
  overflow-wrap: anywhere;
}

.contact-form fieldset {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-4) var(--space-2);
  margin: 0 0 var(--space-5);
  min-width: 0;                     /* stops fieldsets overflowing */
}

.contact-form legend {
  font-weight: 700;
  color: var(--clr-navy);
  padding: 0 var(--space-2);
}

/* Form fields sit in a grid: 1 column on phones, 2 on tablet+ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: var(--space-5);
}

.form-row {
  margin-bottom: var(--space-4);
}

.form-row.full {
  grid-column: 1 / -1;
}

.form-row label,
.form-row .group-label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.hint {
  display: block;
  font-size: 0.85rem;
  color: var(--clr-muted);
  margin-top: var(--space-1);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3);
  border: 1px solid #aeb7c6;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  font: inherit;
  color: var(--clr-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--clr-teal-dark);
  box-shadow: 0 0 0 3px rgba(28, 229, 211, 0.35);
}

/* CSS3 validation feedback (only after the user has typed something) */
.contact-form input:not(:placeholder-shown):invalid,
.contact-form textarea:not(:placeholder-shown):invalid {
  border-color: var(--clr-error);
}

.contact-form input:not(:placeholder-shown):valid,
.contact-form textarea:not(:placeholder-shown):valid {
  border-color: #2e7d4f;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
}

.radio-group label,
.checkbox-row label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-weight: 400;
  cursor: pointer;
}

.radio-group input,
.checkbox-row input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.2rem;
  accent-color: var(--clr-teal-dark);
  flex-shrink: 0;
}

.contact-form .btn {
  width: 100%;
}


/* 15. FOOTER (Grid) ------------------------------------------------------- */
.site-footer {
  background-color: var(--clr-navy);
  color: #c9d1de;
  font-size: var(--fs-sm);
  padding-top: var(--space-7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.site-footer h2 {
  font-family: var(--font-body);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-teal);
  margin-bottom: var(--space-3);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

.site-footer a {
  color: #ffffff;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--clr-teal);
  text-decoration: underline;
}

.footer-logo {
  width: 170px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  margin-bottom: var(--space-3);
}

.footer-bottom {
  margin-top: var(--space-6);
  padding-block: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.footer-bottom p {
  margin: 0 auto;
}


/* 16. MEDIA QUERIES --------------------------------------------------------- */

/* ---- Tablet: 600px and up ---- */
@media (min-width: 600px) {
  :root {
    --gutter: var(--space-5);
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .main-nav {
    width: auto;
  }

  .main-nav li {
    flex: 0 0 auto;
  }

  .brand-link img {
    width: 200px;
  }

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

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

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

  .contact-form .btn {
    width: auto;
  }

  .contact-details li {
    grid-template-columns: 8.5rem 1fr;
  }

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

  /* Restore normal table layout */
  .table-responsive thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .table-responsive tr {
    display: table-row;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .table-responsive td {
    display: table-cell;
    border-bottom: 1px solid var(--clr-border);
  }

  .table-responsive td::before {
    content: none;
  }

  .table-responsive tbody tr:nth-child(even) {
    background-color: var(--clr-surface-alt);
  }

  .table-responsive tbody tr:hover {
    background-color: var(--clr-teal-soft);
  }
}

/* ---- Laptop: 900px and up ---- */
@media (min-width: 900px) {
  .section {
    padding-block: var(--space-8);
  }

  .hero {
    padding-block: var(--space-8);
  }

  .hero-grid {
    grid-template-columns: 1.4fr 1fr;
  }

  .split {
    grid-template-columns: 2fr 1fr;
  }

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

  /* Step cards switch to number-on-top for the 4-column row */
  .steps li {
    padding: 4.25rem var(--space-5) var(--space-5);
  }

  /* Two-item step lists stay at two wide columns */
  .steps.steps-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps.steps-2 li {
    padding: var(--space-5) var(--space-5) var(--space-5) 4.5rem;
  }

  .service-block {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

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

  /* Contact page: details sidebar + form using named grid areas */
  .contact-layout {
    grid-template-columns: 1fr 2fr;
    grid-template-areas: "details form";
    align-items: start;
  }

  .contact-aside {
    grid-area: details;
    position: sticky;
    top: 110px;
  }

  .contact-main {
    grid-area: form;
  }

  /* Narrow sidebar: stack each label above its value again */
  .contact-aside .contact-details li {
    grid-template-columns: 1fr;
  }

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

/* ---- Desktop: 1200px and up ---- */
@media (min-width: 1200px) {
  :root {
    --gutter: var(--space-6);
  }

  .brand-link img {
    width: 220px;
  }

  .main-nav ul {
    gap: var(--space-3);
  }

  .main-nav a {
    padding: var(--space-2) var(--space-5);
  }
}


/* 17. USER PREFERENCES & PRINT --------------------------------------------- */

/* Respect users who have asked the OS to reduce motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Clean printout: hide navigation/decoration, show link URLs */
@media print {
  .site-header,
  .skip-link,
  .hero-actions,
  .pill-nav,
  .contact-form,
  .site-footer {
    display: none;
  }

  .hero,
  .page-banner {
    background: none;
    color: #000000;
  }

  .hero h1,
  .hero h2,
  .hero p,
  .page-banner h1,
  .page-banner p {
    color: #000000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
  }
}


/* 18. A4 JAVASCRIPT ENHANCEMENTS --------------------------------------------
   Styles for the Assessment 4 interactive features. Every feature still
   works (in a simpler form) without JavaScript, so these styles only
   polish what JS adds.                                                     */

/* --- 18a. Form status box (error summary / success message) ------------- */
.form-status {
  margin-bottom: var(--space-5);
  border-radius: var(--radius-sm);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition), padding var(--transition);
}

/* JS adds .error or .success; :empty keeps the box hidden before that */
.form-status.error,
.form-status.success {
  max-height: 400px;
  padding: var(--space-4) var(--space-5);
}

.form-status.error {
  background: #fbeeed;
  border: 1px solid var(--clr-error);
  border-left: 4px solid var(--clr-error);
  color: #7a1a14;
}

.form-status.success {
  background: #e9f6ee;
  border: 1px solid #2e7d4f;
  border-left: 4px solid #2e7d4f;
  color: #1d5233;
}

.form-status ul {
  margin: var(--space-2) 0 0;
  padding-left: 1.25rem;
}

.form-status a {
  font-weight: 700;
}

/* --- 18b. Per-field errors ------------------------------------------------ */
.field-error {
  display: block;
  margin-top: var(--space-1);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clr-error);
}

/* red ring on the control itself, overriding the valid/invalid colours */
.contact-form .has-error input,
.contact-form .has-error select,
.contact-form .has-error textarea {
  border-color: var(--clr-error);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.18);
}

/* --- 18c. Character counter ----------------------------------------------- */
.char-counter {
  text-align: right;
}

.char-counter.near-limit {
  color: var(--clr-error);
  font-weight: 700;
}

/* --- 18d. FAQ accordion ----------------------------------------------------- */
.container-narrow {
  max-width: 820px;
}

.accordion {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.accordion-item {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.accordion-heading {
  margin: 0;
}

.accordion-heading h3,
h3.accordion-heading {
  font-family: var(--font-body);
  font-size: 1rem;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 0;
  background: var(--clr-surface);
  color: var(--clr-navy);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition);
}

.accordion-trigger:hover {
  background: var(--clr-teal-soft);
}

/* plus / minus indicator built from CSS so no image is needed */
.accordion-trigger::after {
  content: "\002B";               /* plus sign */
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--clr-navy);
  color: var(--clr-teal);
  font-weight: 700;
}

.accordion-trigger[aria-expanded="true"]::after {
  content: "\2212";               /* minus sign */
  background: var(--clr-teal);
  color: var(--clr-navy);
}

.accordion-panel {
  padding: 0 var(--space-5) var(--space-4);
}

.accordion-panel p {
  margin: 0;
}

/* --- 18e. Fee estimator ------------------------------------------------------ */
.estimator-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-top: var(--space-5);
  align-items: start;
}

.estimator-controls label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.estimator-controls select {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3);
  border: 1px solid #aeb7c6;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  font: inherit;
  color: var(--clr-text);
}

.estimator-controls select:focus {
  outline: none;
  border-color: var(--clr-teal-dark);
  box-shadow: 0 0 0 3px rgba(28, 229, 211, 0.35);
}

.estimator-result {
  border-top: 4px solid var(--clr-teal);
}

.estimator-result h3 {
  margin-bottom: var(--space-4);
}

.estimator-result h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-teal-dark);
  margin: var(--space-5) 0 var(--space-3);
}

.estimate-facts {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
}

.estimate-facts div {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-1);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
}

.estimate-facts dt {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clr-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.estimate-facts dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--clr-navy);
}

.estimate-docs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

.estimate-docs li {
  position: relative;
  padding-left: 1.8rem;
}

.estimate-docs li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--clr-teal-soft);
  color: var(--clr-teal-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

.estimator-note {
  font-size: var(--fs-sm);
  color: var(--clr-muted);
  margin-top: var(--space-4);
}

/* --- 18f. Back-to-top button ------------------------------------------------ */
.back-to-top {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 60;
  width: 48px;
  height: 48px;
  border: 2px solid var(--clr-gold);
  border-radius: 50%;
  background: var(--clr-navy);
  color: var(--clr-gold);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition),
              visibility var(--transition), background-color var(--transition),
              color var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--clr-gold);
  color: var(--clr-navy);
}

/* --- 18g. Wider layouts for the new components ------------------------------- */
@media (min-width: 600px) {
  .estimate-facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .estimator-layout {
    grid-template-columns: 1fr 1.4fr;
  }
}

@media print {
  .back-to-top {
    display: none;
  }

  .accordion-panel {
    display: block !important;   /* print every answer */
  }
}
