/* SailWP — shared design system
   Loaded by every page. Page-specific styles stay inline per page.
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; }

:root {
  --coral: #e8845c;
  --coral-hover: #d4714a;
  --coral-dark: #c96740;
  --coral-shadow: #b55a38;
  --coral-glow: rgba(232,132,92,.25);
  --accent: #e8b87a;
  --plum: #6a5a7a;
  --plum-dark: #4a3a5e;
  --plum-shadow: #3a2a4e;
  --heading: #1a1a2e;
  --body: #2d3748;
  --secondary: #4a5568;
  --muted: #718096;
  --bg: #faf8f6;
  --bg-alt: #f5f0eb;
  --dark: #1a1a2e;
  --dark-card: #242440;
  --border: #e8e0d8;
  --green: #09bb03;
  --radius: 20px;
  --shadow-card: 0 2px 8px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
}

.sailwp {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  line-height: 1.8;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sailwp a { color: var(--coral); text-decoration: none; }
.sailwp a:hover { color: var(--coral-hover); }

/* ============================================
   LAYOUT
   ============================================ */
.sw-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

.sw-container--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px;
}

.sw-container--wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.sw-section {
  padding: 96px 0;
  position: relative;
}

.sw-section--alt {
  background: var(--bg-alt);
}

.sw-section-header {
  text-align: center;
  margin-bottom: 56px;
}

.sw-section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.sw-section-sub {
  font-size: 18px;
  color: var(--secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================
   NAVIGATION — Floating island pill
   ============================================ */
.sw-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 1040px;
  transition: transform .3s cubic-bezier(.4,0,.2,1), top .25s;
}

.sw-nav.is-scrolled {
  top: 10px;
}

.sw-nav.is-hidden {
  transform: translate(-50%, calc(-100% - 24px));
}

.sw-nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 8px 8px 20px;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 100px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04), 0 10px 28px rgba(0,0,0,.07);
}

.sw-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--heading);
  letter-spacing: .05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.sw-nav-brand:hover { color: var(--heading); }

.sw-nav-brand img {
  height: 22px;
  width: auto;
}

.sw-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sw-nav-item {
  position: relative;
}

.sailwp .sw-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  border-radius: 100px;
  transition: background .15s, color .15s;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  text-decoration: none;
}

.sailwp .sw-nav-link:hover,
.sailwp .sw-nav-link.is-active {
  color: var(--heading);
  background: rgba(0,0,0,.05);
}

.sw-nav-link svg {
  width: 14px;
  height: 14px;
  transition: transform .2s;
}

.sw-nav-item.is-open .sw-nav-link svg {
  transform: rotate(180deg);
}

/* Dropdown panel */
.sw-nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 280px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s, transform .15s;
}

.sw-nav-item.is-open .sw-nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.sw-nav-dropdown-item {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--body);
  transition: background .15s;
}

.sw-nav-dropdown-item:hover {
  background: var(--bg-alt);
  color: var(--heading);
}

.sw-nav-dropdown-item strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 2px;
}

.sw-nav-dropdown-item span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.sw-nav-pill {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--coral);
  margin-left: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.sw-nav-pill--muted {
  color: var(--muted);
}

.sw-nav-spacer {
  flex: 1;
}

.sw-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sailwp .sw-nav-login {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  border-radius: 100px;
  transition: background .15s, color .15s;
  text-decoration: none;
}

.sailwp .sw-nav-login:hover {
  color: var(--heading);
  background: rgba(0,0,0,.05);
}

.sailwp .sw-nav-cta,
.sailwp .sw-nav-cta:hover {
  color: #fff !important;
}

.sw-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--dark);
  border-radius: 100px;
  transition: transform .15s, background .15s;
  letter-spacing: .01em;
}

.sw-nav-cta:hover {
  background: #0f0f24;
  transform: translateY(-1px);
}

/* Mobile nav */
.sw-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  color: var(--heading);
}

.sw-nav-toggle:hover { background: rgba(0,0,0,.04); }

