@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap");

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --color-white: #ffffff;
  --color-black: #000000;
  --color-blue: #104ee9;
  --color-lightgrey: #fdfdfd;
}

@font-face {
  font-family: "Causten";
  font-weight: normal;
  /* Specify the desired font weight */
  src: url("./fonts/causten_regular.otf") format("opentype");
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Hide scrollbar for IE, Edge and Firefox */
html {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 6px; /* Width of the scrollbar */
  border-radius: 5px; /* Border radius of the scrollbar */
}

/* Track */
::-webkit-scrollbar-track {
  background: #f1f1f1; /* Color of the track */
  border-radius: 5px; /* Border radius of the track */
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #cac7c7; /* Color of the scrollbar handle */
  border-radius: 5px; /* Border radius of the scrollbar handle */
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #cac7c7; /* Color of the scrollbar handle on hover */
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar {
  display: none;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: var(--color-lightgrey);
  font-family: Causten, sans-serif;
}

@layer utilities {
  .noscript-container {
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .noscript-container .noscript-header {
    width: 100%;
    height: clamp(5rem, 6.25vw + 0rem, 39.063rem);
    padding: clamp(0.0868rem, 0rem + 1.3889vw, 8.6805625rem)
      clamp(0.1736125rem, 0rem + 2.7778vw, 17.3611875rem);
    box-shadow: 0px 4px 34px 0px rgba(0, 0, 0, 0.05);

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .noscript-container .noscript-header .logo-container {
    height: 100%;
    cursor: pointer;
  }

  .noscript-container .noscript-header .logo-container img {
    height: 100%;
    object-fit: contain;
    pointer-events: none;
  }

  .noscript-container .noscript-header .icon-container {
    height: 60%;
    cursor: pointer;
  }

  .noscript-container .noscript-header .icon-container img {
    height: 100%;
    object-fit: contain;
    pointer-events: none;
  }

  .noscript-container .noscript {
    width: 50%;
    height: 100%;
    flex: 1;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    row-gap: clamp(3.75rem, 0.413vw + 3.419rem, 29.25rem);
  }

  .noscript-container .noscript .error-image {
    width: 80%;
  }

  .noscript-container .noscript .error-image img {
    width: 100%;
  }

  .noscript-container .noscript .error-content {
    width: 100%;
    cursor: default;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    row-gap: clamp(0.0868rem, 0rem + 1.3889vw, 8.6805625rem);
  }

  .noscript-container .noscript .error-content .error-content-title {
    width: 100%;
    font-family: Causten, sans-serif;
    color: #000000;
    font-size: clamp(0.1736125rem, 0rem + 2.7778vw, 17.3611875rem);
    font-weight: 600;
    text-align: center;
  }

  .noscript-container .noscript .error-content .error-content-description {
    width: 100%;
    font-family: Causten, sans-serif;
    color: #878787;
    font-size: clamp(0.09548125rem, 0rem + 1.5278vw, 9.548625rem);
    font-weight: 400;
    line-height: clamp(0.1388875rem, 0rem + 2.2222vw, 13.8889375rem);
    text-align: center;
  }

  /* Hide scrollbar for Chrome, Safari and Opera */
  .no-scrollbar::-webkit-scrollbar {
    display: none;
  }

  /* Hide scrollbar for IE, Edge and Firefox */
  .no-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
  }

  .invert-white {
    filter: brightness(0) invert(1);
  }

  .btn:hover > svg path {
    stroke: white;
  }

  .navbar:hover nav div img,
  .navbar:hover nav section,
  .normal-nav nav div img,
  .normal-nav nav section,
  .normal-nav nav a img,
  .normal-nav nav button img,
  .normal-nav nav button {
    filter: none;
  }

  .services {
    animation: drop-in 0.3s ease-in;
  }

  /* Nav item states: active = 2px underline 6px below the label; hover = colour only */
  .nav-item > p {
    position: relative;
  }

  .nav-item[data-active="true"] > p,
  .nav-item[data-active="true"] > .nav-label {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: #244de0;
    text-underline-offset: 6px;
  }

  .nav-item:hover > p {
    color: #244de0;
  }

  .nav-on-blue:not(:hover) .nav-item:hover > p {
    color: #ffffff;
    opacity: 0.8;
  }

  .hoverCard:hover p {
    opacity: 1;
  }

  .hoverCard:hover img {
    filter: brightness(0.5);
  }

  .serviceCard {
    animation: spredAnimation 1s ease-in forwards;
  }

  .side-container a button {
    border-color: var(--color-white);
  }

  .side-container a button svg path {
    stroke: var(--color-white);
  }

  .side-container a button:hover {
    background-color: var(--color-white);
    color: var(--color-blue);
  }

  .side-container a button:hover svg path {
    stroke: var(--color-blue);
  }

  .blur-bg {
    backdrop-filter: blur(12.5px);
  }

  .parent-element {
    z-index: 50 !important;
  }

  @keyframes spredAnimation {
    from {
      transform: translate(0, 0);
    }
    to {
      transform: translate(var(data-translate));
    }
  }

  @keyframes drop-in {
    from {
      top: 90%;
      opacity: 0;
    }
    to {
      top: 100%;
      opacity: 1;
    }
  }
}

.invert-black svg path {
  stroke: black;
}

/* Tablets */
@media screen and (min-width: 769px) and (max-width: 1279px) {
  .noscript-container .noscript-header {
    height: clamp(3.75rem, 4.679vw + 0.007rem, 29.25rem);
  }

  .noscript-container .noscript {
    width: 80%;
  }

  .noscript-container .noscript .error-content {
    row-gap: clamp(0.18229375rem, 0rem + 2.9167vw, 18.22925rem);
  }

  .noscript-container .noscript .error-content .error-content-title {
    font-size: clamp(0.260425rem, 0rem + 4.1667vw, 26.0418125rem);
  }

  .noscript-container .noscript .error-content .error-content-description {
    font-size: clamp(0.15625rem, 0rem + 2.5vw, 15.6250625rem);
    line-height: clamp(0.260425rem, 0rem + 4.1667vw, 26.0418125rem);
  }
}

/* Mobiles */
@media screen and (max-width: 768px) {
  .noscript-container .noscript-header {
    height: clamp(3.75rem, 4.679vw + 0.007rem, 29.25rem);
  }

  .noscript-container .noscript {
    width: 90%;
  }

  .noscript-container .noscript .error-image {
    width: 100%;
  }

  .noscript-container .noscript .error-content {
    row-gap: clamp(0.260425rem, 0rem + 4.1667vw, 26.0418125rem);
  }

  .noscript-container .noscript .error-content .error-content-title {
    font-size: clamp(0.3472375rem, 0rem + 5.5556vw, 34.7224375rem);
  }

  .noscript-container .noscript .error-content .error-content-description {
    font-size: clamp(0.2083375rem, 0rem + 3.3333vw, 20.8334375rem);
    line-height: clamp(0.3125125rem, 0rem + 5vw, 31.2501875rem);
  }
}
/* ---- Motion system (handoff round 3) ---- */
:root {
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 200ms;
  --dur-base: 400ms;
  --dur-slow: 700ms;
  --stagger: 60ms;
  --rise: 16px;
}

/* Rule A: scroll reveals (attributes are set by useReveal on every route change) */
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--rise));
  transition: opacity var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Rule C: one focus style everywhere (white on the blue hero, where blue would vanish) */
:focus-visible {
  outline: 2px solid #244de0;
  outline-offset: 3px;
}
#banner :focus-visible {
  outline-color: #fff;
}

/* Text links: underline appears on hover */
a:not([class*="btn"]) > button {
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
