/* ============================================================
   ANSA & REIN GmbH — Landing Page
   ============================================================ */

:root {
  --navy: #0d1b2b;
  --navy-deep: #091422;
  --navy-soft: #16283c;
  --accent: #6faecb;
  --accent-bright: #8cc3dd;
  --sand: #f6f3ee;
  --white: #ffffff;
  --ink: #22303d;
  --ink-soft: #55636f;
  --line: rgba(255, 255, 255, 0.14);
  --font-display: "Jost", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Mulish", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--navy);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem clamp(1.25rem, 5vw, 4rem);
  background: rgba(9, 20, 34, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-indent: 0.42em; /* balances the trailing tracking */
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark span { text-indent: 0; }

.wordmark-divider {
  width: 1px;
  height: 1.6em;
  background: rgba(255, 255, 255, 0.45);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.site-nav a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.site-nav a:hover { color: var(--accent-bright); }

.site-nav .nav-cta {
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-bright);
}

.site-nav .nav-cta:hover {
  background: var(--accent);
  color: var(--navy-deep);
}

/* ---------- Scroll progress ---------- */

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 90% at 70% 10%, var(--navy-soft) 0%, var(--navy) 55%, var(--navy-deep) 100%);
  color: var(--white);
  padding: clamp(6rem, 14vh, 10rem) clamp(1.25rem, 5vw, 4rem) clamp(5rem, 12vh, 9rem);
}

