/* ============================================================
   SAIL852.COM — Design System
   Static vanilla CSS — no build step required
   Fonts: Playfair Display (headings) + Inter (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── Custom Properties ── */
:root {
  --bg:         #ffffff;
  --surface:    #f9f9f9;
  --ink:        #1a1a1a;
  --slate:      #555555;
  --mist:       #999999;
  --hairline:   #eeeeee;
  --brand:      #e31e24;
  --link:       #0073aa;
  --available:  #27ae60;
  --sold:       #999999;
  --whatsapp:   #25D366;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    Inter, -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1280px;
  --section-gap: 80px;
  --radius: 4px;
  --nav-height: 72px;

  /* type scale — all ≤ 16px for body, display sizes for headings */
  --text-nav:     11px;
  --text-caption: 12px;
  --text-label:   11px;
  --text-body:    15px;
  --text-h3:      16px;
  --text-price:   16px;
  --text-h2:      clamp(22px, 3vw, 30px);
  --text-h1:      clamp(28px, 5vw, 44px);
  --text-hero:    clamp(32px, 6vw, 56px);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Utilities ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section    { padding: var(--section-gap) 0; }
.section--alt { background: var(--surface); }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Typography ── */
h1, .h1 { font-family: var(--font-display); font-size: var(--text-h1); font-weight: 600; line-height: 1.2; }
h2, .h2 { font-family: var(--font-display); font-size: var(--text-h2); font-weight: 600; line-height: 1.25; }
h3, .h3 { font-family: var(--font-display); font-size: var(--text-h3); font-weight: 600; line-height: 1.3; }
.section-title { text-align: center; margin-bottom: 12px; }
.section-rule  { width: 56px; height: 2px; background: var(--brand); margin: 0 auto 40px; }
.lead { font-size: 16px; color: var(--slate); line-height: 1.7; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: opacity .2s;
}
.btn:hover { opacity: .85; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--outline  { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn--whatsapp { background: var(--whatsapp); color: #fff; }

/* ── Navigation ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: #fff;
  border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center;
}
.nav__inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  width: 100%; display: flex; align-items: center; gap: 32px;
}
.nav__logo img { width: 40px; height: 40px; object-fit: cover; flex-shrink: 0; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  font-size: var(--text-nav);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding-bottom: 4px;
}
.nav__links a::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--brand);
  transition: width .2s;
}
.nav__links a:hover::after,
.nav__links a.active::after { width: 100%; }
.nav__spacer { flex: 1; }
.nav__whatsapp {
  font-size: var(--text-nav);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--whatsapp);
}
.nav__toggle { display: none; padding: 8px; }
@media (max-width: 768px) {
  .nav__links { display: none; flex-direction: column; align-items: flex-start; gap: 20px;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--hairline); padding: 20px 24px; }
  .nav__links.open { display: flex; }
  .nav__toggle { display: block; }
  .nav__whatsapp { display: none; }
}

/* ── Hero Slider ── */
.hero {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  margin-top: calc(-1 * var(--nav-height));
}
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1s ease;
}
.hero__slide.active { opacity: 1; }
.hero__slide img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.hero__gradient {
  position: absolute; inset-x: 0; bottom: 0; height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,.45) 0%, transparent 100%);
  pointer-events: none;
}
.hero__caption {
  position: absolute; bottom: 56px; left: 32px;
  color: #fff; max-width: 480px;
}
.hero__caption h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 32px);
  margin-bottom: 6px;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}
.hero__caption p {
  font-size: 14px;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
  opacity: .9;
}
.hero__prev, .hero__next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.85);
  color: var(--ink); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.hero__prev { left: 16px; }
