/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  /* Colours */
  --color-light:      #f7f7f7;
  --color-dark:       #000000;
  --color-grey:       #e3e3e3;
  --color-grey-dark:  #a7a7a7;
  --color-hero-bg:    #a9829b;

  /* Typography */
  --font-family:      'Satoshi', sans-serif;
  --font-bold:        700;
  --font-medium:      500;

  /*
    Fluid type: clamp(mobile, fluid-vw, desktop)
    h2: 40px (mobile) → 48px (desktop), scales 800–960px viewport
    h3: 24px (mobile) → 32px (desktop), scales 720–960px viewport
    Tracking stays in em so it scales proportionally for free.
  */
  --type-h2-size:     clamp(2.5rem, 5vw, 3rem);      /* 40 → 48px */
  --type-h2-line:     clamp(3rem, 6vw, 3.625rem);    /* 48 → 58px */
  --type-h2-tracking: -0.01em;

  --type-h3-size:     clamp(1.5rem, 3.333vw, 2rem);  /* 24 → 32px */
  --type-h3-line:     clamp(2rem, 4vw, 2.5rem);      /* 32 → 40px */
  --type-h3-tracking: -0.02em;

  --type-h4-size:     1.5rem;     /* 24px */
  --type-h4-line:     2rem;       /* 32px */
  --type-h4-tracking: -0.02em;

  --type-body-size:    1.125rem;  /* 18px */
  --type-body-line:    1.5rem;    /* 24px */
  --type-body-tracking: -0.02em;

  --type-btn-size:    1rem;       /* 16px */
  --type-btn-line:    1.25rem;    /* 20px */
  --type-btn-tracking: -0.01em;

  /* Spacing */
  --space-xs:   0.5rem;   /*  8px */
  --space-sm:   1rem;     /* 16px */
  --space-md:   1.5rem;   /* 24px */
  --space-lg:   2rem;     /* 32px */
  --space-xl:   4rem;     /* 64px */

  /* Shape */
  --radius-card:    1rem;
  --radius-card-lg: 1.5rem;
  --radius-pill:    6.25rem;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background-color: var(--color-light);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Page ───────────────────────────────────────────────────────────────── */
.page {
  min-height: 100dvh;
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background-color: var(--color-light);
  position: relative;
  opacity: 0;
}

/* ─── Social nav ─────────────────────────────────────────────────────────── */
.social {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  display: flex;
  gap: var(--space-xs);
  z-index: 10;
  list-style: none;
}

.social_link {
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-btn-size);
  line-height: var(--type-btn-line);
  letter-spacing: var(--type-btn-tracking);
  color: var(--color-dark);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.social_link:hover {
  opacity: 0.5;
}

/* ─── Hero panel ─────────────────────────────────────────────────────────── */
.hero {
  flex: 1 0 0;
  min-width: 0;
  background-color: var(--color-hero-bg);
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
}

.hero_bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero_bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero_bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2),
    rgba(0, 0, 0, 0.4)
  );
}

.hero_bg-dim {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

/*
  Scattered headline — each word is absolutely positioned within .hero_text.
  .hero_text covers the full hero height minus the logo zone at the bottom.
  Positions use percentages so they scale with any hero size.
  A 32px (2rem) safe zone is enforced on all sides via the chosen % values,
  verified at the minimum desktop hero width (~456px at the 60rem breakpoint).
*/
.hero_text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* reserve space for logo (4rem) + its bottom padding (2rem) */
  bottom: calc(var(--space-xl) + var(--space-lg));
  z-index: 1;
}

.hero_word {
  position: absolute;
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-h2-size);
  line-height: var(--type-h2-line);
  letter-spacing: var(--type-h2-tracking);
  color: var(--color-light);
  white-space: nowrap;
}

/* Scatter coordinates — ordered so the sentence reads naturally top→bottom */
.hero_word--1 { left: 7%;  top: 5%;  }
.hero_word--2 { left: 38%; top: 19%; }
.hero_word--3 { left: 55%; top: 37%; }
.hero_word--4 { left: 7%;  top: 55%; }
.hero_word--5 { left: 34%; top: 72%; }

/* Logo pinned to bottom-centre, outside the word scatter zone */
.hero_logo {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  width: 8.0625rem;  /* 129px */
  height: var(--space-xl);  /* 64px */
  z-index: 1;
}

.hero_logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ─── Content panel ──────────────────────────────────────────────────────── */
.content {
  flex: 1 0 0;
  min-width: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

/* ─── Contact block ──────────────────────────────────────────────────────── */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  width: 21.1875rem; /* 339px */
}

.contact_details {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  width: 100%;
}

