/*
Theme Name: When Calls The Wild
Theme URI: https://thefreewebsiteguys.com
Author: The Free Website Guys
Author URI: https://thefreewebsiteguys.com
Description: WordPress theme recreation of the Lovable frontend for When Calls The Wild.
Version: 1.0.3
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: when-calls-the-wild
*/

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter/Inter-400.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/inter/Inter-500.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/inter/Inter-600.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/inter/Inter-700.ttf") format("truetype");
}

:root {
  --background: 0 0% 98%;
  --foreground: 0 0% 9%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 9%;
  --primary: 0 0% 9%;
  --primary-foreground: 0 0% 98%;
  --muted: 0 0% 92%;
  --muted-foreground: 0 0% 40%;
  --accent: 0 0% 20%;
  --border: 0 0% 92%;
  --ring: 0 0% 9%;
  --black: 0 0% 0%;
  --white: 0 0% 100%;
  --radius: 0.125rem;
  --shadow-card: 0 0 0 1px hsl(var(--foreground) / 0.03), 0 2px 4px hsl(var(--foreground) / 0.05);
  --shadow-hover: 0 0 0 1px hsl(var(--foreground) / 0.05), 0 8px 24px hsl(var(--foreground) / 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: hsl(var(--border));
}

html {
  scroll-behavior: smooth;
  /* Fixed .site-navigation (~4rem); keeps #gallery / #about / #contact below the bar */
  scroll-padding-top: 4.75rem;
}

@media screen and (min-width: 783px) {
  html:has(body.admin-bar) {
    scroll-padding-top: calc(4.75rem + 32px);
  }
}

@media screen and (max-width: 782px) {
  html:has(body.admin-bar) {
    scroll-padding-top: calc(4.75rem + 46px);
  }
}

body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.admin-bar .site-navigation {
  top: 32px;
}

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

button,
input,
textarea {
  font: inherit;
}

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

::selection {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wctw-page {
  min-height: 100vh;
}

.wctw-container {
  width: min(100% - 3rem, 80rem);
  margin: 0 auto;
}

.wctw-section-spacing {
  padding: 6rem 1.5rem;
}

.wctw-label-text {
  color: hsl(var(--muted-foreground));
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.wctw-gallery-shadow {
  box-shadow: var(--shadow-card);
}

.wctw-gallery-shadow-hover {
  box-shadow: var(--shadow-hover);
}

.site-navigation {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
  background: transparent;
}

.site-navigation.is-scrolled {
  border-bottom-color: hsl(var(--foreground) / 0.05);
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(12px);
}

.site-navigation__inner {
  width: min(100% - 3rem, 80rem);
  height: 4rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-navigation__brand {
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-navigation__links {
  display: none;
  gap: 2rem;
}

.site-navigation__link {
  color: hsl(var(--muted-foreground));
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: color 0.2s ease;
}

.site-navigation__link:hover,
.site-navigation__link:focus-visible {
  color: hsl(var(--foreground) / 0.5);
}

.site-navigation__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  color: hsl(var(--foreground));
  cursor: pointer;
}

.site-navigation__toggle:focus-visible {
  outline: 1px solid hsl(var(--ring) / 0.2);
  outline-offset: 2px;
}

.site-navigation__toggle-icon.is-hidden {
  display: none;
}

.site-navigation__mobile {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  border-bottom: 1px solid transparent;
  background: hsl(var(--background));
  transition: max-height 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.site-navigation__mobile.is-open {
  max-height: 16rem;
  opacity: 1;
  border-bottom-color: hsl(var(--foreground) / 0.05);
}

.site-navigation__mobile-inner {
  width: min(100% - 3rem, 80rem);
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 10rem 1.5rem 10rem;
  overflow: hidden;
}

.hero-section__video,
.hero-section__fallback,
.hero-section__overlay,
.hero-section__overlay-top,
.hero-section__overlay-bottom {
  position: absolute;
  inset: 0;
}

.hero-section__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
  transform: translateZ(0);
}

.hero-section__video.is-loaded {
  opacity: 1;
}

.hero-section__fallback {
  background: hsl(var(--muted));
  transition: opacity 0.7s ease;
}

.hero-section__fallback.is-hidden {
  opacity: 0;
}

.wctw-item-hidden {
  display: none !important;
}

.hero-section__overlay {
  background: hsl(var(--background) / 0.7);
}

.hero-section__overlay-top {
  inset: 0 0 auto;
  height: 50%;
  background: linear-gradient(to bottom, hsl(var(--background)), hsl(var(--background) / 0.8), transparent);
}

.hero-section__overlay-bottom {
  inset: auto 0 0;
  height: 8rem;
  background: linear-gradient(to top, hsl(var(--background)), transparent);
}

.hero-section__inner {
  position: relative;
  z-index: 10;
  width: min(100%, 80rem);
  margin: 0 auto;
}

.hero-section__content {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
  transform: translateY(20px);
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.hero-section__content.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.hero-section__title {
  margin: 0 0 2rem;
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hero-section__text {
  max-width: 42rem;
  margin: 0 auto;
  color: hsl(var(--muted-foreground));
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  line-height: 1.625;
  text-wrap: pretty;
}

.category-panels {
  display: grid;
  width: 100%;
  overflow: hidden;
  grid-template-columns: 1fr;
  grid-auto-rows: 45vw;
}

.category-panels__item {
  position: relative;
  overflow: hidden;
  min-height: 0;
  cursor: pointer;
}

.category-panels__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-panels__shade {
  position: absolute;
  inset: 0;
  background: hsl(var(--black) / 0.3);
  transition: background-color 0.3s ease;
}

.category-panels__item:hover .category-panels__shade {
  background: hsl(var(--black) / 0.5);
}

.category-panels__divider {
  display: none;
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  height: 100%;
  background: hsl(var(--white) / 0.2);
  z-index: 10;
}

.category-panels__content {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 10;
  color: hsl(var(--white));
}

.category-panels__number {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 300;
  opacity: 0.7;
}

.category-panels__title {
  margin: 0.25rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
}

.category-panels__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
}

.about-section {
  padding: 8rem 1.5rem;
  background: hsl(var(--muted));
}

.about-section__grid {
  width: min(100% - 3rem, 80rem);
  margin: 0 auto;
  display: grid;
  gap: 3rem;
  align-items: center;
}

.about-section__media,
.about-section__media-inner {
  aspect-ratio: 1 / 1;
}

.about-section__media-inner {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  transform: translateX(-20px);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.about-section__content {
  transform: translateX(20px);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
  transition-delay: 0.1s;
}

.about-section__media-inner.is-visible,
.about-section__content.is-visible,
.contact-section__inner.is-visible {
  opacity: 1;
  transform: translate(0);
}

.about-section__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-section__title {
  margin: 0.5rem 0 2rem;
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.about-section__text {
  display: grid;
  gap: 1.5rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.625;
  text-wrap: pretty;
}

.about-section__text p {
  margin: 0;
}

.about-section__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-top: 2rem;
}

.about-section__fact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.about-section__fact svg {
  flex: 0 0 auto;
}

.gallery-section__intro {
  margin-bottom: 4rem;
}

.gallery-section__title {
  margin: 0.5rem 0 0;
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  min-width: 0;
  contain: layout style;
}

.gallery-card__figure {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease;
}

.gallery-card:hover .gallery-card__figure {
  box-shadow: var(--shadow-hover);
}

.gallery-card__reveal {
  opacity: 0;
  transform: translateY(20px);
}

.gallery-card__reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery-card:hover .gallery-card__image {
  will-change: transform;
  transform: scale(1.02);
}

.gallery-card__image.is-grayscale {
  filter: grayscale(1);
}

.gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: hsl(var(--foreground) / 0);
  transition: background-color 0.3s ease;
}

.gallery-card:hover .gallery-card__overlay {
  background: hsl(var(--foreground) / 0.05);
}

.gallery-card__meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-card__category {
  margin: 0 0 0.25rem;
}

.gallery-card__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.gallery-card__inquire {
  display: none;
  padding-bottom: 0.125rem;
  border-bottom: 1px solid hsl(var(--foreground) / 0.2);
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1;
  transition: border-color 0.2s ease;
}

@media (min-width: 640px) {
  .gallery-card__inquire {
    display: inline-block;
  }
}

.gallery-card:hover .gallery-card__inquire {
  border-bottom-color: hsl(var(--foreground));
}

.contact-section__inner {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
  transform: translateY(20px);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.contact-section__title {
  margin: 0.5rem 0 1rem;
  font-size: clamp(2.25rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.contact-section__text {
  margin: 0 0 3rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.625;
  text-wrap: pretty;
}

.contact-form {
  display: grid;
  gap: 1rem;
  text-align: left;
}

.contact-form__row {
  display: grid;
  gap: 1rem;
}

.contact-form__field,
.contact-form__textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid hsl(var(--foreground) / 0.05);
  border-radius: var(--radius);
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  font-size: 0.875rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form__field::placeholder,
.contact-form__textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

.contact-form__field:focus,
.contact-form__textarea:focus {
  outline: none;
  border-color: hsl(var(--foreground) / 0.2);
  box-shadow: 0 0 0 1px hsl(var(--foreground) / 0.2);
}

.contact-form__textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.contact-form__submit {
  padding: 1rem 1.5rem;
  border: 0;
  border-radius: var(--radius);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact-form__submit:hover,
.contact-form__submit:focus-visible {
  background: hsl(var(--accent));
}

.contact-form__submit:active {
  transform: scale(0.98);
}

.site-footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid hsl(var(--foreground) / 0.05);
}

.site-footer__top,
.site-footer__bottom {
  width: min(100% - 3rem, 80rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-footer__socials {
  display: flex;
  gap: 2rem;
}

.site-footer__social-link {
  color: hsl(var(--muted-foreground));
  transition: color 0.2s ease;
}

.site-footer__social-link:hover,
.site-footer__social-link:focus-visible,
.site-footer__built-link:hover,
.site-footer__built-link:focus-visible {
  color: hsl(var(--foreground));
}

.site-footer__bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--foreground) / 0.05);
  gap: 1rem;
}

.site-footer__small {
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
  line-height: 1.4;
}

.site-footer__built-link {
  text-decoration: underline;
  transition: color 0.2s ease;
}

.wctw-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 100;
  min-width: 18rem;
  max-width: min(calc(100vw - 2rem), 28rem);
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-hover);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wctw-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 768px) {
  body.admin-bar .site-navigation {
    top: 32px;
  }

  .site-navigation__links {
    display: flex;
  }

  .site-navigation__toggle,
  .site-navigation__mobile {
    display: none;
  }

  .category-panels {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: 1fr;
    grid-auto-rows: unset;
    height: 70vh;
    min-height: 70vh;
  }

  .category-panels__title {
    font-size: 1.25rem;
  }

  .category-panels__divider {
    display: block;
  }

  .about-section__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 5rem;
  }

  .contact-form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    gap: 3rem;
  }

  .site-footer__top,
  .site-footer__bottom {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  body.admin-bar .site-navigation {
    top: 46px;
  }
}
