/* ==============================================
   FRÄULEIN HEDERA – STYLESHEET
   1.  Custom Properties
   2.  Reset & Base
   3.  Typography & Fonts
   4.  Utilities
   5.  Site Header
   6.  Hero
   7.  About
   8.  FAQ
   9.  Gallery
   10. Lightbox
   11. Contact
   12. Site Footer
   13. Responsive · Tablet  ≥ 640px
   14. Responsive · Desktop ≥ 1024px
============================================== */


/* ==============================================
   0. INTRO ANIMATION
============================================== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 500;
  cursor: pointer;
  animation: intro-fade-out 1.0s ease-in 0.8s forwards;
}

@keyframes intro-fade-out {
  to { opacity: 0; visibility: hidden; }
}

.hero__logo         { animation: hero-fade      1.2s ease-out 0.6s both; }
.hero__title        { animation: hero-fade-rise 0.9s ease-out 1.8s both; }
.hero__tagline      { animation: hero-fade-rise 0.9s ease-out 2.2s both; }
.hero__inner > .btn { animation: hero-fade-rise 0.9s ease-out 2.6s both; }

@keyframes hero-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes hero-fade-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Skip animation entirely for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  .hero__logo,
  .hero__title,
  .hero__tagline,
  .hero__inner > .btn { animation: none !important; opacity: 1 !important; transform: none !important; }
}


/* ==============================================
   1. CUSTOM PROPERTIES
============================================== */
:root {
  --color-dark:       #0A1113;
  --color-accent:     #6D9B89;
  --color-light:      #DAE2DA;
  --color-dark-60:    rgba(10, 17, 19, 0.60);
  --color-dark-90:    rgba(10, 17, 19, 0.92);
  --color-accent-dim: rgba(109, 155, 137, 0.20);

  --font-heading:    'norsebold', serif;
  --font-sub:        'norseregular', serif;
  --font-body:       'Segoe UI', Arial, sans-serif;

  --header-height: 64px;
  --container-max: 1200px;
  --section-pad:   5rem;
  --radius:        4px;
  --transition:    200ms ease;
}


/* ==============================================
   2. RESET & BASE
============================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: var(--header-height);
}

body {
  background-color: var(--color-dark);
  color: var(--color-light);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

ul {
  list-style: none;
}

[hidden] {
  display: none !important;
}


/* ==============================================
   3. TYPOGRAPHY & FONTS
============================================== */
@font-face {
  font-family: 'norseregular';
  src: url('resources/norse-webfont.woff2') format('woff2'),
       url('resources/norse-webfont.woff')  format('woff');
  font-weight: normal;
  font-style:  normal;
  font-display: swap;
}

@font-face {
  font-family: 'norsebold';
  src: url('resources/norsebold-webfont.woff2') format('woff2'),
       url('resources/norsebold-webfont.woff')  format('woff');
  font-weight: normal;
  font-style:  normal;
  font-display: swap;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--color-light);
}

h1 { font-size: clamp(2.5rem, 8vw, 5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }


/* ==============================================
   4. UTILITIES
============================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-accent);
}

.section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--color-accent);
  margin: 0.75rem auto 0;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2.25rem;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  border: 1px solid transparent;
}

.btn:hover,
.btn:focus-visible {
  background-color: var(--color-dark);
  color: var(--color-accent);
  border-color: var(--color-accent);
  outline: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn--outline {
  background-color: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border-color: var(--color-accent);
}



/* ==============================================
   5. SITE HEADER
============================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-height);
  transition: background-color var(--transition);
}

.site-header.is-scrolled {
  background-color: rgba(10, 17, 19, 0.97);
  border-bottom: 1px solid rgba(109, 155, 137, 0.15);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-inline: 1.25rem;
  max-width: var(--container-max);
  margin-inline: auto;
}

.site-header__logo img {
  width: 36px;
  height: 36px;
  transition: filter var(--transition);
}

.site-header__logo:hover img,
.site-header__logo:focus-visible img {
  filter: brightness(1.4);
  outline: none;
}

/* Desktop nav – hidden on mobile, shown via media query */
.site-header__nav {
  display: none;
  gap: 2rem;
}

/* Mobile nav overlay – activated by JS */
.site-header__nav.is-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background-color: var(--color-dark);
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  z-index: 99;
}

.nav__link {
  font-family: var(--font-sub);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  transition: color var(--transition);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--color-light);
  outline: none;
}

.site-header__social {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.site-header__social a {
  color: var(--color-accent);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.site-header__social a:hover,
.site-header__social a:focus-visible {
  color: var(--color-light);
  outline: none;
}

/* Hamburger button */
.site-header__menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 4px;
  width: 34px;
}

.site-header__menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-accent);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.site-header__menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header__menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.site-header__menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ==============================================
   6. HERO
============================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  background-color: var(--color-dark);
  background-image: url('resources/pexels-michal-osinski-3454270-scaled.jpg');
  background-size: cover;
  background-position: center;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-dark-60);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 1.25rem;
}

