/* 
Thalassa Website Styles
Brand Colors:
- Ocean Deep Blue: #2C5364 (primary background)
- Pine Green: #2E5339 (secondary background blocks)
- Sun Orange: #E67E22 (primary CTA)
- Almost Black: #111111 (secondary accent)
- Sand Beige: #D9CBB5 (light section background)
- Pure White: #FFFFFF (primary copy color)
*/

/* Font Face */
@font-face {
  font-family: 'Latitude';
  src: url('Fonts/Latitude-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand Colors */
  --ocean-deep-blue: #2C5364;
  --pine-green: #2E5339;
  --sun-orange: #E67E22;
  --almost-black: #111111;
  --sand-beige: #D9CBB5;
  --pure-white: #FFFFFF;
  --stone-ash: #C4C7BE;
  
  /* Extended Palette */
  --mediterranean-turquoise: #4ECDC4;
  --water-blue: #B2EBF2;
  --pine-green-light: #5C8D63;
  --olive-green: #A3B76D;
  --terracotta: #C44536;
  
  /* Typography */
  --font-heading: 'Latitude', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Latitude', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Borders */
  --border-radius: 8px;
  --border-radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Microanimations: base state for reveal-on-scroll */
[data-animate] {
  opacity: 1;
  transform: none;
  will-change: transform, opacity;
}

.animate-in {
  opacity: 1 !important;
  transform: none !important;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--pure-white);
  background-color: var(--ocean-deep-blue);
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-sm);
  background: rgba(44, 83, 100, 0.92);
  color: var(--pure-white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 6px;
  text-decoration: none;
  z-index: 1100;
  transition: top var(--transition-medium), background var(--transition-fast), color var(--transition-fast);
}

.skip-link:focus-visible,
.skip-link.skip-link--visible {
  top: var(--space-sm);
  background: var(--sun-orange);
  color: var(--pure-white);
}

/* Animation Keyframes */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes zoomInSoft { from { opacity: 0; transform: scale(.96) } to { opacity: 1; transform: scale(1) } }
@keyframes underlineDraw { from { stroke-dashoffset: 100% } to { stroke-dashoffset: 0 } }
@keyframes ripple { to { transform: scale(3); opacity: 0; } }
@keyframes floatPulse { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-2px) } }

/* Animation utilities */
.anim--300 { animation-duration: 300ms; }
.anim--450 { animation-duration: 450ms; }
.anim--600 { animation-duration: 600ms; }
.anim-ease { animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
.anim-fill { animation-fill-mode: both; }

/* Reveal variants */
.reveal-fade-up { animation: fadeUp 500ms var(--ease, cubic-bezier(0.22,1,0.36,1)) both; }
.reveal-fade-in { animation: fadeIn 450ms var(--ease, cubic-bezier(0.22,1,0.36,1)) both; }
.reveal-zoom-in { animation: zoomInSoft 500ms var(--ease, cubic-bezier(0.22,1,0.36,1)) both; }

/* Buttons hover/focus: lift + shade */
.btn { transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease; }
.btn:hover, .btn:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.18); }

/* CTA gentle idle pulse */
.pulse-idle { animation: floatPulse 3s ease-in-out infinite; }

/* Ripple helper */
.ripplable { position: relative; overflow: hidden; }
.ripplable::after {
  content: ""; position: absolute; border-radius: 9999px;
  width: 8px; height: 8px; background: rgba(255,255,255,.35);
  left: var(--x,50%); top: var(--y,50%); transform: translate(-50%,-50%);
  opacity: 0;
}
.ripplable.is-rippling::after { animation: ripple 600ms ease-out forwards; }

/* Word cycle base with wave animation */
.word-cycle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px; /* Ensure consistent width during animation */
  height: 1.2em; /* Match line height of parent */
  vertical-align: baseline;
  overflow: hidden;
  perspective: 1000px;
}

.word-cycle span {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  opacity: 0;
  transform-style: preserve-3d;
  transform-origin: bottom center;
  transition: all 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  line-height: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  bottom: 0;
  will-change: transform, opacity;
}

/* Word Cycle Animations */
@keyframes waveIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.word-cycle {
  display: inline-block;
  position: relative;
  min-width: 80px; /* Adjust based on your widest word */
  text-align: center;
}

.word-cycle span {
  position: absolute;
  left: 0;
  right: 0;
  display: none; /* do not render by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: none;
  pointer-events: none;
}

.word-cycle span.is-active {
  position: relative;
  display: flex; /* render only the active one */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 2;
}

