/* =========================================================
   QUANTONIC LIMITED — Contact Page Stylesheet
   ========================================================= */

:root {
  --blue-900: #01305e;
  --blue-700: #01488a;
  --blue-600: #0a5aa3;
  --cyan-500: #12bfd0;
  --cyan-400: #14c8d7;
  --cyan-600: #08adc0;
  --green-500: #88ba26;
  --green-600: #729e1c;
  --ink: #0e1b24;
  --steel-600: #4c5a66;
  --steel-400: #7c8993;
  --steel-200: #c7d0d6;
  --paper: #f6f7f5;
  --paper-dim: #eef1ee;
  --line: #d8dedb;
  --white: #ffffff;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1180px;
  --radius: 12px;
}

/* =========================================================
   RESET & BASE STYLES
   ========================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image: 
    radial-gradient(ellipse 900px 520px at 6% -8%, rgba(10, 90, 163, 0.06), transparent 60%),
    radial-gradient(ellipse 760px 520px at 100% 6%, rgba(136, 186, 38, 0.07), transparent 55%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.container {
  width: 92%;
  max-width: var(--container);
  margin: 0 auto;
}

/* =========================================================
   HEADER & NAVIGATION
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 999;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  height: 95px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  width: 180px;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 42px;
}

.nav-links a {
  color: #142b72;
  font-weight: 600;
  font-size: 17px;
  position: relative;
  transition: color 0.2s ease;
}
.nav-links a.active {
  color: var(--blue-700);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  background: var(--cyan-400);
  transition: width 0.35s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}


.book-btn {
  background: var(--cyan-400);
  color: var(--white);
  padding: 16px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.book-btn span {
  margin-left: 8px;
}

.book-btn:hover {
  background: var(--cyan-600);
  transform: translateY(-2px);
}

/* =========================================================
   PAGE HERO
   ========================================================= */

.page-hero {
  padding: 150px 0 50px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.crumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--steel-400);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  color: var(--blue-900);
  margin-bottom: 16px;
}

.page-hero p {
  max-width: 65ch;
  color: var(--steel-600);
  font-size: 17px;
  line-height: 1.7;
}

/* =========================================================
   CONTACT SECTION & GRID
   ========================================================= */

.contact {
  padding: 80px 0 100px;
  background: var(--paper-dim);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

/* --- Left: Contact Info Box --- */
.contact-info {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 10px 30px rgba(1, 48, 94, 0.04);
}

.contact-info h3 {
  color: var(--blue-900);
  font-size: 22px;
  margin-bottom: 12px;
}

.contact-row {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.contact-row:first-of-type {
  margin-top: 16px;
  padding-top: 0;
  border-top: none;
}

.contact-row .k {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--steel-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.contact-row .v {
  font-size: 15.5px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.6;
}

.contact-row .v a {
  color: var(--blue-700);
  transition: color 0.2s ease;
}

.contact-row .v a:hover {
  color: var(--green-600);
}

.map-frame {
  margin-top: 28px;
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: 8px;
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 200px;
  border: 0;
}

/* Send Note Animation Box */
.contact-info .send-note {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 18px;
  align-items: center;
}

.send-animation {
  flex-shrink: 0;
}

.contact-info .send-note p {
  font-size: 13px;
  color: var(--steel-600);
  line-height: 1.6;
}

/* --- Right: Contact Form --- */
.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 10px 30px rgba(1, 48, 94, 0.04);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel-400);
  margin-bottom: 8px;
  font-weight: 500;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--steel-200);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  transition: all 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue-700);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(1, 72, 138, 0.1);
}

/* Buttons */
.btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-accent {
  background: var(--green-500);
  color: var(--blue-900);
  font-weight: 600;
}

.btn-accent:hover {
  background: var(--green-600);
  color: var(--white);
  transform: translateY(-2px);
}

.form-note {
  font-size: 12px;
  color: var(--steel-400);
  margin-top: 12px;
}

.form-status {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.form-status.show {
  display: block;
}

.form-status.ok {
  color: var(--green-600);
}

.form-status.error {
  color: #b3311c;
}

/* =========================================================
   FOOTER SECTION
   ========================================================= */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
  height: 30px;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.5);
  max-width: 34ch;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--green-500);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  flex-wrap: wrap;
  gap: 12px;
}