.hero__logo {
  width: clamp(80px, 18vw, 130px);
  height: auto;
  margin-bottom: 0.25rem;
}

.hero__title {
  color: var(--color-accent);
}

.hero__tagline {
  font-family: var(--font-sub);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--color-accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}


/* ==============================================
   7. ABOUT
============================================== */
.about {
  padding-block: var(--section-pad);
}

.about__inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
}

.about__photo {
  width: 100%;
  max-width: 360px;
  flex-shrink: 0;
}

.about__photo img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius);
  border: 1px solid var(--color-accent-dim);
}

.about__content h2 {
  margin-bottom: 1.25rem;
}

.about__content p {
  margin-bottom: 1rem;
  opacity: 0.85;
}

.about__details {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.about__details li {
  font-size: 0.95rem;
  opacity: 0.8;
}

.about__details strong {
  color: var(--color-accent);
  opacity: 1;
}


/* ==============================================
   8. FAQ
============================================== */
.faq {
  padding-block: var(--section-pad);
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2rem;
}

.faq__item {
  border-bottom: 1px solid var(--color-accent-dim);
}

.faq__item:first-child {
  border-top: 1px solid var(--color-accent-dim);
}

.faq__question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem 0;
  font-family: var(--font-sub);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--color-light);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color var(--transition);
}

.faq__question:hover,
.faq__question:focus-visible {
  color: var(--color-accent);
  outline: none;
}

.faq__question::after {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236D9B89' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform var(--transition);
}

.faq__question[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.faq__answer {
  padding-bottom: 1.25rem;
}

.faq__answer p {
  opacity: 0.8;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq__answer p:last-child {
  margin-bottom: 0;
}

.faq__answer a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ==============================================
   9. GALLERY
============================================== */
.gallery {
  padding-block: var(--section-pad);
  background-color: var(--color-dark);
}

/* --- Carousel wrapper --- */
.gallery__carousel {
  --carousel-cols: 1;
  position: relative;
}

/* Clip window — overflow hidden lives here, NOT on the track */
.gallery__carousel:not(.is-expanded) {
  overflow: hidden;
}

/* Edge fade to hint at peeking neighbors */
.gallery__carousel:not(.is-expanded)::before,
.gallery__carousel:not(.is-expanded)::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 8%;
  z-index: 5;
  pointer-events: none;
}
.gallery__carousel:not(.is-expanded)::before {
  left: 0;
  background: linear-gradient(to right, var(--color-dark) 10%, transparent);
}
.gallery__carousel:not(.is-expanded)::after {
  right: 0;
  background: linear-gradient(to left, var(--color-dark) 10%, transparent);
}

/* Prev / Next buttons */
.gallery__carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(10, 17, 19, 0.65);
  color: var(--color-accent);
  border: 1px solid rgba(109, 155, 137, 0.4);
  border-radius: 50%;
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}

.gallery__carousel-btn:hover {
  background: rgba(109, 155, 137, 0.2);
  border-color: var(--color-accent);
}

.gallery__carousel-btn--prev { left:  0.6rem; }
.gallery__carousel-btn--next { right: 0.6rem; }

/* Hide buttons when expanded */
.gallery__carousel.is-expanded .gallery__carousel-btn {
  display: none;
}

/* --- Grid (default: grid layout for expanded state) --- */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

/* CAROUSEL MODE: peek — flex track slides, neighbors visible at edges */
.gallery__carousel:not(.is-expanded) .gallery__grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  will-change: transform;
  transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery__carousel:not(.is-expanded) .gallery__item {
  flex-shrink: 0;
  /* CSS approximates JS formula so carousel has height before JS runs (prevents CLS).
     JS overrides this with a precise value; difference is sub-pixel. */
  width: calc((92% - (var(--carousel-cols) - 1) * 8px) / var(--carousel-cols));
}

.gallery__item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  display: block;
  padding: 0;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease, filter 400ms ease;
}

.gallery__item:hover img,
.gallery__item:focus-visible img {
  transform: scale(1.05);
  filter: brightness(0.75);
}

.gallery__item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}


/* ==============================================
   8b. GALLERY EXPAND BUTTON
============================================== */
.gallery__more-wrap {
  text-align: center;
  margin-top: 2rem;
}


/* ==============================================
   10. LIGHTBOX
============================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(10, 17, 19, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-out;
}

.lightbox__img {
  max-width: 100%;
  max-height: 90svh;
  object-fit: contain;
  border-radius: var(--radius);
  cursor: default;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--color-light);
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  color: var(--color-accent);
  outline: none;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-light);
  padding: 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }

.lightbox__nav:hover,
.lightbox__nav:focus-visible {
  color: var(--color-accent);
  outline: none;
}

.lightbox__nav:disabled {
  opacity: 0.2;
  cursor: default;
}


/* ==============================================
   11. LOCATION
============================================== */
.location {
  padding-block: var(--section-pad);
  background: var(--color-dark);
}

