/* =====================================================================
   rts-web — RetireSardinia coming-soon
   Palette: navy + lime (cf. customer specs)
   Mobile-first, no framework, no JS dependency.
   ===================================================================== */

:root {
  --navy: #0E1F3D;
  --navy-light: #1A3258;
  --lime: #B7D332;
  --lime-dark: #9BB821;
  --bg: #FAFAF7;
  --text: #1A1A1A;
  --text-soft: #4A5568;
  --border: #E2E5EB;
  --white: #FFFFFF;
}

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

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--navy);
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.lang-switch {
  display: flex;
  gap: 0.25rem;
}

.lang-switch a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.625rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.lang-switch a:hover {
  color: var(--navy);
  background: var(--bg);
}

.lang-switch a[aria-current="page"] {
  color: var(--navy);
  background: var(--lime);
}

/* ---- Main ---- */

main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  main {
    grid-template-columns: 1.15fr 1fr;
    padding: 4rem 2rem;
    gap: 4rem;
  }
}

.hero-text { min-width: 0; }

.badge {
  display: inline-block;
  background: var(--lime);
  color: var(--navy);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1.25rem 0;
}

.hero h1 {
  font-size: 2rem;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.875rem 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}

@media (min-width: 768px) {
  .hero h1 { font-size: 2.75rem; }
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-soft);
  margin: 0 0 1.75rem 0;
  font-weight: 400;
}

.teaser {
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 2rem 0;
  max-width: 32em;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--navy);
  color: var(--white);
  padding: 0.9rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.15s;
}

.cta:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
}

.cta-email {
  display: block;
  margin-top: 0.625rem;
  font-size: 0.875rem;
  color: var(--text-soft);
}

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

.hero-image {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, var(--lime-dark) 140%);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

@media (max-width: 767px) {
  .hero-image {
    aspect-ratio: 3 / 2;
    border-radius: 16px;
  }
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-image-placeholder {
  color: var(--lime);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
  opacity: 0.7;
}

/* ---- Carousel (crossfade JS-driven, mix photo + vidéo) ---- */

.hero-image .carousel {
  position: absolute;
  inset: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-image .carousel .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease-in-out;
}

.hero-image .carousel .slide.active {
  opacity: 1;
}

.hero-image .carousel .slide img,
.hero-image .carousel .slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .hero-image .carousel .slide {
    transition: none;
  }
}

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

footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-soft);
  gap: 1rem;
  flex-wrap: wrap;
}

footer nav { display: flex; gap: 1rem; }

footer a {
  color: var(--text-soft);
  text-decoration: none;
}

footer a:hover { color: var(--navy); }

/* ---- Legal pages (Impressum) ---- */

.legal {
  max-width: 700px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

.legal h1 {
  font-size: 1.75rem;
  color: var(--navy);
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.01em;
}

.legal h2 {
  font-size: 1.0625rem;
  color: var(--navy);
  margin: 2rem 0 0.5rem 0;
}

.legal p,
.legal address {
  margin: 0 0 1rem 0;
  font-style: normal;
}

.legal a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal .back {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.875rem;
}

/* ---- Contact form (replaces hero text in-place) ---- */

[hidden] { display: none !important; }

.contact-pane {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-pane h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--navy);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.contact-form input,
.contact-form textarea {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-soft);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.contact-form .form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.contact-form button.back,
.contact-success button.back {
  background: transparent;
  border: none;
  color: var(--text-soft);
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  padding: 0.5rem 0.5rem;
}

.contact-form button.back:hover,
.contact-success button.back:hover {
  color: var(--navy);
}

.contact-error {
  color: #b81616;
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
}

.contact-success h3 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  margin: 0 0 0.75rem;
  color: var(--navy);
}

.contact-success p {
  color: var(--text-soft);
  margin: 0 0 1.5rem;
}

/* ---- Small screens fine-tuning ---- */

@media (max-width: 480px) {
  header { padding: 0.875rem 1rem; }
  footer { padding: 1rem; }
  main { padding: 2rem 1rem; }
  .hero h1 { font-size: 1.75rem; }
}