.word-cycle span.is-exiting {
  position: absolute;
  display: none !important; /* never render exiting */
  opacity: 0 !important; /* ensure it never shows during transition */
  visibility: hidden !important;
  transform: translateY(-10px);
  pointer-events: none;
  z-index: 1;
}

/* Defensive: absolutely ensure only the active word can be visible */
.word-cycle span:not(.is-active) {
  display: none !important; /* fully hide non-active */
  opacity: 0 !important;
  visibility: hidden !important;
  animation: none !important;
  pointer-events: none !important;
}

/* Wave effect for the active word */
.word-cycle span[data-word="wide"].is-active {
  animation: waveIn 1000ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes waveIn {
  0% {
    opacity: 0;
    transform: rotateX(90deg) translateY(50%) scaleY(0.5);
  }
  60% {
    opacity: 1;
    transform: rotateX(-10deg) translateY(0) scaleY(1.1);
  }
  80% {
    transform: rotateX(5deg) translateY(-5%) scaleY(1.05);
  }
  100% {
    opacity: 1;
    transform: rotateX(0) translateY(0) scaleY(1);
  }
}

/* Wave out effect for the previous word */
.word-cycle span[data-word="wild"].is-exiting {
  animation: fadeOut 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: rotateX(0) translateY(0) scaleY(1);
  }
  40% {
    opacity: 0.8;
    transform: rotateX(-20deg) translateY(-20%) scaleY(0.9);
  }
  100% {
    opacity: 0;
    transform: rotateX(-45deg) translateY(-40%) scaleY(0.8);
  }
}

.word-cycle span.is-active { opacity: 1; transform: translateY(0); }

/* Crash entrance */
.crash-in { animation: crash 600ms cubic-bezier(.16,1,.3,1) both; }
@keyframes crash {
  0% { opacity:0; transform: translateY(-24px) rotate(-6deg) scale(0.96) }
  60% { opacity:1; transform: translateY(0) rotate(1deg) scale(1.04) }
  100% { transform: translateY(0) rotate(0deg) scale(1) }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0;
  display: block;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(0.55rem, 1vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: -0.1rem auto 1.5rem;
  color: rgba(255, 255, 255, 0.78);
  display: inline-block;
  line-height: 1.1;
  white-space: nowrap;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  text-align: center;
  margin: 0 0 var(--space-sm);
  padding: 0;
  position: static;
  max-width: 100%;
}

.subpage-section-title {
  text-align: right;
  margin: 0;
  padding-right: 40px;
  align-self: flex-start;
  position: sticky;
  top: 120px;
  max-width: 100%;
}

h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

p {
  margin-bottom: var(--space-sm);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  overflow: hidden;
}

/* Header */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(44, 83, 100, 0.7); /* semi-transparent by default */
  backdrop-filter: blur(10px);
  transition: background-color var(--transition-medium);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  outline: none !important;
  border: none !important;
}

/* Keep the same style when scrolled */
.header.scrolled {
  background-color: rgba(44, 83, 100, 0.7);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-sm) var(--space-lg);
  width: 100%;
  margin: 0;
}

.nav-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  justify-self: start;
}

.brand-logo {
  width: 64px;
  height: auto;
  color: var(--pure-white);
}

@media (min-width: 768px) {
  .nav {
    padding: var(--space-sm) var(--space-lg);
  }
}

.brand-link {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pure-white);
  text-decoration: none;
  transition: color var(--transition-fast);
  border-bottom: none !important;
}

.brand-link:hover,
.brand-link:focus {
  color: var(--sun-orange);
  outline: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}

.nav-link {
  color: var(--pure-white);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus {
  color: var(--sun-orange);
  border-bottom-color: var(--sun-orange);
  outline: none;
}

/* Wave Separator */
.wave-separator {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    margin-top: -1px;
    background: transparent;
}

.wave-separator svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-separator path {
    fill: var(--ocean-deep-blue);
    opacity: 0.3;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-image,
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-image {
  display: none;
}

.hero-background--static .hero-image {
  display: block;
}

.hero-background--static .hero-video {
  display: none;
}

.hero-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5); /* 50% black overlay */
  z-index: 1;
}

.hero-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(44, 83, 100, 0.5) 0%,
    rgba(46, 83, 57, 0.4) 50%,
    rgba(44, 83, 100, 0.6) 100%
  );
  z-index: 2;
}

.hero-content {
  text-align: center;
  z-index: 3;
  padding: var(--space-lg);
}

.hero-logo {
  display: block;
  width: 140px;
  height: auto;
  color: var(--pure-white);
  margin: 0 auto var(--space-md);
}

/* Contact wave */
.contact {
  position: relative;
  overflow: hidden;
}

.contact-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  line-height: 0;
  z-index: 1;
}

