/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
  --body-colour: hsl(40, 40%, 92%);
  --body-colour-dark: hsl(0, 0%, 22%);
  --container-colour: hsl(40, 30%, 88%);
  --border-colour: hsl(40, 20%, 75%);
  --accent-colour: hsl(25, 100%, 60%);
  --accent-colour-hover: hsl(25, 100%, 50%);
  --text-colour: hsl(0, 0%, 20%);
  --shadow: hsla(210, 9%, 62%, 0.2) 0px 8px 24px;
  --section-gap: clamp(0.75rem, 2vw, 1rem);
  --corner-radius: 0.5em;
  --content-width: 1080px;
  --black: hsl(0, 0%, 0%);
  --off-white: hsl(0, 100%, 99.6%);
  --white: hsl(0, 0%, 100%);
  --border-color-light: hsl(0, 0%, 75%);
  --transition-settings: 0.4s ease;
  --font-weight-regular: 400;
  --breakpoint: 810px;

  /* Font size variables */
  --font-size-top: clamp(2rem, 4vw, 3rem);
  --font-size-mid: clamp(1rem, 2vw + 0.5rem, 1.25rem);
  --font-size-low: clamp(0.95rem, 1.5vw + 0.3rem, 1.1rem);

  /* Animation timing variables */
  --anim-base-delay: 0.3s;
  --anim-duration: 1.4s;
  --anim-hero-stagger-1: 0.7s;
  --anim-hero-stagger-2: 1.4s;
  --anim-content-delay: 2s;

}

/* ========================================
   RESET & GLOBAL STYLES
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.25rem, 2vw + 0.5rem, 1.5rem);
  font-weight: 300;
  background: var(--white);
  color: var(--text-colour);
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}



body::-webkit-scrollbar {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-settings);
}

a:hover {
  opacity: 0.6;
}

a:has(.button):hover {
  opacity: 1;
}

a:visited,
a:active {
  color: inherit;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1 {
  font-size: var(--font-size-top);
  font-weight: 400;
  line-height: 1.2;
}

h2 {
  font-size: var(--font-size-top);
  font-weight: var(--font-weight-regular);
}

.highlight {
  color: var(--accent-colour);
}

p {
  font-size: clamp(1rem, 2vw + 0.5rem, 1.25rem);
}

/* ========================================
   BUTTONS
   ======================================== */

.button {
  padding: 15px 30px;
  border: 2px solid var(--accent-colour);
  background-color: var(--accent-colour);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: var(--corner-radius);
  transition: all var(--transition-settings);
  outline: none;
  position: relative;
  overflow: hidden;
}

.button:hover {
  background: var(--accent-colour-hover);
  border-color: var(--accent-colour-hover);
}

/* ========================================
   IMAGES
   ======================================== */

.image-container {
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--corner-radius);
  background-color: var(--text-colour);
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.image-container img[portrait] {
  width: auto;
  height: 100%;
}

.image-container img[landscape] {
  width: 100%;
  height: auto;
}

/* ========================================
   LAYOUT & CONTAINERS
   ======================================== */

.section {
  display: flex;
  flex-direction: column;
  gap: calc(var(--section-gap) * 2);
  padding: calc(var(--section-gap) * 2);
  justify-content: center;
  align-items: center;
  scroll-margin-top: calc(var(--section-gap) * 5 + 1px);
}

.section:not(.footer.section, .hero.section) {
    min-height: 70vh;
}

.section-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
  background-color: var(--body-colour);
}

.section-container::-webkit-scrollbar {
  display: none;
}

.section-title {
  width: 100%;
  height: fit-content;
}

.section-title h2 {
  padding-bottom: calc(var(--section-gap) * 1);
  text-align: center;
}

.section-title.sticky {
  position: sticky;
  top: calc(var(--section-gap) * 7);
  align-self: start;
}

.section-content {
  max-width: var(--content-width);
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: calc(var(--section-gap) * 2);
}

body.initial-load.home-page .section-content:not(.hero .section-content) {
  animation: appear var(--anim-duration) ease-out calc(var(--anim-base-delay) + var(--anim-content-delay)) backwards;
}

.two-column {
  width: 100%;
  display: grid;
  gap: calc(var(--section-gap) * 2);
  grid-template-columns: 1fr;
}