/* =========================================================
   KEYFRAME ANIMATIONS
   ========================================================= */

@keyframes fly {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(10px, -16px) rotate(-4deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

.fly-icon {
  animation: fly 4.5s ease-in-out infinite;
}

.pulse-dot {
  animation: pulseDot 2.2s ease-in-out infinite;
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */

@media (max-width: 960px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 32px;
  }
}

@media (max-width: 768px) {
  .site-header .container {
    height: 70px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo img {
    width: 120px;
  }

  .book-btn {
    padding: 8px 14px;
    font-size: 11.5px;
    white-space: nowrap;
    border-radius: 6px;
    height: 36px;
  }

  .book-btn span {
    display: none;
  }

  .page-hero {
    padding-top: 110px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-info,
  .contact-form {
    padding: 28px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   MOBILE HEADER & NAVIGATION FIX
   ========================================================= */

@media (max-width: 768px) {
  .site-header .container {
    height: 70px;
    padding: 0 20px;
    flex-direction: row; /* Keep elements in a single horizontal row */
    justify-content: space-between;
    align-items: center;
  }

  .logo img {
    width: 130px; /* Scale down logo to prevent overflow */
  }

  .book-btn {
    padding: 10px 16px;
    font-size: 12px;
    border-radius: 8px;
  }

  /* Hide raw link list from exploding the header height */
  .navbar {
    display: none; 
  }

  /* Slide-down mobile drawer menu when toggled active */
  .navbar.active {
    display: block;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--line, #d8dedb);
    padding: 20px 0;
    z-index: 998;
  }

  .navbar.active .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .navbar.active .nav-links a {
    font-size: 16px;
  }
.nav-links a.active {
  color: var(--blue-700);
}



  /* Hamburger Toggle Button */
  .mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
  }

  .mobile-toggle span {
    width: 24px;
    height: 2.5px;
    background-color: #142b72;
    border-radius: 2px;
    transition: 0.3s;
  }
}

@media (min-width: 769px) {
  .mobile-toggle {
    display: none; /* Hide toggle on desktop */
  }
}


/* Fix for Book Consultation button on mobile */
@media (max-width: 768px) {
  .site-header .container {
    height: 70px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .logo img {
    width: 110px; /* Scale logo down slightly to give room */
    height: auto;
  }

  .book-btn {
    padding: 8px 14px;        /* Compact padding */
    font-size: 11.5px;        /* Slightly smaller text */
    white-space: nowrap;      /* Prevents text from breaking into 2 lines */
    border-radius: 6px;       /* Sleek corner rounding */
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;             /* Fixed neat height */
  }

  .book-btn span {
    display: none;            /* Hides arrow icon on mobile to save space */
  }
}

/* =========================================================
   TABLET RESPONSIVENESS (max-width: 1024px)
   ========================================================= */

@media (max-width: 1024px) {
    .services-hero-blue {
        width: 48%; /* Widen slightly on tablets to give text more room */
        padding-left: 35px; /* Slightly tighten internal padding */
    }
}


/* =========================================================
   MOBILE RESPONSIVE CHANGES (max-width: 768px)
   Recreates that specific 'nested card' mobile reference design
   ========================================================= */

@media (max-width: 768px) {
    .services-hero-blue {
        /* 
           1. Mobile-Specific 'Nested Card' Style:
           Remove complex desktop overlay and absolute positioning.
           Switch to stacking the panel cleanly after the image,
           using negative margins to achieve that specific "nested box" mobile look.
        */
        position: static; /* Remove desktop positioning context */
        width: 90%; /* Center the box and allow gutter on mobile */
        max-width: 100%; /* prevent explosion of width context */
        height: auto; /* allow text to flow naturally without fixed context constraint */
        
        /* Key: Negative top margin to overlap the image, creating 'nested' look */
        margin: 0 auto 0; 
        
        /* 2. Sizing & Alignment on Mobile */
        height: 58%; /* compact mobile panel height */
        padding: 0 25px 25px; /* Compact internal spacing on mobile */
        border-radius: 12px; /* Sleek, consistent smaller border radius for mobile card */
        
        /* Remove desktop breakout adjustments on mobile */
        transform: none; 
        display: block; /* Stack after image cleanly on mobile context */
    }
}


/* =========================================================
   SMALL MOBILE (max-width: 480px)
   ========================================================= */

@media (max-width: 480px) {
    .services-hero-blue {
        height: 60%; /* More compact mobile image base */
        padding: 0 20px 20px; /* Tightest mobile content breathing room */
        border-radius: 12px; /* Set sleek, standard mobile radius baselayer on small mobile */
    }
}

/* =========================================================
   BLUE PANEL (Desktop & Core)
   ========================================================= */
.services-hero {
    position: relative;
    width: calc(100% - 72px);
    max-width: 1820px;
    height: 500px;
    margin: 125px auto 45px;
    border-radius: 25px;
    overflow: hidden;
    background: #1e3285;
}

.services-hero-blue {
    
    display: flex;
    align-items: flex-end; /* Pushes text content to the bottom */
    padding: 0 42px 28px;
    position: absolute;
    left: 0;
    top: 0;
    width: 44%;
    height: 100%;
    background: #1e3285;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    padding: 0 42px 28px;
    /*
       Creates the large curved bottom-right edge
    */
    border-radius: 0 0 65% 0; /* Internal breathing room, with more space at bottom */
}
.services-hero-image {

    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 1;
}


.services-hero-image img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    object-position: center;

    display: block;
}

.services-hero-blue h1 {

    margin: 0;

    color: #ffffff;

    font-family: var(--font-display);

    font-size: clamp(4rem, 5.5vw, 6rem);

    font-weight: 700;

    line-height: 1;

    letter-spacing: -2px;
}

.services-scroll {

    position: absolute;

    right: 32px;
    bottom: 28px;

    z-index: 5;

    color: #ffffff;

    font-size: 34px;

    font-weight: 300;

    line-height: 1;

    animation: servicesArrow 2s ease-in-out infinite;
}


@keyframes servicesArrow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .services-hero {

        width: calc(100% - 40px);

        height: 500px;

        margin-top: 115px;
    }

    .services-hero-blue {

        width: 48%;

        padding-left: 35px;
    }

    .services-hero-blue h1 {

        font-size: 4rem;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .services-hero {

        width: calc(100% - 30px);

        height: 430px;

        margin-top: 110px;

        border-radius: 20px;
    }


    .services-hero-image {

        width: 100%;
    }


    .services-hero-blue {

        width: 100%;

        height: 58%;

        align-items: flex-end;

        padding: 0 25px 25px;
        /*
           Curve moves to the bottom-right
        */
        border-radius: 0 0 55% 0;
        background: #1e3285;
    }


    .services-hero-blue h1 {

        font-size: 3.2rem;

        letter-spacing: -1px;
    }


    .services-scroll {

        right: 20px;

        bottom: 20px;

        font-size: 28px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .services-hero {

        height: 380px;

        width: calc(100% - 20px);

        border-radius: 16px;
    }


    .services-hero-blue {

        height: 60%;

        padding: 0 20px 20px;
    }


    .services-hero-blue h1 {

        font-size: 2.7rem;
    }

}

.services-hero-blue {
    position: absolute;

    top: 0;
    left: 0;

    width: 43%;
    height: 100%;

    background: #1e3285;

    z-index: 2;

    display: flex;
    align-items: flex-end;

    padding: 0 42px 25px;

    /*
       The important part:
       creates the large curved bottom-right corner
    */
    border-radius: 0 0 65% 0;
}

.phone-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.phone-input-wrapper .country-prefix {
  position: absolute;
  left: 14px;
  font-size: 15px;
  font-family: var(--font-body, 'Inter', sans-serif);
  color: var(--steel-600, #4c5a66);
  font-weight: 600;
  pointer-events: none; /* Prevents clicks from interfering with the input */
  user-select: none;
}

.phone-input-wrapper input[type="tel"] {
  width: 100%;
  padding: 12px 14px 12px 50px; /* 50px left padding keeps user text clear of the '+44' */
  border: 1px solid var(--line, #d8dedb);
  border-radius: var(--radius, 8px);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 15px;
  color: var(--ink, #0e1b24);
  background-color: var(--white, #ffffff);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phone-input-wrapper input[type="tel"]:focus {
  border-color: var(--cyan-500, #12bfd0);
  outline: none;
  box-shadow: 0 0 0 3px rgba(18, 191, 208, 0.15);
}