.hero-inner {
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.eyebrow-dark { color: #4a86a5; }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 300;
  letter-spacing: 0.045em;
  text-wrap: balance;
  margin-bottom: 1.75rem;
}

::selection {
  background: var(--accent);
  color: var(--navy-deep);
}

.hero-lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.72);
  max-width: 36rem;
  margin: 0 auto 2.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero-glow {
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 70%;
  background: radial-gradient(50% 100% at 50% 100%, rgba(111, 174, 203, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

/* Staged hero entrance */

@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.hero .eyebrow,
.hero h1,
.hero-lead,
.hero-actions {
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero h1 { animation-delay: 0.12s; }
.hero-lead { animation-delay: 0.26s; }
.hero-actions { animation-delay: 0.4s; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.btn-lg { padding: 1rem 2.4rem; font-size: 0.95rem; text-transform: none; letter-spacing: 0.05em; }

.btn-primary {
  background: var(--accent);
  color: var(--navy-deep);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover { border-color: var(--white); }

/* ---------- Sections ---------- */

.section { padding: clamp(4.5rem, 10vh, 7.5rem) clamp(1.25rem, 5vw, 4rem); }

.section-inner { max-width: 68rem; margin: 0 auto; }

.section-inner.narrow { max-width: 42rem; text-align: center; }

.section-light { background: var(--sand); color: var(--ink); }

.section-navy {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
}

.section h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  text-wrap: balance;
  margin-bottom: 1.5rem;
}

.section-light p { color: var(--ink-soft); }

.section-light p + p { margin-top: 1rem; }

/* Über uns — full-height image that dissolves into the text column */

.section-about {
  padding: 0;
  overflow: hidden;
}

.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: min(82vh, 46rem);
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* left padding lines the text up with the 68rem container of every other section */
  padding: clamp(4rem, 10vh, 7rem) clamp(2rem, 5vw, 4rem)
           clamp(4rem, 10vh, 7rem) max(1.25rem, calc((100vw - 68rem) / 2));
}

.about-media {
  position: relative;
  overflow: hidden;
}

.about-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* bias right: the left side sits under the fade, so keep the face clear of it */
  object-position: 62% center;
  /* Elliptical feather anchored to the outer edge — the picture melts into the
     section along a curve instead of a straight vertical band. */
  -webkit-mask-image: radial-gradient(115% 125% at 100% 50%, #000 50%, rgba(0, 0, 0, 0.55) 70%, transparent 90%);
          mask-image: radial-gradient(115% 125% at 100% 50%, #000 50%, rgba(0, 0, 0, 0.55) 70%, transparent 90%);
}

/* ---------- Scroll reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].in-view {
  opacity: 1;
  transform: none;
}

/* Pillar hairline draws in on reveal */

.pillar {
  position: relative;
  border-top: 1px solid transparent;
}

.pillar::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 1px;
  width: 100%;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--reveal-delay, 0s) + 0.15s);
}

.pillar.in-view::before { transform: scaleX(1); }

/* ---------- Parallax ---------- */

[data-parallax] {
  will-change: transform;
  transform: translateY(var(--parallax-y, 0)) scale(1.12);
}

/* ---------- Ghost-text band ---------- */

.ghost-band {
  overflow: hidden;
  background: var(--sand);
  padding: clamp(2rem, 6vh, 4rem) 0;
}

.ghost-text {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(4rem, 11vw, 9rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(13, 27, 43, 0.18);
  will-change: transform;
  transform: translateX(var(--ghost-x, 0));
}

/* ---------- liv vital product card ----------
   Built from the liv vital brand sheet: the eight-petal rosette signet,
   "liv" roman + "vital" italic wordmark with widened kerning, Fraunces-style
   display serif (Georgia is the brand's own documented fallback), pill
   buttons, 12/20/28px radii and hairline #202020 borders. The typography and
   furniture stay monochrome — the brand's sky, sand and purple are held back
   here — so the product render is the only colour in the card. */

.liv-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.liv-card {
  --liv-charcoal: #202020;
  --liv-muted: #5a5a5a;
  --liv-line: rgba(32, 32, 32, 0.08);
  --liv-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  margin-top: 2.5rem;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  background: var(--white);
  border: 1px solid var(--liv-line);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(32, 32, 32, 0.08);
}

/* Signet as a watermark — the brand rosette, oversized and barely there.
   Its own clipping box so the card keeps its outer shadow. */

.liv-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.liv-watermark svg {
  position: absolute;
  right: -5%;
  bottom: -10%;
  width: clamp(230px, 32%, 420px);
  aspect-ratio: 1;
  color: var(--liv-charcoal);
  opacity: 0.055;
  animation: liv-turn 120s linear infinite;
}

@keyframes liv-turn {
  to { transform: rotate(360deg); }
}

.liv-content,
.liv-visual {
  position: relative;
  z-index: 1;
}

/* Wordmark: rosette + "liv vital" */

/* .liv-card prefix beats `.section-light p`, which would otherwise grey the wordmark */
.liv-card .liv-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--liv-charcoal);
  margin-bottom: 1.6rem;
}

.liv-mark {
  width: 28px;
  height: 28px;
  flex: none;
  color: inherit;
}

.liv-logo-text {
  font-family: var(--liv-serif);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.liv-logo-text .liv { letter-spacing: 0.02em; }

.liv-logo-text .vital {
  font-style: italic;
  letter-spacing: 0.04em; /* brand spec: widened kerning on the V */
  margin-left: 0.22em;
}

/* Copy */

.liv-card .liv-claim {
  font-family: var(--liv-serif);
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--liv-charcoal);
  margin-bottom: 0.7rem;
}

.liv-card .liv-claim em { font-style: italic; }

.liv-card .liv-sub {
  font-family: var(--liv-serif);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--liv-charcoal);
  margin-bottom: 1.25rem;
}

.liv-card .liv-copy {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--liv-muted);
  margin: 0 0 1.75rem;
}

/* Checklist — the brand's hairline-separated rows */

.liv-card .liv-list {
  list-style: none;
  margin: 0 0 2rem;
}

.liv-card .liv-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--liv-line);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--liv-charcoal);
}

.liv-card .liv-list li:last-child { border-bottom: none; }

.liv-card .liv-list svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  color: var(--liv-charcoal);
}

/* CTA — the brand's charcoal pill */

.btn-liv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.9rem 1.85rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: var(--liv-charcoal);
  color: var(--white);
  border: 1px solid var(--liv-charcoal);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-liv:hover {
  background: #3d3d3d;
  border-color: #3d3d3d;
  transform: translateY(-1px);
}

.btn-liv svg { transition: transform 0.25s ease; }

