/* css/global.css */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* CSS VARIABLES */
:root {
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --max-text-width: 700px;
  --color-text: #f5f5f5;
  --color-text-showcase: #fff;
  --color-accent: #a8b2a1;
}

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

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: clamp(16px, 1vw + 0.5rem, 18px);
  color: var(--color-text);
  background: url('../img/ejs-background.png') center/cover no-repeat;
  line-height: 1.7;
  letter-spacing: 0.01em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* CUSTOM SCROLLBAR */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(20, 20, 20, 0.95);
  border-left: 1px solid rgba(168, 178, 161, 0.15);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(168, 178, 161, 0.6) 0%, rgba(168, 178, 161, 0.4) 100%);
  border-radius: 6px;
  border: 2px solid rgba(20, 20, 20, 0.95);
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(168, 178, 161, 0.8) 0%, rgba(168, 178, 161, 0.6) 100%);
}

::-webkit-scrollbar-thumb:active {
  background: var(--color-accent);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 178, 161, 0.5) rgba(20, 20, 20, 0.95);
}

/* TYPOGRAPHY SCALE */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.2;
  text-transform: lowercase;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(40px, 5vw + 1rem, 80px);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(32px, 3vw + 1rem, 48px);
  font-weight: var(--weight-medium);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h3 {
  font-size: clamp(24px, 2vw + 0.5rem, 32px);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
  line-height: 1.3;
}

p {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  line-height: 1.7;
  letter-spacing: 0.01em;
  max-width: var(--max-text-width);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

main {
  flex: 1; /* This makes the main content take up available space, pushing footer down */
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* NAVIGATION */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background: rgba(51, 51, 51, 0.5);
}

.nav .logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.logo img {
  display: block;
  max-height: 120px;
  width: auto;
}

.nav-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  list-style: none;
  width: 100%;
  padding-right: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: clamp(14px, 1vw, 16px);
  letter-spacing: 0.05em;
  text-transform: lowercase;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--color-text);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-links a:hover::after {
  opacity: 1;
}

/* COMMON BUTTON */
.button {
  display: inline-block;
  margin: 2rem auto;
  outline: 0;
  border: 0;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  background: #f5f5f5;
  box-shadow:
    0px 2px 4px rgb(45 35 66 / 40%),
    0px 7px 13px -3px rgb(45 35 66 / 30%),
    inset 0px -3px 0px #d6d6e7;
  height: 48px;
  padding: 0 32px;
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: 16px;
  letter-spacing: 0.05em;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
  text-align: center;
  line-height: 48px;
  width: max-content;
  text-transform: lowercase;
}

.button:hover {
  box-shadow: 0 4px 8px rgb(45 35 66 / 40%), 0 7px 13px -3px rgb(45 35 66 / 30%), inset 0 -3px 0 #d6d6e7;
  transform: translateY(-2px);
}

.button:active {
  box-shadow: inset 0 3px 7px #d6d6e7;
  transform: translateY(2px);
}

/* COMMON FLIP CARD (Used on About & Contact) */
.flip-card {
  background-color: transparent;
  width: 182px;
  height: 300px;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  border-radius: 12px;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;
}

.flip-card-front {
  background-color: #bbb;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-card-back {
  background-color: rgb(126, 126, 126);
  color: #f5f5f5;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-card-front img {
  width: 182px;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
}

.flip-card-back p {
  font-size: 0.85rem;
  padding: 10px;
  margin: 0;
  line-height: 1.4;
}

/* COMMON ART DETAILS (Used on Discipline & Wildlife) */
.art-details {
  display: flex;
  gap: 2rem;
  max-width: 900px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1rem;
  color: #f5f5f5;
  font-family: 'Fira Sans', Arial, sans-serif;
  box-sizing: border-box;
}

.art-details .col-1,
.art-details .col-2 {
  flex: 0 0 20%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}

.art-details .col-3 {
  flex: 1;
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
  min-width: 0;
}