@media (min-width: 810px) {
  .two-column {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes slideUp {
  from {
    clip-path: inset(0 0 0 0);
  }
  to {
    clip-path: inset(0 0 100% 0);
  }
}

@keyframes slideInFromTop {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ========================================
   NAVIGATION
   ======================================== */

.announcement-banner {
  position: sticky;
  top: 0;
  z-index: 1001;
  background-color: var(--accent-colour);
  color: var(--white);
  text-align: center;
  padding: calc(var(--section-gap) * 1);
}

.announcement-banner p {
  margin: 0;
  font-size: var(--font-size-low);
  font-weight: 400;
}

.nav-bar.sticky-nav {
  z-index: 1000;
  background-color: var(--body-colour);
  position: sticky;
  top: 0;
}

.nav-content {
  padding: calc(var(--section-gap) * 2);
  height: calc(var(--section-gap) * 5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-content.initial-load {
  animation: slideInFromTop 0.6s ease-out var(--anim-base-delay) backwards;
}

.nav-menu {
  display: flex;
  gap: calc(var(--section-gap)*2);
  align-items: left;
}

.nav-links {
  display: flex;
  gap: calc(var(--section-gap)*2);
}

.nav-links a {
  color: var(--text-colour);
  text-decoration: none;
  font-size: clamp(0.95rem, 1.5vw, 1rem);
  transition: opacity var(--transition-settings);
    -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: opacity;
}

.nav-links a:hover {
  opacity: 0.6;
}

.nav-logo img {
  height: 2rem;
  display: block;
}

.burger-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
  width: 24px;
  height: 18px;
}

.burger-menu span {
  width: 24px;
  height: 2px;
  background-color: var(--text-colour);
  transition: all var(--transition-settings);
}

.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg);
  position: absolute;
  top: 8px;
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg);
  position: absolute;
  top: 8px;
}

@media (max-width: 810px) {
  .burger-menu {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: calc(var(--section-gap) * 8);
    left: 0;
    right: 0;
    background-color: var(--body-colour);
    flex-direction: column;
    padding: calc(var(--section-gap) * 2);
    padding-bottom: calc(var(--section-gap) * 3);
    gap: calc(var(--section-gap) * 3);
    display: none;
    clip-path: inset(0 0 0 0);
    animation: slideDown 0.3s ease-out;
  }

  .nav-menu.closing {
    display: flex;
    animation: slideUp 0.3s ease-in forwards;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    gap: calc(var(--section-gap) * 3);
  }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero.section {
  min-height: 70vh;
}

.hero .section-content {
  align-items: flex-start;
}

.hero-grid {
  align-items: center;
  gap: calc(var(--section-gap) * 4);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: calc(var(--section-gap) * 2);
  align-items: flex-start;
}

.hero-description {
  font-size: var(--font-size-mid);
  font-weight: 300;
  line-height: 1.5;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--corner-radius);
}

@media (max-width: 810px) {
  .hero-image img {
    max-width: 500px;
  }
}

body.initial-load .hero-title {
  animation: appear var(--anim-duration) ease-out calc(var(--anim-base-delay) + var(--anim-hero-stagger-1)) backwards;
}

body.initial-load .hero-description {
  animation: appear var(--anim-duration) ease-out calc(var(--anim-base-delay) + var(--anim-hero-stagger-1)) backwards;
}

body.initial-load .hero.section .button {
  animation: appear var(--anim-duration) ease-out calc(var(--anim-base-delay) + var(--anim-hero-stagger-2)) backwards;
}

body.initial-load .hero-image img {
  animation: appear var(--anim-duration) ease-out var(--anim-base-delay) backwards;
}

@media (max-width: 810px) {
  .hero-grid {
    display: flex;
    flex-direction: column-reverse;
  }
}

/* ========================================
   TESTIMONIALS SECTION
   ======================================== */

.testimonials .section-content {
  position: relative;
}

.testimonial-carousel {
  display: flex;
  width: 100%;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  border-radius: var(--corner-radius);
  scroll-snap-type: x mandatory;
}

.testimonial-carousel::-webkit-scrollbar {
  display: none;
}

.testimonial-group {
  display: flex;
  align-items: stretch;
  gap: calc(var(--section-gap) * 2);
  padding-right: calc(var(--section-gap) * 2);
}

.testimonial-card {
  background-color: var(--white);
  padding: calc(var(--section-gap) * 2);
  border-radius: var(--corner-radius);
  min-width: clamp(280px, 40vw, 400px);
  max-width: 400px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--section-gap) * 1);
  scroll-snap-align: start;
}

@media (max-width: 810px) {
  .testimonial-card {
    min-width: min(280px, 90vw);
    max-width: min(320px, 90vw);
  }
}

.testimonial-featured {
  font-size: clamp(1rem, 2vw + 0.5rem, 1.25rem);
  font-weight: 400;
  line-height: 1.4;
}

.testimonial-text {
  font-size: var(--font-size-low);
  font-weight: 300;
  line-height: 1.5;
}

.testimonial-attribution {
  font-size: var(--font-size-low);
  font-weight: 400;
  color: var(--accent-colour);
  margin-top: auto;
}

/* Carousel Pagination */
.carousel-pagination {
  display: flex;
  gap: calc(var(--section-gap) * 1);
  justify-content: center;
  margin-top: calc(var(--section-gap) * 2);
}

.carousel-btn {
  background-color: var(--white);
  border: none;
  color: var(--black);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity var(--transition-settings);
  padding: 0;
  outline: none;
}

.carousel-btn:hover {
  opacity: 0.6;
}

.carousel-btn:active {
  transform: scale(0.95);
}

.carousel-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-btn.disabled:hover {
  opacity: 0.3;
}

.carousel-btn svg {
  width: 24px;
  height: 24px;
}

/* ========================================
   HOW I CAN HELP SECTION
   ======================================== */