.btn-liv:hover svg { transform: translateX(4px); }

/* Mockup — no frame of its own: the render already carries its backdrop */

.liv-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(32, 32, 32, 0.08);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* No aspect-ratio override here: the render keeps its own proportions and only
   ever scales uniformly. The width/height attributes on the <img>/<source>
   still reserve the right box before the file loads, so nothing shifts. */
.liv-visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.liv-card:hover .liv-visual { transform: translateY(-6px); }

.liv-card:hover .liv-visual img { transform: scale(1.03); }

/* ---------- Pillars ---------- */

.section-navy .eyebrow { margin-bottom: 1.25rem; }

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 3.5rem;
}

.pillar {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}

.pillar-index {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--accent);
}

.pillar h3 {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin: 0.9rem 0 0.75rem;
}

.pillar p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.62);
}

/* ---------- Image band ---------- */

.image-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.image-band div {
  overflow: hidden;
}

.image-band img {
  width: 100%;
  height: clamp(12rem, 28vw, 20rem);
  object-fit: cover;
}

/* ---------- Kontakt ---------- */

.section-contact .contact-lead {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 2.5rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: var(--white);
  border-top: 1px solid var(--line);
  padding: 3.5rem clamp(1.25rem, 5vw, 4rem);
}

.footer-inner {
  max-width: 68rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.wordmark-sm { font-size: 1rem; }

.footer-tagline {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-transform: uppercase;
  color: var(--accent);
}

.footer-nav { display: flex; gap: 2rem; margin-top: 0.75rem; }

.footer-nav a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.footer-nav a:hover { color: var(--accent-bright); }

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.5rem;
}

/* ---------- Legal pages ---------- */

.legal-main {
  background: var(--sand);
  color: var(--ink);
  padding: clamp(4rem, 10vh, 6rem) clamp(1.25rem, 5vw, 4rem);
  min-height: 60vh;
}

.legal-inner { max-width: 42rem; margin: 0 auto; }

.legal-inner h1 { font-size: 2rem; margin-bottom: 2rem; }

.legal-inner h2 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }

.legal-inner p { color: var(--ink-soft); }

.legal-inner a { color: #2f6f8f; }

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

@media (max-width: 820px) {
  .site-header { flex-direction: column; gap: 0.9rem; padding-bottom: 0.9rem; }

  .about-split { grid-template-columns: 1fr; min-height: 0; }
  .about-text { padding: clamp(3.5rem, 9vh, 5rem) clamp(1.25rem, 5vw, 4rem) 2.5rem; }
  .about-media { height: clamp(15rem, 55vw, 22rem); }
  .about-media img {
    object-position: center;
    -webkit-mask-image: radial-gradient(150% 115% at 50% 100%, #000 52%, rgba(0, 0, 0, 0.55) 74%, transparent 94%);
            mask-image: radial-gradient(150% 115% at 50% 100%, #000 52%, rgba(0, 0, 0, 0.55) 74%, transparent 94%);
  }

  .liv-card { grid-template-columns: 1fr; gap: 2.25rem; }
  .liv-visual { order: -1; }

  .pillars { grid-template-columns: 1fr 1fr; }
  .image-band { grid-template-columns: 1fr; }
  .image-band div:not(:first-child) { display: none; }
}

@media (max-width: 480px) {
  .pillars { grid-template-columns: 1fr; }
  .site-nav { flex-wrap: wrap; justify-content: center; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero .eyebrow,
  .hero h1,
  .hero-lead,
  .hero-actions {
    animation: none;
  }

  [data-reveal],
  .pillar::before {
    opacity: 1;
    transform: none;
    transition: none;
  }

  [data-parallax] {
    transform: none;
    will-change: auto;
  }

  .liv-visual,
  .liv-card:hover .liv-visual,
  .liv-visual img,
  .liv-card:hover .liv-visual img,
  .btn-liv:hover,
  .btn-liv:hover svg {
    transform: none;
    transition: none;
  }

  .liv-watermark svg { animation: none; }

  .ghost-text { transform: none; }
}
