:root {
  /* Blå palett i samma familj som svajsurf.se: mörk navy-bakgrund + ljusblå accent. */
  --bg: #0f1930;
  --panel: #1d2a43;
  --border: #2c3d61;
  --text: #e6efff;
  --muted: #9fb0cd;
  --accent: #53cdef;
  --accent-dark: #25758c;
  --btn-text: #0f1930;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
}

a { color: var(--accent); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

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

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.95rem;
}

.site-header nav a:hover { color: var(--text); }

/* Hero */

.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 25, 48, 0.15) 30%, rgba(15, 25, 48, 0.92) 100%);
}

.hero-content {
  position: relative;
  padding-top: 4rem;
  padding-bottom: 3.5rem;
  max-width: 1080px;
  width: 100%;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 0 0 0.5rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text);
  max-width: 34em;
  margin: 0 0 1.5rem;
}

/* Slideshow */

/* Inramad komponent med sidmarginaler – inte full bredd. */
.slideshow {
  position: relative;
  max-width: 1080px;
  margin: 1.5rem auto 0;
  padding: 0 1.25rem;
}

.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.slides::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  flex: 0 0 100%;
  height: clamp(340px, 48vh, 480px);
  display: flex;
  align-items: flex-end;
  scroll-snap-align: start;
  overflow: hidden;
}

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Långsam ambient zoom/panorering, som svajsurf.se:s bannerbilder. */
  animation: ambient 26s ease-in-out infinite alternate;
  will-change: transform;
}

.slide:nth-child(even) img { animation-name: ambient-reverse; }

@keyframes ambient {
  from { transform: scale(1); }
  to { transform: scale(1.09) translate(1.2%, -0.8%); }
}

@keyframes ambient-reverse {
  from { transform: scale(1.09) translate(-1.2%, -0.8%); }
  to { transform: scale(1); }
}

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

/* Statisk text som ligger över alla bilder i bildspelet. */
.slideshow-caption {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 0;
  z-index: 1;
  padding: 3rem 2rem 2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 25, 48, 0.55) 45%, rgba(15, 25, 48, 0.92) 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  pointer-events: none;
}

.slideshow-caption .btn { pointer-events: auto; }

.slideshow-caption h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin: 0 0 0.35rem;
}

.slideshow-caption p {
  font-size: 1.05rem;
  max-width: 34em;
  margin: 0 0 1rem;
}

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 25, 48, 0.55);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.slide-nav:hover { background: rgba(15, 25, 48, 0.85); }

.slide-nav.prev { left: 2rem; }

.slide-nav.next { right: 2rem; }

.slide-dots {
  position: absolute;
  right: 2.5rem;
  bottom: 1.25rem;
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.slide-dots button {
  width: 0.6rem;
  height: 0.6rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(230, 239, 255, 0.4);
  cursor: pointer;
}

.slide-dots button.active { background: var(--accent); }

/* Course pages */

.course-hero { min-height: 55vh; }

.crumb { margin: 0 0 0.75rem; font-size: 0.95rem; }

.crumb a { color: var(--muted); text-decoration: none; }

.crumb a:hover { color: var(--text); }

.course-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.35rem;
}

.course-meta {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 1.25rem;
}

.prose {
  max-width: 44em;
  padding: 2.5rem 0 1rem;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.5rem;
}

.prose h2:first-child { margin-top: 0; }

.prose ul,
.prose ol {
  padding-left: 1.4rem;
  color: var(--muted);
}

.prose li { margin-bottom: 0.5rem; }

.prose li::marker {
  color: var(--accent);
  font-weight: 700;
}

.prose li strong { color: var(--text); }

.prose figure { margin: 1.5rem 0; }

.prose figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.prose figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

#boka { padding: 2rem 0 3.5rem; }

/* Buttons */

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--btn-text);
  font-weight: 700;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  cursor: pointer;
}

.btn:hover { background: var(--accent-dark); color: #fff; }

/* Sections */

section { scroll-margin-top: 4.5rem; }

#kurser, #sakerhet, #kontakt { padding: 3.5rem 1.25rem; }

.safety-list {
  padding-left: 1.4rem;
  color: var(--muted);
  max-width: 44em;
}

.safety-list li { margin-bottom: 0.5rem; }

.safety-list li::marker {
  color: var(--accent);
  font-weight: 700;
}

h2 { font-size: 2rem; margin: 0 0 0.5rem; }

.section-intro {
  color: var(--muted);
  max-width: 44em;
  margin-top: 0;
  /* Undvik ensamt ord på sista raden. */
  text-wrap: pretty;
}

/* Course cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card > a { display: block; line-height: 0; }

.card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dark);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
}

.card p { margin: 0 0 0.75rem; color: var(--text); }

.card ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--muted);
}

.card li { margin-bottom: 0.35rem; }

.card-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.price { color: var(--muted); }

.price strong {
  color: var(--text);
  font-size: 1.3rem;
}

/* Booking steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 0;
  margin: 1.5rem 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  color: var(--muted);
}

.steps li strong { color: var(--text); }

.steps li::before {
  content: counter(step);
  display: block;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--btn-text);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

/* Booking band */

.band {
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

.band p { max-width: 44em; }

/* Contact form */

form { max-width: 40rem; margin-top: 1.5rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 540px) {
  .field-row { grid-template-columns: 1fr; }
}

label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

textarea { resize: vertical; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#form-status { color: var(--accent); min-height: 1.5em; }

/* Footer */

footer {
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer a { color: var(--muted); }