.how-i-can-help .section-content {
  max-width: var(--content-width);
}

.help-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--section-gap) * 2);
  width: 100%;
}

@media (min-width: 810px) {
  .help-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.help-item {
  display: flex;
  flex-direction: column;
  gap: calc(var(--section-gap) * 2);
}

.help-text {
  display: flex;
  flex-direction: column;
  gap: calc(var(--section-gap) * 1.5);
}

.help-heading {
  font-size: clamp(1.1rem, 2vw + 0.5rem, 1.5rem);
  font-weight: 400;
  line-height: 1.3;
}

.help-text p {
  font-size: var(--font-size-low);
  font-weight: 300;
  line-height: 1.6;
}



/* ========================================
   FAQs SECTION
   ======================================== */

.faqs .section-content {
  max-width: calc(var(--content-width) * 0.75);
}

.faq-list {
  display: grid;
  gap: calc(var(--section-gap) * 1);
  width: 100%;
}

.faq-item {
  background-color: var(--white);
  border-radius: var(--corner-radius);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: var(--section-gap);
  background-color: var(--white);
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  cursor: pointer;
  font-size: var(--font-size-mid);
  font-weight: var(--font-weight-regular);
  color: var(--black);
  transition: all var(--transition-settings);
}

.faq-arrow {
  flex-shrink: 0;
  margin-left: calc(var(--section-gap) * 2);
  transition: transform 0s;
  color: var(--black);
}

.faq-arrow.rotated {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0s, padding 0s;
  padding: 0 var(--section-gap);
}

.faq-answer.open {
  max-height: 1000px;
  padding: 0 var(--section-gap) var(--section-gap) var(--section-gap);
}

.faq-answer p {
  font-size: var(--font-size-low);
  font-weight: 300;
  line-height: 1.6;
}

.faq-answer a {
  text-decoration: underline;
}

/* ========================================
   CONTACT/GET IN TOUCH SECTION
   ======================================== */

.contact .section-content {
  max-width: calc(var(--content-width) * 0.75);
}

.contact .section-content > p {
  font-size: var(--font-size-mid);
  font-weight: 300;
  line-height: 1.6;
}

.contact-form-container iframe {
  border-radius: var(--corner-radius);
  width: 100%;
  min-height: 600px;
}

/* ========================================
   FOOTER
   ======================================== */

.footer.section {
  background-color: var(--body-colour);
}

.footer.section p {
    font-size: var(--font-size-low);
}

.footer {
  margin-top: auto;
}

/* ========================================
   FLOATING CONTACT BUTTON
   ======================================== */

.floating-contact-button {
  position: fixed;
  bottom: calc(var(--section-gap) * 2);
  left: 50%;
  transform: translate(-50%, 150%);
  opacity: 0;
  z-index: 999;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  pointer-events: none;
}

.floating-contact-button.visible {
  transform: translateX(-50%);
  opacity: 1;
  pointer-events: auto;
}

.floating-contact-button .button {
  margin: 0;
  box-shadow: var(--shadow);
}

/* ========================================
   POLICIES PAGE
   ======================================== */

.policies .section-content {
  max-width: calc(var(--content-width) * 0.75);
}

.toc {
  border-radius: var(--corner-radius);
  margin-bottom: calc(var(--section-gap) * 2);
}

.toc h3 {
  font-size: var(--font-size-low);
  font-weight: var(--font-weight-regular);
  margin-bottom: calc(var(--section-gap) * 1.5);
}

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc > ul > li > ul {
  padding-left: calc(var(--section-gap) * 2);
  margin-top: calc(var(--section-gap) * 0.5);
}

.toc li {
  margin-bottom: calc(var(--section-gap) * 0.75);
}

.toc a {
  color: gray;
  text-decoration: none;
  font-size: var(--font-size-low);
  transition: opacity var(--transition-settings);
}

.toc a:hover {
  opacity: 0.6;
}

/* Policy Content */
.policy-content {
  display: flex;
  flex-direction: column;
  gap: calc(var(--section-gap) * 2);
}

.policy-content section {
  scroll-margin-top: calc(var(--section-gap) * 7);
  max-width: calc(var(--content-width) * 0.75);
}

.policy-content h2 {
  font-size: var(--font-size-mid);
  font-weight: var(--font-weight-regular);
  margin-bottom: calc(var(--section-gap) * 1.5);
  color: var(--text-colour);
}

.policy-content h3 {
  font-size: var(--font-size-mid);
  font-weight: var(--font-weight-regular);
  margin-bottom: calc(var(--section-gap) * 1);
  color: var(--text-colour);
}

.policy-content p {
  font-size: var(--font-size-low);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: calc(var(--section-gap) * 1);
}

.policy-content p:last-child {
  margin-bottom: 0;
}

.policy-content ul {
  list-style-position: outside;
  padding-left: calc(var(--section-gap) * 2);
  margin: 0;
}

.policy-content li {
  font-size: var(--font-size-low);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: calc(var(--section-gap) * 0.75);
}

.policy-content li:last-child {
  margin-bottom: 0;
}