.contact_address {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.contact_address-line {
  display: block;
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-h3-size);
  line-height: var(--type-h3-line);
  letter-spacing: var(--type-h3-tracking);
  color: var(--color-dark);
  text-align: center;
}

.contact_links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  width: 100%;
}

.contact_link {
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-h3-size);
  line-height: var(--type-h3-line);
  letter-spacing: var(--type-h3-tracking);
  color: var(--color-dark);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.contact_divider {
  flex: 1;
  height: 0.375rem; /* 6px */
  display: block;
  min-width: 0;
}

/* ─── CTA Button ─────────────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-grey);
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-btn-size);
  line-height: var(--type-btn-line);
  letter-spacing: var(--type-btn-tracking);
  color: var(--color-dark);
  transition: background-color 0.2s ease;
}

.button:hover {
  background-color: #d2d2d2;
}

.button_label {
  white-space: nowrap;
}

.button_icon {
  display: block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* ─── Services overlay ───────────────────────────────────────────────────── */

/*
  .services sits inside .hero, filling it completely.
  It is hidden (autoAlpha 0) until the transition fires.
  The 3-column grid mirrors the Figma column layout:
    col 1 = 13.875rem (222px)  "Services" heading
    col 2 = 13.875rem (221px)  services list
    col 3 = 1fr               description + CTA
  with 7.375rem (118px) horizontal padding on each side.
  At the Figma canvas width of 1440px this gives col 3 ≈ 696px ≈ Figma's 695px.
*/
.services {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.btn-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1;  /* always above .services_grid regardless of its position value */
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--color-light);
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-btn-size);
  line-height: var(--type-btn-line);
  letter-spacing: var(--type-btn-tracking);
  transition: opacity 0.2s ease;
}

.btn-close:hover {
  opacity: 0.55;
}

.btn-close_label {
  color: var(--color-light);
}

.btn-close_icon {
  display: block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.services_grid {
  display: grid;
  grid-template-columns: 13.875rem 13.875rem 1fr;
  column-gap: var(--space-sm);
  align-items: start;
  padding: 6rem 7.375rem 0;
}

.services_heading {
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-h3-size);
  line-height: var(--type-h3-line);
  letter-spacing: var(--type-h3-tracking);
  color: var(--color-light);
}

.services_list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.services_item {
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-h3-size);
  line-height: var(--type-h3-line);
  letter-spacing: var(--type-h3-tracking);
  color: var(--color-light);
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.services_item--active {
  opacity: 1;
}

.services_item:hover {
  opacity: 0.8;
}

.services_detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: flex-start;
}

.services_description {
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-h2-size);
  line-height: var(--type-h2-line);
  letter-spacing: var(--type-h2-tracking);
  color: var(--color-light);
}

/* Overflow mask injected around each SplitText line — clips the slide-up reveal */
.services_line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
}

/* ─── Responsive — tablet / mobile ──────────────────────────────────────── */
@media (max-width: 60rem) {
  .page {
    flex-direction: column;
  }

  /* Restore flex layout so the hero has natural height on mobile */
  .hero {
    min-height: 26rem;   /* ~416px — matches Figma's 402px canvas height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--space-lg);
  }

  /* Social links move to bottom-centre on mobile (Figma spec) */
  .social {
    top: auto;
    right: auto;
    bottom: var(--space-sm);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  /* Unpin hero_text — becomes a flex child that takes remaining height */
  .hero_text {
    position: relative;
    top: unset;
    left: unset;
    right: unset;
    bottom: unset;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
  }

  /* Words stack in reading order, sized to content so JS can scatter them on X */
  .hero_word {
    position: static;
    white-space: nowrap;
    align-self: flex-start;  /* don't stretch to container width — JS measures real word width */
  }

  .hero_word--1,
  .hero_word--2,
  .hero_word--3,
  .hero_word--4,
  .hero_word--5 {
    left: unset;
    top: unset;
  }

  /* Logo returns to normal flow, centered via flex parent */
  .hero_logo {
    position: relative;
    bottom: unset;
    left: unset;
    transform: none;
    align-self: center;
  }

  .content {
    padding: var(--space-xl) var(--space-lg);
  }

  .contact {
    width: 100%;
  }

  /* ─── Mobile services layout ─── */

  /*
    On mobile, the 3-column grid becomes a stacked absolute layout inside .services,
    matching the Figma spec: heading (top 32px), horizontal list (top 80px),
    description + CTA (top 160px).
  */
  .services_grid {
    display: block;
    padding: 0;
    position: relative;
    height: 100%;
  }

  .services_heading {
    position: absolute;
    top: 2rem;
    left: 1rem;
  }

  /*
    Horizontal scrolling row — top/bottom border strip, right-edge gradient mask
    to hint at overflow items (matches Figma mask-image approach).
  */
  .services_list {
    position: absolute;
    top: 5rem;
    left: 1rem;
    right: 1rem;
    flex-direction: row;
    overflow-x: auto;
    gap: 1rem;
    padding: 0.5rem 0;
    border-top: 2px solid rgba(247, 247, 247, 0.4);
    border-bottom: 2px solid rgba(247, 247, 247, 0.4);
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
    scrollbar-width: none;
  }

  .services_list::-webkit-scrollbar {
    display: none;
  }

  .services_item {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .services_detail {
    position: absolute;
    top: 10rem;
    left: 1rem;
    right: 1rem;
  }

  /* Description drops to h3 size on mobile (Figma mobile/h3 = 24px) */
  .services_description {
    font-size: var(--type-h3-size);
    line-height: var(--type-h3-line);
    letter-spacing: var(--type-h3-tracking);
  }

  /* Read more button spans full width on mobile */
  .btn-read-more {
    width: 100%;
    justify-content: center;
  }
}

/* ─── Service detail modal ───────────────────────────────────────────────── */

/*
  Absolute inside .hero — scopes the backdrop-filter blur to the hero card
  so the surrounding page border stays crisp (matches Figma overlay placement).
  GSAP controls opacity (autoAlpha) and visibility on the backdrop + wrapper.
*/
.modal {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  pointer-events: none;
  visibility: hidden;
}

/* Blur + dark tint layer — fades in independently via GSAP */
.modal_backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
}

/* Card + close button stacked in a column, right-aligned */
.modal_wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-xs);
  width: 28.625rem;   /* 458px — matches Figma column spec */
  max-width: 100%;
}