.hero__next { right: 16px; }
.hero__dots {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 2;
}
.hero__dots button {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.5);
  transition: background .2s;
}
.hero__dots button.active { background: #fff; }

/* ── Yacht Grid ── */
.yacht-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.yacht-card { display: block; }
.yacht-card__img {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.yacht-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.yacht-card:hover .yacht-card__img img { transform: scale(1.04); }
.yacht-card__meta { font-size: var(--text-caption); color: var(--mist); margin-bottom: 4px; }
.yacht-card__name { font-family: var(--font-display); font-size: var(--text-h3); margin-bottom: 8px; }
.yacht-card__footer { display: flex; align-items: center; justify-content: space-between; }
.yacht-card__price { font-family: var(--font-display); font-size: var(--text-price); color: var(--link); }
.yacht-card__price--sold { color: var(--sold); }
.yacht-card__status { display: flex; align-items: center; gap: 6px; font-size: var(--text-label); text-transform: uppercase; letter-spacing: .08em; }
.yacht-card__dot { width: 7px; height: 7px; border-radius: 50%; }
.yacht-card__dot--available { background: var(--available); }
.yacht-card__dot--sold      { background: var(--sold); }

/* ── Filters ── */
.filters {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 16px 0;
}
.filters__inner {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}
.filters__inner select,
.filters__inner input[type=text],
.filters__inner input[type=number] {
  font-family: var(--font-body);
  font-size: var(--text-body);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  appearance: auto;
}
.filters__inner input[type=number] { width: 100px; }
.filters__price-range { display: flex; align-items: center; gap: 8px; font-size: var(--text-caption); color: var(--mist); }

/* ── Yacht Detail ── */
.detail-hero { width: 100%; aspect-ratio: 16/7; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-price-bar {
  display: inline-flex; align-items: center; gap: 16px;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 12px 18px; margin-bottom: 24px;
}
.detail-price { font-family: var(--font-display); font-size: 20px; color: var(--link); }
.detail-price--sold { color: var(--sold); }
.detail-section { margin-bottom: 32px; }
.detail-section h3 { margin-bottom: 12px; border-bottom: 1px solid var(--hairline); padding-bottom: 8px; }
.specs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs-table tr:last-child td { border-bottom: none; }
.specs-table td { padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.specs-table td:first-child { color: var(--slate); width: 50%; }
.features-list li { padding: 5px 0 5px 16px; position: relative; font-size: 14px; color: var(--slate); }
.features-list li::before { content: '–'; position: absolute; left: 0; color: var(--brand); }
.detail-sidebar > * + * { margin-top: 20px; }
.sidebar-card { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px; }
.sidebar-card h3 { margin-bottom: 14px; }
.sidebar-card p + p { margin-top: 6px; }
.sidebar-actions { display: flex; flex-direction: column; gap: 10px; }

/* ── Thumbnail Gallery ── */
.thumb-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 16px; }
@media (max-width: 600px) { .thumb-grid { grid-template-columns: repeat(3, 1fr); } }
.thumb-grid button { aspect-ratio: 4/3; overflow: hidden; border-radius: 2px; }
.thumb-grid button img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.thumb-grid button:hover img { opacity: .8; }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.9);
  flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox__header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; color: #fff;
}
.lightbox__counter { font-size: var(--text-caption); }
.lightbox__close { font-size: 24px; color: #fff; line-height: 1; }
.lightbox__main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative; padding: 0 60px;
}
.lightbox__main img { max-height: 75vh; max-width: 100%; object-fit: contain; }
.lightbox__prev, .lightbox__next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__prev { left: 12px; }
.lightbox__next { right: 12px; }
.lightbox__thumbs {
  display: flex; gap: 6px; overflow-x: auto; padding: 12px 20px;
}
.lightbox__thumbs button {
  flex-shrink: 0; width: 60px; height: 44px; overflow: hidden; border-radius: 2px;
  outline: 2px solid transparent; outline-offset: 2px;
}
.lightbox__thumbs button.active { outline-color: var(--brand); }
.lightbox__thumbs button img { width: 100%; height: 100%; object-fit: cover; }

/* ── Portal Partners ── */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.partner-card { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px; }
.partner-card h3 { margin-bottom: 8px; }
.partner-card p { font-size: 14px; color: var(--slate); margin-bottom: 12px; }
.partner-card a { font-size: var(--text-caption); text-transform: uppercase; letter-spacing: .08em; color: var(--link); }

/* ── Stories Grid ── */
.stories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.story-card { display: block; }
.story-card__img { aspect-ratio: 16/10; overflow: hidden; border-radius: var(--radius); margin-bottom: 12px; }
.story-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.story-card:hover .story-card__img img { transform: scale(1.04); }
.story-card__cat { font-size: var(--text-label); text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
.story-card__title { font-family: var(--font-display); font-size: var(--text-h3); margin: 4px 0 6px; }
.story-card:hover .story-card__title { text-decoration: underline; }
.story-card__excerpt { font-size: 13px; color: var(--slate); }

/* ── Story Article ── */
.article { max-width: 720px; margin: 0 auto; }
.article__hero { width: 100%; border-radius: var(--radius); margin-bottom: 32px; }
.article__body p { margin-bottom: 18px; font-size: 15px; color: var(--slate); line-height: 1.75; }
.article__photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 28px 0; }
.article__photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.article__notes { border-left: 3px solid var(--brand); background: var(--surface); padding: 20px 24px; border-radius: 0 var(--radius) var(--radius) 0; margin-top: 28px; }
.article__notes h3 { margin-bottom: 12px; }
.article__notes ul { list-style: disc; padding-left: 20px; }
.article__notes li { font-size: 14px; color: var(--slate); padding: 3px 0; }

/* ── About ── */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }
.about-photo { width: 100%; border-radius: var(--radius); }
.about-quote { font-family: var(--font-display); font-style: italic; font-size: 18px; border-left: 3px solid var(--brand); padding-left: 16px; margin: 20px 0; color: var(--ink); }
.about-contact { border-left: 3px solid var(--brand); padding: 12px 16px; margin-top: 20px; }
.about-contact p + p { margin-top: 4px; }
.about-steps { max-width: 680px; margin: 0 auto; }
.step { display: flex; gap: 20px; margin-bottom: 28px; }
.step__num {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--brand); color: var(--brand);
  font-family: var(--font-display); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.step__body h3 { margin-bottom: 6px; }
