/*   CONTENTS        
 --global, layout, Components, utilities
  1. ROOT (variables, base HTML)
  2. LAYOUT
    2.1 HEADER
    2.2 MAIN
    2.3 FOOTER
  3. COMPONENTS
    3.1 LOGO
    3.2 NAVBAR & MENU
    3.3 BUTTONS
  4. BODY CONTENT
    4.1 WRAPPER / CONTAINERS
    4.2 MASONRY GRID
  5. Utilities
    5.1 MARKDOWN RENDER
    5.2 Animation
    5.3 Lightbox
*/

/* 1. ROOT */
:root {
  --height-header-mobile: 42px;
  --height-header-desktop: 64px;
}

html,
body {
  height: 100%;
  /* overflow: hidden; */
}

html {
  scroll-behavior: smooth !important;
}

/* 2. LAYOUT */
/* 2.1 HEADER */
header {
  position: fixed;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  width: 100vw;
  background-color: var(--color-brand-surface);
  border-bottom: 1px solid var(--color-brand-surface);
}

.header__container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 4px 24px;
  height: var(--height-header-mobile);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100vw;
}

@media screen and (min-width: 991.98px) {
  .header__container {
    padding: 8px 48px;
    height: var(--height-header-desktop);
  }
}

/* 2.2 MAIN */
main {
  margin-top: var(--height-header-mobile);

  @media screen and (min-width: 991.98px) {
    margin-top: var(--height-header-desktop);
  }
}

/* 2.3 FOOTER */
footer {}

.footer-img {
  object-fit: cover;
  width: 100%;
  height: 328px;
  max-height: 750px;
  flex-shrink: 0;
  align-self: stretch;

  @media (min-width: 575.98px) {
    width: 50%;
    height: 500px;
  }

  @media (min-width: 768px) {
    border-top-left-radius: 1000px;
    border-top-right-radius: 1000px;
  }

  @media (min-width: 1024px) {
    width: 576px;
    height: 750px;
  }
}

.footer-divider {
  height: 30px;
  width: 100%;
  border-radius: 0 0 32px 32px;
  background-color: var(--color-brand-surface);

  @media screen and (min-width: 576.98px) {
    height: 80px;
  }
}

/* 3. COMPONENTS */
/* 3.1 LOGO */
.logo {
  display: flex;
  width: 90px;
  max-height: 48px;
  justify-content: center;
  align-items: center;

  @media screen and (min-width: 991.98px) {
    width: 120px;
  }
}

.logo-landing {
  @media screen and (min-width: 991.98px) {
    /* placeholder for desktop overrides */
  }
}

/* 3.2 NAVBAR & MENU */
.navbar {
  width: 100vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-menu {
  position: fixed;
  left: -100%;
  top: var(--height-header-mobile);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  height: 100vh;
  gap: 64px;
  padding-top: 80px;
  padding-left: 24px;
  background-color: var(--color-brand-surface);
  transition: 150ms ease-out;
  text-align: center;
}

@media screen and (min-width: 991.98px) {
  .nav-menu {
    height: auto;
  }
}

.nav-menu.active {
  left: 0;
}

.nav-item {
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--color-brand-neutral-700);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 100%;
  transition: 150ms ease-out;
}

.nav-link:hover {
  color: var(--color-brand-text);
  transition: 150ms ease-in;
}

/* Hamburger */
.hamburger {
  display: block;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--color-brand-text);
  transition: all 150ms ease;
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (min-width: 991.98px) {
  .hamburger {
    display: none;
  }

  .nav-menu {
    position: static;
    flex-direction: row;
    background-color: transparent;
    width: auto;
    gap: 64px;
    left: 0;
    top: auto;
    padding: 0;
    text-align: left;
    transition: none;
    justify-content: space-between;
    align-items: center;
  }
}