.sw-nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 820px) {
  .sw-nav { top: 12px; }
  .sw-nav-inner { gap: 12px; padding: 8px 8px 8px 16px; border-radius: 22px; }
  .sw-nav-links, .sw-nav-actions { display: none; }
  .sw-nav-spacer { display: none; }
  .sw-nav-toggle { display: inline-flex; }
  .sw-nav-mobile {
    display: block;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s;
  }
  .sw-nav.is-mobile-open .sw-nav-mobile { display: block; max-height: 500px; }
  .sw-nav-mobile-item {
    display: block;
    padding: 14px 16px;
    color: var(--body);
    font-weight: 500;
    border-radius: 6px;
  }
  .sw-nav-mobile-item:hover { background: var(--bg-alt); color: var(--heading); }
  .sw-nav-mobile-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
  }
  .sw-nav-mobile-cta {
    display: block;
    margin: 8px;
    padding: 14px 20px;
    background: var(--dark);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    font-weight: 700;
  }
  .sw-nav-mobile-cta:hover { color: #fff; }
}

.sw-nav-mobile { display: none; }

/* ============================================
   BUTTONS — Reusable
   ============================================ */
.sw-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--coral);
  border: 3px solid var(--coral-dark);
  border-radius: 4px;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 0 var(--coral-shadow);
  letter-spacing: .02em;
  cursor: pointer;
}

.sailwp .sw-btn-primary,
.sailwp .sw-btn-primary:hover { color: #fff !important; }

.sw-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--coral-shadow);
}

.sw-btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--coral-shadow);
}

.sw-btn-primary svg { width: 18px; height: 18px; }

.sw-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
  background: #fff;
  border: 3px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, border-color .2s;
  box-shadow: 0 4px 0 rgba(0,0,0,.08);
  letter-spacing: .02em;
}

.sw-btn-secondary:hover {
  color: var(--heading);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0,0,0,.08);
  border-color: var(--coral);
}

.sw-btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}

.sw-btn-secondary svg { width: 18px; height: 18px; }

/* Dark-theme variant for CTAs on dark bg */
.sw-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.06);
  border: 3px solid rgba(255,255,255,.25);
  border-radius: 4px;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, border-color .2s;
  box-shadow: 0 4px 0 rgba(0,0,0,.15);
  letter-spacing: .02em;
  white-space: nowrap;
}

.sailwp .sw-btn-ghost,
.sailwp .sw-btn-ghost:hover { color: #fff !important; }

.sw-btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0,0,0,.15);
  border-color: rgba(255,255,255,.4);
}

.sw-btn-ghost:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0,0,0,.15);
}

.sw-btn-ghost svg { width: 18px; height: 18px; }

/* ============================================
   FOOTER
   ============================================ */
.sw-footer {
  background: linear-gradient(180deg, #1f1f36 0%, var(--dark) 240px);
  color: rgba(255,255,255,.7);
  padding: 56px 0 40px;
  font-size: 15px;
  position: relative;
  overflow: hidden;
}

.sw-footer::before {
  content: '';
  position: absolute;
  top: -280px;
  right: -80px;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,184,122,.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.sw-footer::after {
  content: '';
  position: absolute;
  top: -240px;
  left: -140px;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,132,92,.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.sw-footer > * {
  position: relative;
  z-index: 1;
}

.sw-footer a { color: rgba(255,255,255,.7); }
.sw-footer a:hover { color: #fff; }

.sw-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 56px;
}

.sw-footer-brand img {
  height: 28px;
  margin-bottom: 16px;
}

.sw-footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,.55);
  max-width: 300px;
}

.sw-footer-badge {
  display: inline-block;
  margin-top: 20px;
  line-height: 0;
  opacity: .6;
  transition: opacity .2s;
}

.sw-footer-badge:hover { opacity: 1; }

.sw-footer-badge img {
  display: block;
  height: 44px;
  width: auto;
}

.sw-footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}

.sw-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sw-footer-col li a {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  transition: color .15s;
}

.sw-footer-col li a:hover { color: #fff; }

.sw-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,.45);
}

@media (max-width: 820px) {
  .sw-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 24px;
  }
  .sw-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .sw-footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ============================================
   FLOATING CONTACT FAB + POPOVER
   Brand-consistent FAB matching the Co-pilot rail-toggle. Click opens a small
   message panel; submit goes to Joost's inbox via /api/contact.
   ============================================ */
.sw-fab-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
}

