/* ==========================================================================
   GHG / Earth — One-Screen Website
   Globale Design-Tokens, Basisstile, One-Screen-Komposition, Rechtsseiten
   ========================================================================== */

/* --------------------------------------------------------------------------
   Schriften: Alaska Variable (lokal, nur benötigte Schnitte)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Alaska Variable";
  src: url("../assets/fonts/Alaska-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alaska Variable";
  src: url("../assets/fonts/Alaska-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Design-Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Farben */
  --color-yellow: #fff374;      /* Yellow / Solar */
  --color-blue: #b1dcdf;        /* Blue / Sky */
  --color-green: #6a804f;       /* Green / Leaf */
  --color-beige: #e9cea4;       /* Beige / Sand */
  --color-brown: #9c7742;       /* Brown / Loam */
  --color-dark-brown: #50402e;  /* Dark Brown / Humus */

  /* Lineare Verläufe */
  --gradient-solar-sky: linear-gradient(90deg, #fff374 0%, #dfe9a1 45%, #b1dcdf 100%);
  --gradient-sand-sky: linear-gradient(90deg, #e9cea4 0%, #d8dab7 48%, #b1dcdf 100%);
  --gradient-sky-leaf: linear-gradient(180deg, #b1dcdf 0%, #8fb1a0 48%, #6a804f 100%);
  --gradient-solar-loam: linear-gradient(135deg, #fff374 0%, #d6ba68 52%, #9c7742 100%);
  --gradient-earth-dark: linear-gradient(180deg, #6a804f 0%, #50402e 100%);

  /* Typografie */
  --font-sans: "Alaska Variable", Arial, sans-serif;

  /* Bewegung */
  --ease-quiet: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-in: 1000ms;

  /* Layout */
  --space-frame: clamp(1.5rem, 4vw, 4.5rem);
}

/* --------------------------------------------------------------------------
   Basis
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--color-dark-brown);
  background: var(--color-beige);
}

/* Hinter der Vollbildansicht bleibt auch bei Overscroll alles dunkel */
.body-dark {
  background: var(--color-dark-brown);
}

a {
  color: inherit;
}

::selection {
  background: var(--color-yellow);
  color: var(--color-dark-brown);
}

:focus-visible {
  outline: 2px solid var(--color-yellow);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ==========================================================================
   One-Screen-Ansicht
   ========================================================================== */

.page {
  position: relative;
  min-height: 100svh;
  width: 100%;
  overflow: hidden;
  background: var(--gradient-earth-dark);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--space-frame);
}

/* --- Hintergrundvideo mit Poster ----------------------------------------- */

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 44% 45%;
  animation: hero-zoom 55s var(--ease-quiet) infinite alternate;
}

@keyframes hero-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}

/* --- Overlay: Lesbarkeit links + oben, auf Videomaterial abstimmbar ------ */

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(80, 64, 46, 0.32) 0%, rgba(80, 64, 46, 0) 24%),
    linear-gradient(90deg, rgba(80, 64, 46, 0.58) 0%, rgba(80, 64, 46, 0.18) 52%, rgba(80, 64, 46, 0.04) 100%);
}

/* --- Logo oben rechts ----------------------------------------------------- */

.site-header {
  position: relative;
  display: flex;
  justify-content: flex-start;
}

.logo {
  display: block;
  width: clamp(104px, 11vw, 164px);
  color: var(--color-yellow);
  transition: color 800ms var(--ease-quiet);
}

.logo svg {
  display: block;
  width: 100%;
  height: auto;
}

.logo:hover {
  color: var(--color-beige);
}

/* --- Headline ------------------------------------------------------------- */

.hero-content {
  position: relative;
  align-self: center;
  padding-block: 1.5rem;
}

.hero-title {
  margin: 0;
  width: fit-content;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(3.5rem, 11vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--color-yellow);
  /* Box für background-clip erweitern, damit Ober-/Unterlängen (g, Punkt)
     nicht aus dem Verlauf fallen; Margins gleichen das Layout aus */
  padding-block: 0.15em 0.25em;
  margin-block: -0.15em -0.25em;
}