.contact-wave svg {
  display: block;
  width: 100%;
  height: 64px;
}

.contact-wave path {
  fill: var(--ocean-deep-blue); /* Match footer background */
}

/* Hero decorative wave */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  line-height: 0;
  z-index: 1;
}

/* Parallax effect for non-reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .hero-wave {
    will-change: transform;
    transform: translateY(0);
    transition: transform 1.2s var(--ease-out);
  }
  
  .hero-wave.parallax {
    transform: translateY(20px);
  }
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 64px; /* ~h-16 */
}
.hero-wave path {
  fill: var(--sand-beige); /* Transition into offerings light background */
}

.hero-words {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-md);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 300;
  margin: 0 auto var(--space-xl);
  width: 100%;
  max-width: 100%;
  padding: 0 var(--space-lg);
  box-sizing: border-box;
}

.hero-word {
  display: inline-block;
  text-align: center;
  flex: 1;
  white-space: nowrap;
}

.word-separator {
  color: var(--water-blue);
  font-weight: 500;
  font-size: 1.5em;
  line-height: 1;
  margin: 0 -0.2em;
  opacity: 0.7;
}

@media (max-width: 767px) {
  .hero-words {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .word-separator {
    display: none;
  }
}

/* CTA Button */
.cta-button {
  display: inline-block;
  background-color: var(--almost-black);
  color: var(--pure-white);
  text-decoration: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  font-size: 1.125rem;
  transition: all var(--transition-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(17, 17, 17, 0.3);
}

.cta-button:hover,
.cta-button:focus {
  background-color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(17, 17, 17, 0.4);
  outline: none;
}

.cta-button:active {
  transform: translateY(0);
}

/* Offerings Section */
.offerings {
  background-color: var(--sand-beige);
  color: var(--almost-black);
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 1;
  margin-top: -1px;
}

.offerings .container {
  background-color: transparent;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-title {
  text-align: center;
  margin: 0 auto var(--space-2xl);
  color: var(--pine-green);
  position: relative;
  display: block;
  width: 100%;
  max-width: 800px;
  left: 0;
  transform: none;
  padding: 0;
  box-sizing: border-box;
}

/* Pine forest divider that grows up into Offerings */
.forest-up {
  position: absolute;
  left: 0;
  top: -280px; /* Adjusted to better connect with Welcome section */
  width: 100%;
  height: 280px; /* Reduced height to match the new top value */
  color: #0f2a0f; /* even darker green for contrast */
  pointer-events: none;
  z-index: 3; /* above Offerings background */
}

.forest-up svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.25));
  mix-blend-mode: normal;
}

/* Remove outlines from trees */
.forest-up polygon {
  stroke: none;
}

/* About section forest clusters */
.forest-up {
  display: flex;
  justify-content: space-between;
  padding: 0 2%;
}

.about-forest {
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.about-forest .tree--back {
  width: 35px;
  height: 55px;
}

.about-forest .tree--front {
  width: 50px;
  height: 80px;
}

/* Graduated main tree sizes */
.about-forest .tree--large {
  width: 60px;
  height: 95px;
}

.about-forest .tree--medium {
  width: 48px;
  height: 78px;
}

.about-forest .tree--small {
  width: 40px;
  height: 65px;
}

.about-forest .tree {
  margin-right: -22px;
}

.forest-up rect {
  fill: #1f3b1f;
  stroke: none;
}

/* Add a decorative line under section titles */
.section-title::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 3px;
  background-color: currentColor;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.5;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    max-width: 1200px;
    margin: 0 auto var(--space-2xl);
  }
}

/* New: service column with centered headings above cards */
.service-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.service-headline {
  color: var(--pine-green);
  font-size: 2rem;
  margin-bottom: var(--space-xs);
}

.service-subheadline {
  color: var(--ocean-deep-blue);
  font-size: 1.125rem;
  margin-bottom: var(--space-lg);
}

