/*
 * Design tokens ported verbatim from the Lovable export
 * (~/saltsjobaden-elegance/src/styles.css). Do not change these values —
 * they define the Lovable design's exact look. Colors use oklch, matching
 * the source.
 */

:root {
  --radius: 0.625rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0.04 264.695);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0.04 264.695);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0.04 264.695);
  --primary: oklch(0.3561 0.14032 269.05);
  --primary-foreground: oklch(0.984 0.003 247.858);
  --secondary: oklch(0.97 0.007 247.896);
  --secondary-foreground: oklch(0.208 0.042 265.755);
  --muted: oklch(0.97 0.007 247.896);
  --muted-foreground: oklch(0.55 0.04 257.417);
  --accent: oklch(0.97 0.007 247.896);
  --accent-foreground: oklch(0.208 0.042 265.755);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.984 0.003 247.858);
  --border: oklch(0.92 0.013 255.508);
  --input: oklch(0.92 0.013 255.508);
  --ring: oklch(0.55 0.08 269.05);
  --saltis: oklch(0.3561 0.14032 269.05);
  --saltis-light: oklch(0.5061 0.11226 269.05);
}

* {
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
}

/* ---- Animation utilities (ported from the source's @utility blocks) ---- */

.animate-fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* ---- Hero scroll indicator ---- */
.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  border: 0;
  cursor: pointer;
  animation: scroll-bounce 2s infinite;
  transition: color 0.3s ease;
}
.scroll-indicator:hover {
  color: rgba(255, 255, 255, 0.95);
}
.scroll-indicator:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
  color: rgba(255, 255, 255, 0.95);
}

@keyframes scroll-bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-12px);
  }
}

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

/* =====================================================================
 * Shared design system (2027 redesign)
 * Reusable component classes so pages stay visually consistent.
 * Colour scale: --saltis (#203184-ish) primary, white, light grey-blue.
 * ===================================================================== */

/* Admin-managed rich text (PM1/PM2/Schema). Tailwind's preflight strips
 * default element styles, so restore readable typography here and keep wide
 * tables from breaking the mobile layout. */
.prose-content {
  color: var(--foreground);
  line-height: 1.6;
  overflow-wrap: break-word;
}
.prose-content h1,
.prose-content h2 {
  color: var(--saltis);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 1.4rem 0 0.5rem;
}
.prose-content h3,
.prose-content h4 {
  color: var(--saltis);
  font-weight: 600;
  font-size: 1.02rem;
  margin: 1rem 0 0.35rem;
}
.prose-content p {
  margin: 0.6rem 0;
}
.prose-content ul,
.prose-content ol {
  margin: 0.6rem 0;
  padding-left: 1.4rem;
  list-style: revert;
}
.prose-content a {
  color: var(--saltis);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose-content strong {
  font-weight: 700;
}
.prose-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0.8rem 0;
}
.prose-content th,
.prose-content td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  text-align: left;
  white-space: nowrap;
}

/* Skip-to-content link (visible only on keyboard focus) */
.sc-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
}
.sc-skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--saltis);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sc-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--saltis);
}