.art-details p {
  margin-bottom: 0.75rem;
  text-transform: lowercase;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* COMMON PICS SECTION (Used on Discipline & Wildlife) */
.pics {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 900px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1rem;
  justify-content: center;
  color: #f5f5f5;
  text-transform: lowercase;
  box-sizing: border-box;
}

.pics .column {
  flex: 1 1 45%;
  min-width: 0;
  max-width: 100%;
}

.pics img {
  display: block;
  margin: 2rem auto 0;
  width: 100%;
  max-width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* COMMON CIRCLE BUTTONS (Used on Discipline & Wildlife) */
.circle-buttons {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 5vw, 6rem);
  margin: 3rem auto;
  max-width: 600px;
  padding: 0 1rem;
}

.circle-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(96px, 18vw, 180px);
  height: clamp(96px, 18vw, 180px);
  border-radius: 50%;
  background: #a8b2a1;
  color: #f5f5f5;
  text-decoration: none;
  box-shadow:
    0px 2px 4px rgb(45 35 66 / 40%),
    0px 7px 13px -3px rgb(45 35 66 / 30%),
    inset 0px -3px 0px #6e4a59;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  gap: 0.25rem;
  padding: 0.25rem;
  box-sizing: border-box;
  overflow: hidden;
}

.circle-button:hover,
.circle-button:focus {
  box-shadow:
    0px 4px 8px rgb(45 35 66 / 40%),
    0px 7px 13px -3px rgb(45 35 66 / 30%),
    inset 0px -3px 0px #6e4a59;
  transform: translateY(-2px);
  outline: none;
}

.circle-button:active {
  box-shadow: inset 0px 3px 7px #6e4a59;
  transform: translateY(2px);
}

.circle-button .arrow {
  font-size: clamp(3rem, 9vw, 5rem);
  line-height: 1;
  user-select: none;
}

.circle-button .label {
  font-size: clamp(0.8rem, 2vw, 1.25rem);
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
}

@media (max-width: 500px) {
  .circle-buttons {
    flex-direction: column;
    gap: 2rem;
    max-width: 140px;
  }
  .circle-button {
    width: 140px;
    height: 140px;
    gap: 0.5rem;
  }
  .circle-button .arrow {
    font-size: 4.5rem;
  }
  .circle-button .label {
    font-size: 1rem;
  }
}

/* FOOTER */
footer {
  background: rgba(51, 51, 51, 0.5);
  color: var(--color-text);
  padding: 1rem;
  font-family: var(--font-body);
  font-size: clamp(14px, 1vw, 15px);
  font-weight: var(--weight-light);
  letter-spacing: 0.01em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer .footer-left,
footer .footer-right {
  display: flex;
  gap: 1rem;
}

footer .footer-left img {
    height: 60px;
}

footer a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: var(--weight-light);
  text-transform: lowercase;
}

/* RESPONSIVE NAVIGATION */
@media (max-width: 768px) {
  .nav {
    padding: 1rem;
    flex-direction: column;
  }

  .nav .logo {
    position: relative;
    left: auto;
    transform: none;
    margin-bottom: 1rem;
  }

  .logo img {
    max-height: 90px;
  }

  .nav-links {
    align-items: center;
    padding-right: 0;
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 0.75rem;
  }

  .logo img {
    max-height: 70px;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }
}

@media (max-width: 600px) {
  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  footer .footer-left,
  footer .footer-right {
    justify-content: center;
    width: 100%;
  }
}

/* CURSOR DUST EFFECT */
.cursor-dust {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 215, 200, 0.5) 50%,
    rgba(255, 215, 200, 0) 100%);
  mix-blend-mode: screen;
  opacity: 0.7;
  transform: translate(-50%, -50%) scale(1);
  z-index: 9999;
  animation: fadeParticle 1.2s forwards ease-out;
}

@keyframes fadeParticle {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x-offset)), calc(-50% + var(--y-offset))) scale(0.3);
  }
}