/* CSS Reset – modern baseline */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Disable text selection */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection for input fields and textareas */
input,
textarea,
[contenteditable] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Local fonts: Suisse Intl - WebM / WebS variants */
@font-face {
  font-family: "Suisse Intl";
  src: local("Suisse Intl Regular"), local("SuisseIntl-Regular"),
    url("public/fonts/SuisseIntl-Regular-WebM.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+000-5FF; /* Latin basic */
}

@font-face {
  font-family: "Suisse Intl";
  src: local("Suisse Intl Regular"), local("SuisseIntl-Regular"),
    url("public/fonts/SuisseIntl-Regular-WebS.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+600-6FF; /* separate range; loads once per cache */
}

/* Body font: SuisseIntl Book */
@font-face {
  font-family: "Suisse Intl Book";
  src: local("Suisse Intl Book"), local("SuisseIntl-Book"),
    url("public/fonts/SuisseIntl-Book.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Color palette */
  --charcoal: #1d1d1d;
  --dark-gray: #181818;
  --darker-gray: #141414;
  --darkest-gray: #0f0f0f;
  --medium-gray: #222222;
  --light-gray: #292929;
  --lighter-gray: #333333;
  --pale-gray: #898989;
  --dim-gray: #696969;
  --off-white: #e9e9e9;
  --white: #eeeeee;
  /* Breakpoints (min-width, rem; 16px base) */
  --bp-xs: 40rem; /* 640 */
  --bp-sm: 48rem; /* 768 */
  --bp-md: 64rem; /* 1024 */
  --bp-lg: 80rem; /* 1280 */
  --bp-xl: 100rem; /* 1600 */
  --bp-2xl: 120rem; /* 1920 */
  /* Layout tokens */
  --col-left: 20rem; /* 320px fixed left column at sm+ */
  /* Spacing scale (rems; base 16px) */
  --spacer-04: 0.25rem;
  --spacer-08: 0.5rem;
  --spacer-12: 0.75rem;
  --spacer-16: 1rem;
  --spacer-20: 1.25rem;
  --spacer-24: 1.5rem;
  --spacer-32: 2rem;
  --spacer-40: 2.5rem;
  --spacer-48: 3rem;
  --spacer-64: 4rem;
  --spacer-80: 5rem;
  --spacer-96: 6rem;
  --spacer-128: 8rem;
  --spacer-160: 10rem;
  --spacer-192: 12rem;
  --spacer-224: 14rem;
  --spacer-256: 16rem;
  --spacer-288: 18rem;
  --spacer-320: 20rem;
  --spacer-384: 24rem;
}

html,
body {
  height: 100%;
  /* Hide scrollbar while maintaining scroll functionality */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

/* Hide scrollbar for webkit browsers (Chrome, Safari, Edge) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  font-family: "Suisse Intl Book", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  background: var(--charcoal);
  color: var(--white);
}

:where(h1, h3, h4, h5, h6) {
  font-family: "Suisse Intl", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

h2 {
  font-family: "Suisse Intl Book", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* Layout */
.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.col--primary {
  max-width: none;
  padding: var(--spacer-16);
  display: flex;
  flex-direction: column;
}

.primary-top {
  display: flex;
  flex-direction: column;
  gap: var(--spacer-32);
}

.button-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--spacer-08);
}

.primary-bottom {
  margin-top: var(--spacer-256);
}

.col--media {
  padding: var(--spacer-08);
  display: flex;
  flex-direction: column;
  gap: var(--spacer-08);
}

/* Use concrete value in media query: custom properties are not allowed here */
@media (min-width: 48rem) {
  .layout {
    flex-direction: row; /* horizontal at sm+ */
    justify-content: flex-start;
    align-items: flex-start;
    gap: max(var(--spacer-64), 5vw);
  }

  .col--primary {
    position: sticky;
    top: 0;
    flex: 0 0 var(--col-left);
    max-width: var(--col-left);
    height: calc(100vh - var(--spacer-16)); /* full viewport minus padding */
    min-height: unset; /* override mobile min-height */
    padding-bottom: 0; /* Remove bottom padding on desktop */
  }

  .primary-bottom {
    margin-top: auto; /* Stick to bottom at sm+ */
  }

  .col--media {
    /* main page scrolls */
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--spacer-08);
  }
}

/* Reduce spacing for extra small screens and under */
@media (max-width: 39.9375rem) {
  /* 639px and under */
  .col--primary {
    padding: var(--spacer-12);
  }

  .services-grid {
    gap: var(--spacer-12);
  }
}

/* Typography */
.col--primary h1 {
  font-size: 1.5rem; /* 24px */
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hero-heading .heading-primary {
  color: var(--white);
}

.hero-heading .heading-secondary {
  color: var(--dim-gray);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacer-08);
  padding: 0.688rem var(--spacer-16);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: border-color 0.25s ease, border-color 1s ease 0s;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap; /* Prevent text wrapping */
  min-width: fit-content; /* Ensure button is wide enough for content */
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--pale-gray);
  outline-offset: 2px;
}

#copy-email {
  border-radius: 999px;
}

a.btn {
  border-radius: 8px;
}

/* Services */
.services-heading {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--white);
  margin: 0 0 var(--spacer-08) 0;
}

.services-grid {
  display: block;
}

.services-list {
  list-style: none;
  padding: 0;
  margin: 0;
  column-count: 2;
  column-gap: var(--spacer-16);
  column-width: auto;
}

.services-list li {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--pale-gray);
  white-space: nowrap;
}

/* Media */
.image-container,
.media-video-container,
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 80rem; /* 1280px */
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
}

@media (min-width: 120rem) {
  /* 1920px */
  .image-container,
  .media-video-container,
  .carousel-container {
    max-width: 90rem; /* 1440px */
  }
}

/* Video container matches image containers */
.media-video-container {
  background: #181818;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* widths are controlled by parent layout; video container follows image containers */

.media-video {
  width: 62.5%; /* 10/16 of container on desktop */
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  background: #181818;
}

/* Mobile images - different aspect ratio for single column layout */
@media (max-width: 768px) {
  .image-container,
  .media-video-container,
  .carousel-container {
    aspect-ratio: 1 / 1; /* Square aspect ratio for mobile */
  }

  .media-video {
    width: 83.333%; /* 10/12 of container on small screens */
  }
}

.media-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Carousel styles */
.carousel-container {
  background: #181818;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62.5%; /* 10/16 of container on desktop */
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.carousel-image.active {
  opacity: 1;
}

@media (max-width: 768px) {
  .carousel-image {
    width: 83.333%; /* 10/12 of container on small screens */
  }
}

/* Show/hide images based on screen size */
.media-image--desktop {
  display: block;
}

.media-image--mobile {
  display: none;
}

@media (max-width: 768px) {
  .media-image--desktop {
    display: none;
  }

  .media-image--mobile {
    display: block;
  }
}