.btn-modal-close {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-btn-size);
  line-height: var(--type-btn-line);
  letter-spacing: var(--type-btn-tracking);
  color: var(--color-light);
  transition: opacity 0.2s ease;
}

.btn-modal-close:hover {
  opacity: 0.6;
}

.btn-modal-close_label {
  color: var(--color-light);
}

.btn-modal-close_icon {
  display: block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.modal_card {
  position: relative;
  width: 100%;
  background: var(--color-light);
  border-radius: var(--radius-card-lg);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  /*
    Shrinks to content naturally; only clamps when body text is tall.
    50vh keeps the card well within the screen at any viewport.
  */
  max-height: 50vh;
  overflow: hidden;
}

/*
  Outer: flex child that grows to fill remaining card height.
  overflow:hidden clips the scroll container to this area and also
  provides the containing block for the absolutely-positioned fade.
*/
.modal_card-body-outer {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/*
  Fade: always anchored to the bottom of the VISIBLE clip area.
  position:absolute relative to .modal_card-body-outer, not to the
  scroll content, so it never moves regardless of scroll position.
*/
.modal_card-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background: linear-gradient(to bottom, rgba(247, 247, 247, 0), var(--color-light));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}


/* Category row: "Service ——— PR" */
.modal_card-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.modal_cat {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.modal_cat-label,
.modal_cat-name {
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  letter-spacing: var(--type-body-tracking);
  color: var(--color-grey-dark);
  white-space: nowrap;
}

/* Fixed-width decorative line between "Service" and the service name */
.modal_cat-line {
  width: 6.9375rem;  /* 111px — matches Figma column */
  flex-shrink: 0;
  height: 2px;
  background: var(--color-grey-dark);
  opacity: 0.5;
}

.modal_card-title {
  font-family: var(--font-family);
  font-weight: var(--font-bold);
  font-size: var(--type-h4-size);
  line-height: var(--type-h4-line);
  letter-spacing: var(--type-h4-tracking);
  color: var(--color-dark);
}

/*
  Body-wrap fills the outer container and scrolls its content.
  flex: 1 ensures it takes the full clipped height from the outer.
*/
.modal_card-body-wrap {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 3.5rem;
  scrollbar-width: none;
}

.modal_card-body-wrap::-webkit-scrollbar {
  display: none;
}

.modal_card-text {
  font-family: var(--font-family);
  font-weight: var(--font-medium);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  letter-spacing: var(--type-body-tracking);
  color: var(--color-dark);
}

.modal_card-text + .modal_card-text {
  margin-top: var(--space-md);
}

@media (max-width: 60rem) {
  .modal {
    padding: var(--space-sm);
    align-items: flex-end;
  }

  .modal_wrapper {
    width: 100%;
  }

  .modal_card {
    max-height: 70vh;
    padding: var(--space-lg) var(--space-md);
  }
}