/* 3.3 BUTTONS */
/* input.css */
.btn {
  /* Structural button class (replacement for Tailwind utilities)
     Usage: class="btn" or combined with .btn--outline */

  z-index: 10;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  /* 16px */
  padding: 1rem 1.5rem;
  /* py-4 px-6 => 16px 24px */
  min-height: 48px;
  width: auto;
  border: none;
  background: transparent;
  transition:
    background-color 100ms ease-in-out,
    color 100ms ease-in-out;
}

.btn--outline {
  /* Outline-style button (adds border and rounded corners) */
  border-radius: 0.25rem;
  /* rounded-sm */
  border: 1px solid #000;
  /* border-black */
  background-color: transparent;
}

.btn--outline:hover,
.btn--outline:focus {
  background-color: rgba(0, 0, 0, 0.08);
  /* hover:bg-black/8 */
}

.btn__icon {
  line-height: 100%;
}

.btn__label {
  line-height: 100%;
}

/* 4. BODY CONTENT */
/* 4.1 WRAPPERS */
.container {
  max-width: 80rem;
  margin: 0 auto;
}

.container-wide {
  max-width: 90rem;
  margin: 0 auto;
}

/* 4.2 MASONRY GRID */
.masonry {
  column-gap: 1rem;
  column-fill: balance;
}

.masonry__item {
  display: inline-block;
  width: 100%;
  margin-bottom: 1rem;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;
  page-break-inside: avoid;
}

.masonry__item img {
  width: 100%;
  height: auto;
  display: block;
  /* border-radius: 0.5rem; */
  object-fit: cover;
}

@media (min-width: 1024px) {
  .columns-4 {
    column-fill: balance;
  }
}

/* 5. UTILITIES */
/* 5.1 MARKDOWN RENDER */
.markdown {
  color: var(--color-brand-text, #111);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial;
  line-height: 1.6;
}

/* headings */
.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--color-brand-heading, #0b1220);
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.markdown h1 {
  font-size: 2.25rem;
}

.markdown h2 {
  font-size: 1.5rem;
}

.markdown h3 {
  font-size: 1.25rem;
}

.markdown p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.markdown ul,
.markdown ol {
  margin: 0.75rem 0 1rem 1.25rem;
}

.markdown a {
  color: #8b5e34;
  text-decoration: underline;
}

.markdown code {
  background: rgba(0, 0, 0, 0.04);
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New",
    monospace;
  font-size: 0.95em;
}

.markdown pre {
  background: #0f1724;
  color: #e6eef8;
  padding: 1rem;
  border-radius: 8px;
  overflow: auto;
  margin-bottom: 1rem;
}

.markdown blockquote {
  border-left: 4px solid rgba(0, 0, 0, 0.08);
  padding-left: 1rem;
  color: rgba(0, 0, 0, 0.7);
  margin: 0.5rem 0 1rem 0;
}

.markdown img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.75rem 0;
}

/* 5.2 Animation */

/* #scroll-container {
  /* everything you want to scroll must be inside this *
  will-change: transform;
  /* optional: avoids blurriness on some GPUs *
  transform: translateZ(0);
} *

/* 5.3 Lightbox */


/*Lightbox*/
/* #lightbox {
  position: fixed;
  z-index: 2000;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
}

#lightbox.active {
  display: flex;
  justify-content: center;
  align-items: center;
} */

/* Custom styles for the lightbox transition and cursor */
.gallery-image {
  cursor: pointer;
  transition: box-shadow 150ms ease-in-out;
}

.gallery-image:hover {
  transition: box-shadow 150ms ease-in-out;
  box-shadow: 0 2px 1px 2px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.30);
}

.lightbox-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.lightbox-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Lightbox container & image sizing (fallback if Tailwind utilities are not present) */
#lightbox-root {
  position: fixed;
  inset: 0;
  /* top:0; right:0; bottom:0; left:0 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  /* matches p-4 */
  background: rgba(0, 0, 0, 0.9);
  z-index: 50;
}

/* The immediate child container should constrain the image size */
#lightbox-root>div {
  /* max-width: 50svw; */
  max-height:75svh;
  height:75svh;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* Ensure the lightbox image fits inside the container */
#lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}