.service-card {
  background-color: var(--pure-white);
  color: var(--ocean-deep-blue);
  padding: var(--space-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: var(--space-lg);
  transition: transform var(--transition-medium);
  text-align: left; /* ensure left alignment inside cards */
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card:hover {
  transform: translateY(-5px);
}

/* New: item title inside card */
.service-item-title {
  color: var(--pine-green);
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.service-title {
  color: var(--pine-green);
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.service-subtitle {
  font-size: 1.125rem;
  margin-bottom: var(--space-lg);
  color: var(--ocean-deep-blue);
}

.service-features {
  list-style: none;
  margin-bottom: var(--space-lg);
  padding-left: 0; /* reset for custom bullets */
}

.service-features li {
  position: relative;
  padding-left: var(--space-md); /* uniform indent */
  margin-bottom: var(--space-xs);
  color: var(--ocean-deep-blue);
}

.service-features li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--sun-orange);
  font-weight: bold;
}

.service-button {
  background-color: var(--almost-black);
  color: var(--pure-white);
  border: none;
  border-radius: 999px;
  padding: 0.625rem 1.6rem;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  margin-bottom: var(--space-md);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.about-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-md) auto 0;
}

.about-cta--mobile {
  display: none;
}

.service-button:hover,
.service-button:focus {
  background-color: #000000;
  outline: none;
}

.service-note {
  font-size: 0.9rem;
  color: var(--pine-green);
  font-style: italic;
}

.donation-note {
  margin-top: var(--space-xl);
  text-align: center;
  padding: var(--space-md) 0;
  color: var(--ocean-deep-blue);
  font-style: italic;
}

.donation-note p {
  margin: 0;
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.6;
}

/* About Section */
.about {
  background-color: var(--pine-green);
  padding: var(--space-3xl) 0 0;
  position: relative;
  overflow: visible;
  z-index: 2;
}

.about-mountain-divider {
  position: relative;
  width: 100%;
  height: clamp(120px, 18vw, 180px);
  margin-top: var(--space-xl);
}

.about-mountain-divider svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
  justify-items: center; /* center items in grid */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.about-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.about-reading-section .subpage-reading {
  max-width: min(960px, 100%);
  padding: 40px 16px;
  display: grid;
  gap: var(--space-xl);
  justify-items: stretch;
}

.about-section-reading .subpage-text-block,
.about-section-longform .subpage-text-block,
.about-section-place .subpage-text-block {
  max-width: none;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  gap: var(--space-md);
  display: flex;
  flex-direction: column;
  grid-column: 1 / -1;
}

@media (min-width: 960px) {
  .about-reading-section .subpage-reading {
    grid-template-columns: minmax(240px, 0.95fr) minmax(320px, 1.2fr);
    gap: var(--space-2xl);
    align-items: start;
  }
}

.about-portrait {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-portrait .subpage-image-placeholder {
  width: 100%;
  max-width: 320px;
  border-radius: var(--border-radius-lg);
  font-size: 0.95rem;
  padding: var(--space-lg);
}

.about-image-block {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image-block .subpage-image-placeholder {
  width: 100%;
  max-width: 320px;
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
}

.about-portrait-image {
  width: 100%;
  max-width: 320px;
  border-radius: var(--border-radius-lg);
  display: block;
  object-fit: cover;
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.25);
}

.about-longform {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(17, 17, 17, 0.9);
}

.about-longform p:last-child {
  color: var(--water-blue);
  font-size: 1.1rem;
}

@media (max-width: 767px) {
  .about-reading-section .subpage-reading {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: left;
  }

  .about-portrait {
    justify-content: center;
  }

  .about-portrait .subpage-image-placeholder {
    max-width: 260px;
  }

  .about-image-block .subpage-image-placeholder {
    max-width: 260px;
  }

  .about-portrait-image {
    max-width: 260px;
  }
}

.about-section-clarification .subpage-section-title {
  margin-bottom: var(--space-md);
}

.about-section-clarification .subpage-text-block {
  max-width: 640px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(17, 17, 17, 0.85);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.about-text-highlight--mobile {
  display: none;
  margin-top: var(--space-md);
  text-align: center;
}

@media (min-width: 768px) {
  .about-content {
    grid-template-columns: 1fr 1.5fr;
  }
}

@media (max-width: 767px) {
  .about-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    align-items: stretch;
  }

  .about-text {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
  }

  .about-text .about-cta--mobile {
    display: none;
  }

  .about-image {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 var(--space-lg);
    width: 100%;
    box-sizing: border-box;
  }

  .about-image img {
    width: min(100%, 320px);
    margin: 0 auto;
  }

  .about-image .about-cta {
    margin-top: var(--space-md);
  }

  .about-text .about-text-highlight {
    display: none;
  }

  .about-text-highlight--mobile {
    display: block;
  }
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.about-text {
  font-size: 1.125rem;
  line-height: 1.7;
  text-align: center; /* center text content */
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.about-text .section-title {
  text-align: center;
  margin: var(--space-xl) auto var(--space-2xl);
  color: var(--sand-beige);
  position: relative;
  display: block;
  width: 100%;
  max-width: 800px;
  left: 0;
  transform: none;
  padding: 0;
}

.about-text p:last-child {
  margin-top: var(--space-lg);
  font-size: 1.25rem;
  color: var(--water-blue);
}

/* Testimonials Section */
.testimonials {
  position: relative;
  --ridge-height: clamp(140px, 20vw, 210px);
  padding: var(--space-xl) 0 var(--space-2xl);
  background: var(--stone-ash);
  color: var(--almost-black);
  --items-per-view: 1;
  --testimonial-gap: var(--space-lg);
  overflow: clip;
}

.testimonials::before {
  content: '';
  position: absolute;
  top: 12%;
  left: 0;
  right: 0;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='260' viewBox='0 0 220 260'%3E%3Cpath d='M10 120 L55 30 L100 120 L145 45 L190 120' stroke='rgba(46,83,57,0.28)' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3Cpath d='M-20 220 L25 130 L70 220 L115 150 L160 220 L205 150 L250 220' stroke='rgba(44,83,100,0.24)' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 260px;
  background-position: center top;
  opacity: 0.38;
  pointer-events: none;
  z-index: 0;
}

.testimonials .container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}


.testimonials-header {
  max-width: 680px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}

.testimonials .section-title {
  color: var(--ocean-deep-blue);
  margin-bottom: var(--space-sm);
}

.testimonials-subtitle {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(17, 17, 17, 0.65);
}

.testimonials-carousel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-lg);
  position: relative;
}

.testimonials-viewport {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.testimonials-track {
  list-style: none;
  margin: 0;
  padding: var(--space-md) 0 var(--space-lg);
  display: flex;
  gap: var(--testimonial-gap);
  flex-wrap: nowrap;
}

.testimonials-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-card {
  flex: 0 0 calc((100% - (var(--items-per-view) - 1) * var(--testimonial-gap)) / var(--items-per-view));
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(44, 83, 100, 0.16);
  border-radius: calc(var(--border-radius-lg) + 2px);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.07);
  backdrop-filter: blur(3px);
  transition: box-shadow var(--transition-medium), border-color var(--transition-medium);
}

.testimonial-card:hover,
.testimonial-card:focus-within {
  box-shadow: 0 14px 36px rgba(17, 17, 17, 0.1);
  border-color: rgba(46, 83, 57, 0.26);
}

.testimonial-card figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  height: 100%;
}