.step__body p  { font-size: 14px; color: var(--slate); }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.contact-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.contact-map { width: 100%; aspect-ratio: 4/3; border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.contact-map iframe { width: 100%; height: 100%; border: none; }
.contact-bar { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hairline); margin-top: 40px; }
.contact-bar a { text-align: center; padding: 18px; font-size: var(--text-body); border-right: 1px solid var(--hairline); }
.contact-bar a:last-child { border-right: none; }
.contact-bar a.whatsapp { color: var(--whatsapp); font-weight: 600; }

/* ── Page Hero (non-slider) ── */
.page-hero {
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 40px;
  border-bottom: 1px solid var(--hairline);
}
.page-hero h1 { margin-bottom: 6px; }
.page-hero__meta { font-size: var(--text-caption); color: var(--mist); }
.breadcrumb { font-size: var(--text-caption); color: var(--mist); margin-bottom: 12px; }
.breadcrumb a { color: var(--link); }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 20px 0;
}
.footer__inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px; font-size: var(--text-caption); color: var(--mist);
}
.footer__inner a { color: var(--link); }

/* ── Chat Widget ── */
.chat-launcher {
  position: fixed; bottom: 24px; left: 24px; z-index: 300;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform .2s;
}
.chat-launcher:hover { transform: scale(1.08); }
.whatsapp-launcher {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--whatsapp); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform .2s;
}
.whatsapp-launcher:hover { transform: scale(1.08); }
.chat-window {
  display: none;
  position: fixed; bottom: 86px; left: 24px; z-index: 300;
  width: 320px; max-height: 480px;
  background: #fff; border: 1px solid var(--hairline);
  border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.12);
  flex-direction: column; overflow: hidden;
}
.chat-window.open { display: flex; }
.chat-header {
  background: var(--ink); color: #fff;
  padding: 14px 16px; display: flex; justify-content: space-between; align-items: center;
}
.chat-header-title { font-family: var(--font-display); font-size: 15px; }
.chat-header-sub { font-size: 11px; opacity: .7; margin-top: 1px; }
.chat-header-close { font-size: 20px; color: #fff; opacity: .7; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; padding: 8px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.chat-msg--bot  { background: var(--surface); color: var(--ink); align-self: flex-start; }
.chat-msg--user { background: var(--ink); color: #fff; align-self: flex-end; }
.chat-quick-replies { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chat-quick-btn {
  font-size: 11px; padding: 5px 10px; border-radius: 20px;
  border: 1px solid var(--hairline); background: #fff; color: var(--link);
}
.chat-input-row { display: flex; border-top: 1px solid var(--hairline); }
.chat-input-row input { flex: 1; border: none; padding: 10px 14px; font-size: 13px; outline: none; }
.chat-input-row button { padding: 10px 14px; background: var(--brand); color: #fff; font-size: 13px; }

/* ── Responsive tweaks ── */
@media (max-width: 600px) {
  .thumb-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid  { gap: 28px; }
  .section     { padding: 48px 0; }
  .hero__caption { left: 16px; bottom: 80px; }
}