/* Dezenter Verlauf Solar → Sky in der Headline, mit einfarbigem Fallback */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title {
    background: var(--gradient-solar-sky);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* --- Kontakt und rechtliche Links ----------------------------------------- */

.site-meta {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem 3rem;
  flex-wrap: wrap;
}

.contact {
  font-style: normal;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 2.2rem;
  font-size: clamp(0.9rem, 1.05vw, 1.05rem);
  line-height: 1.5;
  color: var(--color-beige);
}

.contact > * {
  display: inline-block;
}

/* Trennpunkte liegen außerhalb des Linkflusses, damit Hover-Unterstreichung
   und -Farbe nur den eigentlichen Text treffen */
.contact > * + * {
  position: relative;
}

.contact > * + *::before {
  content: "·";
  position: absolute;
  left: -1.3rem;
  color: var(--color-beige);
  opacity: 0.55;
}

.contact a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 400ms var(--ease-quiet), border-color 400ms var(--ease-quiet);
}

.contact a:hover {
  color: var(--color-yellow);
  border-bottom-color: currentColor;
}

.legal-nav {
  display: flex;
  gap: 1.75rem;
  font-size: clamp(0.82rem, 0.95vw, 0.95rem);
  line-height: 1.5;
}

.legal-nav a {
  color: var(--color-beige);
  opacity: 0.78;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: opacity 400ms var(--ease-quiet), color 400ms var(--ease-quiet), border-color 400ms var(--ease-quiet);
}

.legal-nav a:hover {
  opacity: 1;
  color: var(--color-yellow);
  border-bottom-color: currentColor;
}

/* --- Ruhige Eingangssequenz ----------------------------------------------- */

.logo,
.hero-title,
.site-meta > * {
  opacity: 0;
  animation: fade-rise var(--duration-in) var(--ease-quiet) forwards;
}

.logo { animation-delay: 150ms; }
.hero-title { animation-delay: 350ms; }
.contact { animation-delay: 700ms; }
.legal-nav { animation-delay: 850ms; }

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

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .hero-video {
    object-position: 40% 50%;
  }

  .site-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .contact > * + *::before {
    content: none;
  }
}

/* Sehr niedrige Viewports: unteren Bereich intern enger setzen */
@media (max-height: 560px) {
  .hero-content {
    padding-block: 1.25rem;
  }

  .site-meta {
    gap: 0.75rem 2rem;
  }

  .contact {
    gap: 0.2rem 0.9rem;
  }
}

/* --------------------------------------------------------------------------
   Reduced Motion: Poster statisch, Animationen stark reduziert
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    animation: none;
  }

  .logo,
  .hero-title,
  .site-meta > * {
    opacity: 1;
    animation: none;
  }

  .logo,
  .contact a,
  .legal-nav a {
    transition: none;
  }
}

/* ==========================================================================
   Rechtsseiten: Impressum und Datenschutz (reduzierte Textansichten)
   ========================================================================== */

.legal-page {
  min-height: 100svh;
  background: var(--color-beige);
  color: var(--color-dark-brown);
  display: flex;
  flex-direction: column;
  padding: var(--space-frame);
}

.legal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.legal-header .logo {
  color: var(--color-dark-brown);
  opacity: 1;
  animation: none;
}

.legal-header .logo:hover {
  color: var(--color-brown);
}

.back-link {
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(80, 64, 46, 0.35);
  padding-bottom: 1px;
  transition: border-color 400ms var(--ease-quiet);
}

.back-link:hover {
  border-bottom-color: currentColor;
}

.legal-page :focus-visible {
  outline-color: var(--color-dark-brown);
}

.legal-content {
  width: 100%;
  max-width: 64ch;
  margin-block: clamp(3rem, 10svh, 7rem);
}

.legal-content h1 {
  margin: 0 0 2.5rem;
  font-weight: 600;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.legal-content h2 {
  margin: 2.5rem 0 0.75rem;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.3;
}

.legal-content p {
  margin: 0 0 1rem;
  line-height: 1.6;
}