.testimonial-quote {
  margin: 0;
  position: relative;
  padding-left: 0;
  --testimonial-collapsed-line-count: 5;
}

.testimonial-quote p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--almost-black);
  font-style: italic;
}

.testimonial-quote[data-collapsible="true"] {
  padding-bottom: calc(var(--space-sm) * 0.75);
}

.testimonial-quote[data-collapsible="true"] p {
  overflow: hidden;
  max-height: var(
    --testimonial-collapsed-height,
    calc(var(--testimonial-collapsed-line-count) * 1.75em)
  );
  transition: max-height var(--transition-medium);
}

.testimonial-quote[data-collapsible="true"]:not(.is-expanded) p {
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 68%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 68%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  padding-bottom: 0.5rem;
}

.testimonial-quote[data-collapsible="true"].is-expanded p {
  max-height: none;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}

.testimonial-name {
  font-weight: 600;
  display: block;
  color: var(--ocean-deep-blue);
}

.testimonial-meta {
  font-size: 0.875rem;
  color: rgba(17, 17, 17, 0.55);
}

.testimonial-toggle {
  align-self: flex-start;
  margin-top: calc(var(--space-xs) * -0.25);
  background: none;
  border: none;
  color: var(--sun-orange);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.testimonial-toggle::after {
  content: "\2193";
  font-size: 1rem;
  transition: transform var(--transition-medium);
}

.testimonial-quote[data-collapsible="true"].is-expanded + .testimonial-toggle::after {
  transform: rotate(-180deg);
}

.testimonial-toggle:hover,
.testimonial-toggle:focus-visible {
  color: var(--pine-green);
  transform: translateY(-1px);
  outline: none;
}

.testimonial-toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(46, 83, 57, 0.25);
  border-radius: 999px;
  padding-inline: 0.35em;
  margin-left: -0.35em;
}