.sw-floating-contact {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 8px;
  border: none;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(232,132,92,.20),
    0 10px 28px rgba(232,132,92,.32),
    0 2px 6px rgba(0,0,0,.08);
  transition: transform .18s ease, box-shadow .18s ease;
  opacity: 0;
  animation:
    sw-fc-in .5s ease .8s forwards,
    sw-fc-pulse 2.8s ease-in-out 1.4s infinite;
}
.sw-floating-contact img {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}
.sw-floating-contact:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 0 0 1px rgba(232,132,92,.30),
    0 14px 36px rgba(232,132,92,.45),
    0 2px 6px rgba(0,0,0,.10);
}
.sw-floating-contact:active { transform: translateY(0) scale(1); }

.sw-fab-root.is-open .sw-floating-contact { animation: sw-fc-in .5s ease forwards; }

/* Tooltip on hover (hidden when panel open) */
.sw-floating-contact::after {
  content: attr(data-tip);
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: 9px 14px;
  background: var(--dark);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.sw-floating-contact::before {
  content: '';
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid var(--dark);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.sw-floating-contact:hover::after,
.sw-floating-contact:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.sw-fab-root.is-open .sw-floating-contact::after,
.sw-fab-root.is-open .sw-floating-contact::before { display: none; }

/* Popover panel */
.sw-fab-panel {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #fbf6ee;
  border: 1px solid #eadfcd;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(30,20,50,.22), 0 8px 20px rgba(30,20,50,.10);
  padding: 22px 22px 18px;
  font-family: 'DM Sans', sans-serif;
  opacity: 0;
  transform: translateY(8px) scale(.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.sw-fab-root.is-open .sw-fab-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sw-fab-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}
.sw-fab-close:hover { background: rgba(0,0,0,.05); color: var(--heading); }

.sw-fab-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-right: 24px;
}
.sw-fab-header-img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  padding: 5px;
  box-shadow: 0 0 0 1px rgba(232,132,92,.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sw-fab-header-img img { width: 30px; height: 30px; display: block; object-fit: contain; }
.sw-fab-header-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -.005em;
  margin-bottom: 2px;
}
.sw-fab-header-text span {
  display: block;
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.45;
}

.sw-fab-form { display: flex; flex-direction: column; gap: 10px; }
.sw-fab-form textarea,
.sw-fab-form input[type="email"] {
  width: 100%;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 14px;
  color: var(--body);
  background: #fffcf6;
  border: 1.5px solid #eadfcd;
  border-radius: 10px;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.sw-fab-form textarea { min-height: 92px; max-height: 220px; line-height: 1.5; }
.sw-fab-form textarea:focus,
.sw-fab-form input[type="email"]:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(232,132,92,.15);
}
.sw-fab-submit {
  width: 100%;
  padding: 11px 16px;
  background: var(--coral);
  color: #fff;
  border: 2px solid var(--coral-dark);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--coral-shadow);
  transition: transform .1s;
  margin-top: 4px;
}
.sw-fab-submit:hover { transform: translateY(-1px); }
.sw-fab-submit:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--coral-shadow); }
.sw-fab-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.sw-fab-foot {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
  line-height: 1.5;
}
.sw-fab-error {
  padding: 9px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 4px;
}
.sw-fab-success {
  text-align: center;
  padding: 14px 4px;
}
.sw-fab-success-icon {
  width: 44px; height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #09bb03 0%, #1b7f17 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(9,187,3,.25);
}
.sw-fab-success strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 4px;
}
.sw-fab-success span {
  display: block;
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.5;
}

@keyframes sw-fc-in { to { opacity: 1; } }
@keyframes sw-fc-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(232,132,92,.20),
      0 10px 28px rgba(232,132,92,.32),
      0 2px 6px rgba(0,0,0,.08),
      0 0 0 0 rgba(232,132,92,0);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(232,132,92,.30),
      0 10px 28px rgba(232,132,92,.40),
      0 2px 6px rgba(0,0,0,.10),
      0 0 0 12px rgba(232,132,92,.10);
  }
}

@media (max-width: 600px) {
  .sw-fab-root { right: 16px; bottom: 16px; }
  .sw-floating-contact { width: 54px; height: 54px; }
  .sw-floating-contact img { width: 36px; height: 36px; }
  .sw-floating-contact::after,
  .sw-floating-contact::before { display: none; }
  .sw-fab-panel { bottom: 70px; }
}