.location__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  max-width: 900px;
  margin-inline: auto;
}

.location__address {
  color: var(--color-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.location__map-wrap {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.location__map {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  filter: grayscale(30%) brightness(0.9);
}

.map-consent {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem;
  text-align: center;
  background: var(--color-dark);
  border: 1px solid var(--color-accent-dim);
}

.map-consent__text {
  color: var(--color-light);
  font-size: 0.875rem;
  max-width: 36ch;
  opacity: 0.7;
  line-height: 1.5;
}

/* ==============================================
   12. CONTACT
============================================== */
.contact {
  padding-block: var(--section-pad);
}

.contact__intro {
  text-align: center;
  opacity: 0.7;
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-inline: auto;
}

.contact__form {
  max-width: 640px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact__honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  tab-size: -1;
}

.form__row--half {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form__label {
  font-family: var(--font-sub);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.form__label span {
  color: var(--color-accent);
}

.form__input {
  background-color: rgba(218, 226, 218, 0.05);
  border: 1px solid rgba(109, 155, 137, 0.3);
  border-radius: var(--radius);
  color: var(--color-light);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color var(--transition), background-color var(--transition);
}

.form__input:focus {
  outline: none;
  border-color: var(--color-accent);
  background-color: rgba(109, 155, 137, 0.08);
}

.form__input::placeholder {
  color: rgba(218, 226, 218, 0.3);
}

.form__input:-webkit-autofill,
.form__input:-webkit-autofill:hover,
.form__input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #0d1a1d inset;
  -webkit-text-fill-color: var(--color-light);
  caret-color: var(--color-light);
}

.form__textarea {
  resize: vertical;
  min-height: 160px;
}

.form__hint {
  display: block;
  font-size: 0.8rem;
  opacity: 0.5;
  font-family: var(--font-body);
  letter-spacing: 0;
  margin-top: 0.1rem;
}

/* Custom file input */
.form__file-label {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(109, 155, 137, 0.3);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition);
}

.form__file-label:focus-within {
  border-color: var(--color-accent);
}

.form__file-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
}

.form__file-text {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: rgba(218, 226, 218, 0.45);
  background-color: rgba(218, 226, 218, 0.05);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form__file-text.has-files {
  color: var(--color-light);
}

.form__file-btn {
  padding: 0.75rem 1.25rem;
  background-color: var(--color-accent-dim);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  white-space: nowrap;
  border-left: 1px solid rgba(109, 155, 137, 0.3);
  transition: background-color var(--transition);
}

.form__file-label:hover .form__file-btn {
  background-color: rgba(109, 155, 137, 0.3);
}

.form__feedback {
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  text-align: center;
}

.form__feedback--success {
  background-color: rgba(109, 155, 137, 0.12);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
}

.form__feedback--error {
  background-color: rgba(220, 80, 80, 0.08);
  border: 1px solid rgba(220, 80, 80, 0.5);
  color: #f08080;
}


/* ==============================================
   12. SITE FOOTER
============================================== */
.site-footer {
  padding-block: 2rem;
  background-color: #060d0f;
  border-top: 1px solid rgba(109, 155, 137, 0.1);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.site-footer__copy {
  font-size: 0.875rem;
  opacity: 0.45;
}

.site-footer__legal {
  display: flex;
  gap: 1.5rem;
}

.site-footer__legal a {
  font-size: 0.875rem;
  opacity: 0.55;
  transition: color var(--transition), opacity var(--transition);
}

.site-footer__legal a:hover,
.site-footer__legal a:focus-visible {
  color: var(--color-accent);
  opacity: 1;
  outline: none;
}


/* ==============================================
   13. RESPONSIVE · TABLET ≥ 640px
============================================== */
@media (min-width: 640px) {

  .gallery__carousel.is-expanded .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery__carousel:not(.is-expanded) {
    --carousel-cols: 2;
  }

  .form__row--half {
    grid-template-columns: 1fr 1fr;
  }

  .location__inner {
    grid-template-columns: 1fr 2fr;
  }

  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

}


/* ==============================================
   14. RESPONSIVE · DESKTOP ≥ 1024px
============================================== */
@media (min-width: 1024px) {

  /* Header: show desktop nav, hide hamburger */
  .site-header__nav {
    display: flex;
  }

  .site-header__menu-btn {
    display: none;
  }

  /* About: two-column layout */
  .about__inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 4rem;
  }

  .about__photo {
    max-width: 380px;
  }

  .about__photo img {
    height: 480px;
  }

  /* Gallery: four columns */
  .gallery__carousel.is-expanded .gallery__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery__carousel:not(.is-expanded) {
    --carousel-cols: 3;
  }

}

@media (min-width: 1400px) {
  .gallery__carousel:not(.is-expanded) {
    --carousel-cols: 4;
  }
}