.testimonials-nav {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(44, 83, 100, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ocean-deep-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(17, 17, 17, 0.07);
  backdrop-filter: blur(3px);
  transition: transform var(--transition-medium), border-color var(--transition-medium), background-color var(--transition-medium), box-shadow var(--transition-medium);
}

.testimonials-nav:hover,
.testimonials-nav:focus-visible {
  transform: translateY(-1px);
  background: #FFFFFF;
  border-color: rgba(46, 83, 57, 0.35);
  box-shadow: 0 6px 18px rgba(44, 83, 100, 0.16);
  outline: none;
}

.testimonials-nav:active {
  transform: translateY(0);
}

.testimonials-nav-icon {
  width: 22px;
  height: 22px;
}

@media (max-width: 639px) {
  .testimonials-nav {
    width: 44px;
    height: 44px;
  }

  .testimonials-nav-icon {
    width: 18px;
    height: 18px;
  }

  .testimonials-carousel {
    gap: var(--space-md);
  }
}

@media (min-width: 640px) {
  .testimonials {
    --items-per-view: 2;
  }

  .testimonials-subtitle {
    font-size: 1.15rem;
  }
}

@media (min-width: 1024px) {
  .testimonials {
    --items-per-view: 2;
  }

  .testimonials .container {
    padding: 0 var(--space-xl);
  }

  .testimonials-nav {
    width: 52px;
    height: 52px;
  }
}

.about-text-highlight {
  margin-top: var(--space-lg);
  font-size: 1.25rem;
  color: var(--water-blue);
}

@media (min-width: 768px) {
  .about-text-highlight--mobile {
    display: none;
  }
}

/* Contact Section */
.contact {
  background-color: var(--sand-beige);
  /* keep top tight, restore generous bottom spacing */
  padding: var(--space-xs) var(--space-lg) var(--space-3xl);
  color: var(--almost-black);
}

@media (min-width: 768px) {
  .contact {
    padding: var(--space-xs) 0 var(--space-3xl);
  }
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .contact-content {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-item {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.contact-item h3 {
  color: var(--water-blue);
  margin-bottom: var(--space-xs);
  text-align: center;
}

.contact-item p {
  margin: 0;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .contact-item {
    text-align: left;
  }
  
  .contact-item h3 {
    text-align: left;
  }
}

.contact-link {
  color: var(--pure-white);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.contact-link:hover,
.contact-link:focus {
  color: var(--sun-orange);
  text-decoration: underline;
  outline: none;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin: 0 auto 0;
  max-width: 1200px;
  padding: 0 var(--space-sm);
  width: 100%;
}

.contact-item {
  text-align: center;
  padding: var(--space-md);
  background-color: var(--pine-green);
  border-radius: var(--border-radius);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  color: var(--pure-white);
}

/* Forest growing out of contact boxes */
.contact-item--with-tree {
  position: relative;
  overflow: visible;
}

.contact-forest {
  position: absolute;
  bottom: 100%; /* position at top of box */
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.contact-forest .tree {
  flex-shrink: 0;
}

.contact-forest .tree--back {
  width: 28px;
  height: 45px;
}

.contact-forest .tree--front {
  width: 38px;
  height: 65px;
}

.contact-forest--left {
  left: 8%;
}

.contact-forest--left .tree--1 { margin-right: -20px; }
.contact-forest--left .tree--2 { margin-right: -20px; }
.contact-forest--left .tree--3 { margin-right: -20px; }
.contact-forest--left .tree--4 { margin-right: -20px; }

.contact-forest--right {
  right: 8%;
}

.contact-forest--right .tree--1 { margin-right: -16px; }
.contact-forest--right .tree--2 { margin-right: -18px; }
.contact-forest--right .tree--3 { margin-right: -14px; }

/* Subpage contact intro (e.g. Thai Massage "An Invitation") */
.subpage-contact-intro {
  max-width: 720px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}

/* Standard contact heading spacing for main page */
.contact .section-title {
  text-align: center;
  margin: var(--space-xl) auto var(--space-2xl);
  color: var(--pine-green);
}

/* Reduce "Get in touch" heading margin on subpages only */
.subpage-main .contact .section-title {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0;
}

.subpage-contact-intro-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--pine-green);
  margin-bottom: var(--space-md);
  text-align: center;
  position: static;        /* override global sticky h2 */
  padding-right: 0;        /* remove right offset from global h2 */
}

.subpage-contact-intro-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--almost-black);
  margin-bottom: 0;
  padding-bottom: 0;
}

.subpage-main .contact-grid {
  margin-top: 0;
  margin-bottom: 0;
}

.contact-item:hover {
  background-color: var(--pine-green-light);
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.contact-item h3 {
  color: var(--pure-white);
  margin-bottom: var(--space-sm);
  font-size: 1.25rem;
  text-align: center;
  width: 100%;
}

.contact-item p {
  margin: 0;
  line-height: 1.6;
  color: var(--pure-white);
}

.contact-link {
  color: var(--pure-white);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius);
}

.contact-link:hover,
.contact-link:focus {
  color: var(--sun-orange);
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 var(--space-lg);
    gap: var(--space-lg);
  }
  
  .contact-form {
    padding: 0 var(--space-lg);
  }
  
  .contact-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  color: var(--ocean-deep-blue);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.form-input {
  padding: var(--space-sm) var(--space-md);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  background-color: var(--pure-white);
  color: var(--ocean-deep-blue);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
  width: 100%;
  max-width: 100%;
}

.form-input:focus {
  outline: none;
  border-color: var(--sun-orange);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-submit {
  background-color: var(--almost-black);
  color: var(--pure-white);
  border: none;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  margin-top: var(--space-sm);
}

.form-submit:hover,
.form-submit:focus {
  background-color: #000000;
  outline: none;
}

/* Focus Styles for Accessibility */
*:focus-visible {
  outline: 2px solid var(--sun-orange);
  outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 767px) {
  .nav-links {
    gap: var(--space-sm);
  }
  
  .nav-link {
    font-size: 0.9rem;
  }
  
  .hero-words {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  
  .word-separator {
    display: none;
  }
}

/* Print Styles */
@media print {
  .header {
    position: static;
    background-color: transparent;
  }
  
  .hero-background {
    display: none;
  }
  
  .hero {
    height: auto;
    padding: var(--space-lg) 0;
  }
}

/* Reduced motion: ensure reveal elements are visible and durations minimal */
@media (prefers-reduced-motion: reduce) {
  [data-animate] { opacity: 1 !important; transform: none !important; }
}

/* Beam SVG overlay: full-viewport fixed layer, sits behind UI but above backgrounds */
.beam-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 700; /* Middle layer: behind text/UI, above backgrounds */
  mix-blend-mode: screen; /* Lighten/dodge style effect */
}

/* Cursor Dot (red) */
.cursor-light {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: red;
  pointer-events: none;
  z-index: 750; /* Above beam */
  transform: translate(-50%, -50%);
  display: block;
  opacity: 0; /* Invisible but present for geometry */
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .cursor-light {
    display: none !important;
  }
}

.cursor-light__core { display: none; }

.cursor-light__rays { display: none; }

/* Active state when cursor is moving */
.cursor-light--active .cursor-light__core,
.cursor-light--active .cursor-light__rays {
  opacity: 1;
}

/* Breathing animation for idle state */
@keyframes cursorBreathing {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.cursor-light--idle .cursor-light__core,
.cursor-light--idle .cursor-light__rays {
  animation: cursorBreathing 3s ease-in-out infinite;
  opacity: 0.7;
}

/* Hide cursor light on touch devices */
@media (hover: none) and (pointer: coarse) {
  .cursor-light {
    display: none !important;
  }

  .beam-overlay {
    display: none !important;
  }
}

/* Additionally hide beam and cursor light on very narrow viewports */
@media (max-width: 800px) {
  .cursor-light {
    display: none !important;
  }

  .beam-overlay {
    display: none !important;
  }
}

/* Footer */
.footer {
  background-color: var(--ocean-deep-blue);
  padding: var(--space-md) 0;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer-section {
  color: var(--pure-white);
}

.footer-section p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  line-height: 1.8;
  padding: 8px 0;
}

@media (min-width: 768px) {
  .footer-section p {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 8px 16px;
  }
  
  .footer-section br {
    display: none;
  }
  
  .footer-section p span {
    white-space: nowrap;
  }
}

.footer-right {
  text-align: right;
}

.footer-link {
  color: var(--pure-white);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover,
.footer-link:focus {
  color: var(--sun-orange);
  outline: none;
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-right {
    text-align: center;
  }
}

/* Subpage base layout (Existenzanalyse / Thai-Massage) */
.subpage-main {
  min-height: 100vh;
  padding-top: 0; /* Hero background reaches all the way to the top */
  padding-bottom: 0;
  background-color: var(--sand-beige);
  color: var(--almost-black);
}

.subpage-hero {
  width: 100%;
  padding: 104px 16px 64px;
  margin: 0;
  background: linear-gradient(
    135deg,
    rgba(44, 83, 100, 0.85),
    rgba(46, 83, 57, 0.9)
  );
}

/* Specific hero image for Existential Analysis subpage */
.subpage-hero--existential {
  background-image:
    linear-gradient(
      135deg,
      rgba(44, 83, 100, 0.78),
      rgba(46, 83, 57, 0.78)
    ),
    url("Ocean - Existenzanalysis - Hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Hero image for Thai Massage subpage (reuse ocean image, softer overlay) */
.subpage-hero--thai {
  background-image:
    linear-gradient(
      135deg,
      rgba(44, 83, 100, 0.7),
      rgba(46, 83, 57, 0.7)
    ),
    url("Ocean - Existenzanalysis - Hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.subpage-hero-inner {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 40px;
  text-align: left;
  align-items: flex-end;
}

.subpage-hero-spacer {
  grid-column: 1;
}

.subpage-hero-content {
  grid-column: 1 / -1;
  max-width: 960px;
  justify-self: start;
}

.subpage-hero-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.75rem;
  color: var(--pure-white);
}

.subpage-hero-subtitle {
  font-size: 1.1rem;
  max-width: none;
  width: 100%;
  color: rgba(255, 255, 255, 0.85);
}

.subpage-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 16px;
}

/* Make the final Thai Massage section sit closer to the contact block */
.subpage-section[aria-labelledby="framework-clarification"] {
  padding-bottom: 0; /* no extra padding below wave section wrapper */
}

.subpage-section--wide-reading {
  max-width: min(72ch, 100%);
  margin: 0 auto;
}

.subpage-section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--ocean-deep-blue);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.subpage-text-block {
  max-width: 100%;
  line-height: 1.7;
  padding-top: 0.5rem;
}

.subpage-text-block p {
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.subpage-section-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}

/* Blue divider only at the end of a section's text (before the next heading/section),
   spanning full section width from where headings start */
.subpage-section:not(.subpage-section--cta) .subpage-section-inner {
  padding-top: 0;
  padding-bottom: 3rem;
  margin-bottom: 0;
  position: relative;
}

/* Make the very last wavy section (Framework & Clarification) sit tighter above contact */
.subpage-section[aria-labelledby="framework-clarification"] .subpage-section-inner {
  padding-bottom: 0.5rem; /* minimal space below text before wave */
}

.subpage-section:not(.subpage-section--cta) .subpage-section-inner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'%3E%3Cpath d='M0,15 Q75,0 150,15 T300,15 T450,15 T600,15 T750,15 T900,15 T1050,15 T1200,15' fill='none' stroke='rgba(44,83,100,0.35)' stroke-width='2.5'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* Center the final CTA section ("An Invitation") and keep its heading non-sticky */
.subpage-section--cta .subpage-section-inner {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.subpage-section--cta .subpage-section-title {
  position: static;
  padding-right: 0;
  text-align: center;
  margin-bottom: 1rem;
}

.subpage-section--cta .subpage-text-block {
  max-width: 640px;
}

/* First Thai Massage intro paragraph spans full text width (both columns) */
.subpage-section[aria-labelledby="thai-massage-intro"] .subpage-section-inner .subpage-text-block {
  grid-column: 1 / -1;
}

.subpage-section[aria-labelledby="existenzanalyse-overview"] .subpage-section-inner .subpage-text-block {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .subpage-hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .subpage-hero-spacer {
    display: none;
  }

  .subpage-hero-content {
    grid-column: 1;
    max-width: 100%;
    justify-self: center;
  }

  .subpage-hero-title {
    text-align: center;
  }

  .subpage-section-inner {
    grid-template-columns: 1fr;
    padding: 0 16px;
    gap: 24px;
  }
  
  .subpage-section-title {
    position: static;
    text-align: center;
    padding: 0;
    margin: 0 auto 1rem;
    max-width: 32rem;
    align-self: center;
  }
}

.subpage-image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(178, 235, 242, 0.18),
    rgba(78, 205, 196, 0.2)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  text-align: center;
}

.subpage-text-block {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(17, 17, 17, 0.9);
}

.subpage-text-block p + p {
  margin-top: 1rem;
}

.subpage-reading {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 16px;
  font-size: 1.05rem;
  line-height: 1.9;
  color: rgba(17, 17, 17, 0.9);
}

.subpage-testimonial-wrapper {
  max-width: 720px;
  margin: 20px auto 0;
  padding: 32px 16px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.12);
}

.subpage-testimonial {
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(17, 17, 17, 0.9);
  font-style: italic;
}

.subpage-testimonial-cite {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: rgba(17, 17, 17, 0.6);
}

.subpage-cross-ref {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 24px 16px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
  font-size: 0.98rem;
  color: rgba(17, 17, 17, 0.85);
}

.subpage-cross-ref a {
  color: var(--water-blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(178, 235, 242, 0.5);
}

.subpage-cross-ref a:hover,
.subpage-cross-ref a:focus-visible {
  color: var(--mediterranean-turquoise);
  border-bottom-color: var(--mediterranean-turquoise);
}

.subpage-cta {
  max-width: 720px;
  margin: 56px auto 0;
  padding: 0 16px;
  text-align: left;
}

.subpage-cta-text {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: rgba(17, 17, 17, 0.9);
}

.subpage-cta-button {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  background-color: var(--almost-black);
  color: var(--pure-white);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
}

.subpage-cta-button:hover,
.subpage-cta-button:focus-visible {
  background-color: #000000;
}

.subpage-disclaimer {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 0 16px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(17, 17, 17, 0.7);
}