/* Pill button (btn-pill) ----------------------------------------------
 * The site-wide call-to-action style: fully rounded, saltis blue, bold white
 * text and a → arrow on the right that nudges forward on hover. The arrow is
 * drawn with a CSS mask so markup stays a plain <a>/<button> with text. */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 48px;
  padding: 0.8rem 1.6rem 0.8rem 1.9rem;
  border: 0;
  border-radius: 9999px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--saltis) 88%, white), var(--saltis));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(32, 49, 132, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-pill::after {
  content: "";
  flex: none;
  width: 1.1em;
  height: 1.1em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s ease;
}
.btn-pill:hover,
.sc-card-hover:hover .btn-pill {
  filter: brightness(1.18);
  box-shadow: 0 8px 20px rgba(32, 49, 132, 0.3);
  transform: translateY(-2px);
}
.btn-pill:hover::after,
.sc-card-hover:hover .btn-pill::after {
  transform: translateX(3px);
}
.btn-pill:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--saltis) 45%, white);
  outline-offset: 2px;
}
.btn-pill[hidden] {
  display: none;
}
.btn-pill-sm {
  min-height: 40px;
  padding: 0.6rem 1.15rem 0.6rem 1.4rem;
  gap: 0.55rem;
  font-size: 0.875rem;
}
/* White pill for dark (saltis blue) backgrounds, e.g. the hero */
.btn-pill-light {
  background: #fff;
  color: var(--saltis);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.btn-pill-light:hover {
  filter: none;
  background: oklch(0.95 0.02 262);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
.btn-pill-light:focus-visible {
  outline-color: rgba(255, 255, 255, 0.6);
}
/* Secondary choice next to a primary pill (Avbryt, Tillbaka, …) */
.btn-pill-outline {
  background: #fff;
  color: var(--saltis);
  box-shadow: inset 0 0 0 2px var(--saltis);
}
.btn-pill-outline:hover {
  filter: none;
  background: oklch(0.965 0.015 262);
  box-shadow: inset 0 0 0 2px var(--saltis), 0 6px 16px rgba(32, 49, 132, 0.15);
}
/* Arrow on the left, pointing back */
.btn-pill-back {
  flex-direction: row-reverse;
  padding: 0.8rem 1.9rem 0.8rem 1.6rem;
}
.btn-pill-back.btn-pill-sm {
  padding: 0.6rem 1.4rem 0.6rem 1.15rem;
}
.btn-pill-back::after {
  transform: rotate(180deg);
}
.btn-pill-back:hover::after {
  transform: rotate(180deg) translateX(3px);
}
/* Buttons where an arrow would mislead (Avbryt) or that carry their own icon */
.btn-pill-no-arrow {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}
.btn-pill-no-arrow.btn-pill-sm {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.btn-pill-no-arrow::after {
  display: none;
}

/* Link cards on the home page (Hitta hit / Kontakta oss / Följ oss) ----- */
.contact-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(160deg, #fff 40%, oklch(0.975 0.012 262));
}
.contact-card .blob {
  position: absolute;
  z-index: -1;
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
  background: linear-gradient(200deg, oklch(0.93 0.04 262 / 0.85), oklch(0.96 0.02 262 / 0.35));
  filter: blur(1px);
  pointer-events: none;
}
.contact-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 9999px;
  background: oklch(0.945 0.028 262);
  color: var(--saltis);
}
.contact-icon .spark {
  position: absolute;
  width: 4px;
  border-radius: 9999px;
  background: oklch(0.58 0.17 262);
}
.contact-icon .spark-1 { height: 14px; top: -2px; right: 6px; transform: rotate(28deg); }
.contact-icon .spark-2 { height: 12px; top: 13px; right: -8px; transform: rotate(68deg); }

.map-frame {
  position: relative;
  width: 100%;
  height: 10rem;
  overflow: hidden;
  border-radius: 0.6rem;
  background: var(--secondary);
}
.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
/* On a phone the frame is ~280px and Google draws the hall's name to the right
 * of the pin, so the name ran off the edge. The iframe is made wider than the
 * frame and pulled left, which puts the pin in the left third and leaves room
 * for the label. The map is decorative (pointer-events: none), so the hidden
 * strip on the right costs nothing. Only below 640px: at wider sizes Google
 * places the label differently and the shift made it worse, not better. */
@media (max-width: 639px) {
  .map-frame iframe {
    width: calc(100% + 130px);
    margin-left: -130px;
  }
}

/* Instagram slideshow: four stacked photos, each visible for ~4s of a 16s
 * loop with a 1s crossfade. Same frame size as .map-frame so cards line up. */
.ig-slideshow {
  position: relative;
  width: 100%;
  height: 10rem;
  overflow: hidden;
  border-radius: 0.6rem;
  background: var(--secondary);
}
.ig-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: ig-fade 16s infinite;
}
/* Shifted 1s back so the first photo is already faded in on page load */
.ig-slideshow img:nth-of-type(1) { animation-delay: -1s; }
.ig-slideshow img:nth-of-type(2) { animation-delay: 3s; }
.ig-slideshow img:nth-of-type(3) { animation-delay: 7s; }
.ig-slideshow img:nth-of-type(4) { animation-delay: 11s; }
@keyframes ig-fade {
  0% { opacity: 0; }
  6.25% { opacity: 1; }
  25% { opacity: 1; }
  31.25% { opacity: 0; }
  100% { opacity: 0; }
}
.ig-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--saltis);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
@media (prefers-reduced-motion: reduce) {
  .ig-slideshow img { animation: none; }
  .ig-slideshow img:nth-of-type(1) { opacity: 1; }
}

/* Card -------------------------------------------------------------- */
.sc-card {
  background-color: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.sc-card-hover:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Multi-step form ------------------------------------------------- */
.form-step {
  display: none;
}
.form-step.is-active {
  display: block;
}

.sc-stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sc-stepper .sc-step {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
.sc-stepper .sc-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 19px;
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 2px;
  background: #d7dbe3;
}
.sc-stepper .sc-step.is-done::after {
  background: var(--saltis);
}
.sc-step-dot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: #e7eaf0;
  color: var(--saltis);
  font-weight: 700;
  font-size: 0.9rem;
}
.sc-step.is-active .sc-step-dot,
.sc-step.is-done .sc-step-dot {
  background: var(--saltis);
  color: #fff;
}
.sc-step-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.sc-step.is-active .sc-step-label {
  color: var(--saltis);
}
@media (max-width: 640px) {
  .sc-step-label {
    font-size: 0.58rem;
  }
}

/* Nav drawer ------------------------------------------------------- */
.sc-drawer {
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.sc-drawer.is-open {
  transform: translateX(0);
}
.sc-drawer-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.sc-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
body.sc-no-scroll {
  overflow: hidden;
}
