/* =====================================================================
   SWAN LANKA TOURS — POLISH LAYER (2026-10-14)
   SEO/accessibility/forms/motion fixes. Loaded last; keeps the existing look.
   Motion rules: transform + opacity (+ clip-path for image reveals) only,
   ease-out curves, content visible without JS (.js-anim is added by script).
   ===================================================================== */
:root{
  --ease-out:cubic-bezier(0.23,1,0.32,1);
  --ease-in-out:cubic-bezier(0.77,0,0.175,1);
  --focus-ring:#86e06b;
  --err:#ff9b8f;
}
html[data-theme="light"]{--focus-ring:#1f6b1a;--err:#b42318}

/* ---------- images keep their ratio when width/height attributes are present ---------- */
:where(img[width][height]){height:auto}

/* ---------- skip link ---------- */
.skip-link{position:fixed;left:12px;top:12px;z-index:100000;padding:12px 18px;min-height:44px;display:inline-flex;align-items:center;background:#5cba47;color:#0b161b;font-weight:700;border-radius:10px;transform:translateY(-200%);transition:transform 200ms var(--ease-out)}
.skip-link:focus,.skip-link:focus-visible{transform:none;outline:3px solid #fff;outline-offset:2px}
main:focus{outline:none}

/* ---------- focus + pointer ---------- */
:focus-visible{outline:3px solid var(--focus-ring);outline-offset:3px}
input:focus-visible,select:focus-visible,textarea:focus-visible,.nav-search input:focus-visible{outline:3px solid var(--focus-ring)!important;outline-offset:2px;box-shadow:none}
a[href],button,[role=button],summary,select,label[for],input[type=submit],input[type=checkbox],input[type=radio],.faq-q,.gallery-item,.hero-dot,.theme-tg,.theme-switch,.menu-toggle,.lang-btn,.to-top,.whatsapp-float{cursor:pointer}
button:disabled,[aria-disabled=true]{cursor:not-allowed}

/* ---------- inline icons (replace text glyphs) ---------- */
.ico{width:1em;height:1em;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none;display:inline-block;vertical-align:-.15em}
.utility-actions .ico{width:16px;height:16px}
.utility-actions>a{gap:8px}
.theme-switch .ico{width:14px;height:14px}
.chev{display:inline-flex;align-items:center;margin-left:5px}
.chev .ico{width:12px;height:12px;vertical-align:baseline;stroke-width:2.4}
.perk-icon .ico{width:14px;height:14px;stroke-width:2.6}
.to-top{display:grid;place-items:center}
.to-top .ico{width:18px;height:18px}
.whatsapp-float .ico{width:28px;height:28px;stroke-width:1.8}
.btn .ico{width:20px;height:20px}

/* ---------- touch targets ---------- */
.utility-actions>a,.theme-switch{min-height:44px;min-width:44px;justify-content:center}
.theme-tg,.menu-toggle,.lang-btn{min-width:44px;min-height:44px}
.to-top{width:44px;height:44px;right:22px}
.whatsapp-float{width:56px;height:56px}
.soc{width:44px;height:44px}
.breadcrumbs a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px}
.hero-dot{min-height:44px}
.dropdown-menu a{min-height:44px;display:flex!important;align-items:center}
.footer-grid>div>a,.footer-grid>div>p>a{display:inline-flex;align-items:center;min-height:44px}
.footer-grid>div>p>a{min-width:44px}
.gallery-filters button,.faq-q,.nav-cta{min-height:44px}
.utility-bar{height:auto;min-height:40px}

/* ---------- readable sizes ---------- */
.footer-grid>div>a,.footer-grid>div>p,.footer-grid>div>p>a{font-size:1rem}
.footer-bottom{font-size:.85rem}
.contact-form small,.booking-form small{font-size:.85rem}
.contact-list span{font-size:.8rem}
.breadcrumbs{font-size:.9rem}

/* ---------- forms ---------- */
.field{display:grid;gap:7px;margin-bottom:14px;min-width:0}
.field label{display:block;margin:0;font-size:.95rem;font-weight:700}
.field input,.field select,.field textarea{min-height:46px;font-size:1rem}
.field textarea{min-height:110px}
.req{color:var(--err)}
.field-error{color:var(--err);font-size:.9rem;font-weight:700;line-height:1.35}
.field-error[hidden]{display:none}
.field.has-error input,.field.has-error select,.field.has-error textarea{border-color:var(--err)!important}
.form-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:8px}
.form-actions .btn{flex:1 1 200px;min-height:48px}
.form-actions .btn-ghost{background:transparent!important;color:var(--txt)!important;border:1px solid var(--hair-2)!important;box-shadow:none!important}
.form-actions .btn-ghost:hover{background:rgba(92,186,71,.14)!important;border-color:var(--lime)!important;color:var(--txt)!important}
html[data-theme="light"] .form-actions .btn-ghost{color:#12262c!important;border-color:rgba(18,38,44,.35)!important}
.form-status{min-height:1.5em;margin:14px 0 0;font-size:.95rem;font-weight:700}
.form-status.is-ok{color:var(--lime-txt,#86e06b)}
.form-status.is-error{color:var(--err)}
html:not([data-theme="light"]) .form-status.is-ok{color:#86e06b}
html[data-theme="light"] .form-status.is-ok{color:#2f7a28}

/* ---------- animation tokens in use ---------- */
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}

/* hero text: visible without JS, enters once on load when .js-anim is set */
.js-anim .hero-content>*,.js-anim .inner-hero-content>*{animation:rise 600ms var(--ease-out) both;animation-delay:calc(var(--hi,0)*70ms + 60ms)}
.hero-content>:nth-child(2),.inner-hero-content>:nth-child(2){--hi:1}
.hero-content>:nth-child(3),.inner-hero-content>:nth-child(3){--hi:2}
.hero-content>:nth-child(4),.inner-hero-content>:nth-child(4){--hi:3}
.hero-content>:nth-child(5),.inner-hero-content>:nth-child(5){--hi:4}
.js-anim .inner-hero-content.reveal{opacity:1;transform:none}
.lux-split .w>span{transition:transform 600ms var(--ease-out),opacity 400ms var(--ease-out);transition-delay:calc(var(--i)*40ms + var(--d,0ms))}

/* scroll reveal (single IntersectionObserver in main.js) */
html:not(.js-anim) .reveal{opacity:1;transform:none}
.js-anim .reveal{opacity:0;transform:translateY(16px);transition:opacity 550ms var(--ease-out),transform 550ms var(--ease-out)!important;transition-delay:calc(var(--si,0)*50ms)!important}
.js-anim .reveal.in{opacity:1;transform:none}
.js-anim .reveal.in.rv-done{transition:transform 250ms var(--ease-out),opacity 250ms var(--ease-out),border-color 250ms var(--ease-out),background-color 250ms var(--ease-out)!important;transition-delay:0s!important}
.js-anim .inner-hero-content.reveal{transition:none!important}

/* itinerary: photo wipes in, marker line draws top-to-bottom */
.js-anim .timeline-item .itinerary-photo{clip-path:inset(0 0 100% 0);transition:clip-path 700ms var(--ease-out) 120ms}
.js-anim .timeline-item.in .itinerary-photo{clip-path:inset(0)}
.js-anim .timeline-item .timeline-marker{transform:scaleY(0);transform-origin:top;transition:transform 600ms var(--ease-out) 200ms}
.js-anim .timeline-item.in .timeline-marker{transform:scaleY(1)}
.js-anim .timeline-item .timeline-copy{opacity:0;transform:translateY(12px);transition:opacity 500ms var(--ease-out) 300ms,transform 500ms var(--ease-out) 300ms}
.js-anim .timeline-item.in .timeline-copy{opacity:1;transform:none}

/* press feedback */
.btn,.nav-cta,.round-btn,.gallery-filters button,.theme-tg,.menu-toggle,.contact-pill,.to-top,.whatsapp-float,.faq-q,.soc,.exp-pill{transition-property:transform,opacity,background-color,border-color,color,box-shadow}
.btn:active,button.btn:active,.nav-cta:active,.round-btn:active,.gallery-filters button:active,.theme-tg:active,.contact-pill:active,.to-top:active,.whatsapp-float:active,.soc:active,.exp-pill:active,.form-actions .btn:active{transform:scale(0.97)!important;transition-duration:160ms!important;transition-timing-function:var(--ease-out)!important}
.image-card:active,.tour-card:active,.day-card:active,.guide-card:active,.vehicle-card:active,.experience-card:active,.blog-card:active,.fleet-mini:active{transform:scale(0.97)!important;transition:transform 160ms var(--ease-out)!important}

/* hover lifts: pointer devices only */
@media (hover:none),(pointer:coarse){
  .btn:hover,.round-btn:hover,.soc:hover,.exp-pill:hover,.callout:hover,
  .image-card:hover,.attraction-card:hover,.local-card:hover,.tour-card:hover,.day-card:hover,.vehicle-card:hover,.experience-card:hover,.guide-card:hover,.blog-card:hover,.fleet-mini:hover,
  .reason:hover .reason-ico{transform:none!important}
  .image-card:hover img,.attraction-card:hover img,.local-card:hover img,.tour-card:hover img,.blog-card:hover img,.fan-card:hover .fan-img img,.w-card:hover img,.collage-photos img:hover,.adv-item:hover .adv-img img{transform:none!important}
}
@media (hover:hover) and (pointer:fine){
  .image-card:hover,.attraction-card:hover,.local-card:hover,.tour-card:hover,.day-card:hover,.vehicle-card:hover,.experience-card:hover,.guide-card:hover,.blog-card:hover,.fleet-mini:hover{transform:translateY(-4px)}
  .image-card,.attraction-card,.local-card,.tour-card,.day-card,.vehicle-card,.experience-card,.guide-card,.blog-card,.fleet-mini{transition:transform 250ms var(--ease-out),border-color 250ms var(--ease-out),background-color 250ms var(--ease-out)!important}
  .itinerary-photo img,.attraction-media img,.local-media img,.tour-image img,.day-card img,.image-card img,.blog-card img,.fan-img img,.adv-img img,.w-card img{transition:transform 300ms var(--ease-out)}
  .image-card:hover img,.attraction-card:hover img,.local-card:hover img,.tour-card:hover img,.day-card:hover img,.blog-card:hover img{transform:scale(1.04)}
  .btn:hover,.btn-primary:hover,.btn-dark:hover,.contact-pill:hover{transform:translateY(-2px)}
}

/* header: dropdowns, drawer, theme */
.dropdown-menu{transform-origin:top;transition:transform 120ms var(--ease-out),opacity 120ms var(--ease-out),visibility 0s linear 120ms}
.dropdown:hover .dropdown-menu,.dropdown:focus-within .dropdown-menu{opacity:1;visibility:visible;transform:none;transition:transform 220ms var(--ease-out),opacity 220ms var(--ease-out),visibility 0s}
@media (min-width:981px){.dropdown-menu{transform:translateY(8px) scale(0.98)}}
.lang-menu{transform-origin:top right;transition:transform 120ms var(--ease-out),opacity 120ms var(--ease-out),visibility 0s linear 120ms}
.lang-sw.open .lang-menu{transition:transform 220ms var(--ease-out),opacity 220ms var(--ease-out),visibility 0s}
@media (max-width:980px){
  .main-nav{transition:transform 200ms var(--ease-out),visibility 0s linear 200ms!important}
  .main-nav:not(.open){visibility:hidden}
  .main-nav.open{visibility:visible;transition:transform 300ms var(--ease-out)!important}
}
.menu-toggle span{transition:transform 200ms var(--ease-out),opacity 200ms var(--ease-out)}
html.theme-fade,html.theme-fade *,html.theme-fade *::before,html.theme-fade *::after{transition-property:background-color,color,border-color!important;transition-duration:200ms!important;transition-delay:0s!important;transition-timing-function:ease-out!important}

/* ---------- hero slider title (non-first slides are h2, styled like the h1) ---------- */
.hero-content h2.hero-title{margin:0}

/* ---------- reduced motion: no movement, only short fades ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js-anim .hero-content>*,.js-anim .inner-hero-content>*{animation:fadeIn 200ms linear both;animation-delay:0s}
  .js-anim .reveal,.js-anim .reveal.in,.js-anim .reveal.in.rv-done{transform:none!important;transition:opacity 150ms linear!important;transition-delay:0s!important}
  .js-anim .timeline-item .itinerary-photo,.js-anim .timeline-item.in .itinerary-photo{clip-path:none;transition:none}
  .js-anim .timeline-item .timeline-marker,.js-anim .timeline-item.in .timeline-marker{transform:none;transition:none}
  .js-anim .timeline-item .timeline-copy{transform:none;transition:opacity 150ms linear}
  .lux-split .w>span{transform:none!important;opacity:1!important;transition:none!important}
  .hero-slide,.hero-slide.is-active{transform:none!important;transition:opacity 200ms linear!important}
  .btn:hover,.btn:active,.round-btn:hover,.soc:hover,.exp-pill:hover,.callout:hover,.nav-cta:active,.theme-tg:active,.to-top:active,.whatsapp-float:active,.form-actions .btn:active,
  .image-card:hover,.attraction-card:hover,.local-card:hover,.tour-card:hover,.day-card:hover,.vehicle-card:hover,.experience-card:hover,.guide-card:hover,.blog-card:hover,.fleet-mini:hover,
  .image-card:active,.tour-card:active,.day-card:active,.guide-card:active,.vehicle-card:active,.experience-card:active,.blog-card:active,.fleet-mini:active,
  .reason:hover .reason-ico{transform:none!important}
  img,.hero-slide,.image-card img,.tour-image img,.day-card img,.blog-card img,.fan-img img,.adv-img img{transition:none!important}
  img:hover{transform:none!important}
  .dropdown-menu,.lang-menu{transform:none!important;transition:opacity 150ms linear,visibility 0s!important}
  .main-nav{transition:opacity 150ms linear,visibility 0s!important}
  .skip-link{transition:none}
  .ticker-track,.lux-ticker *{animation:none!important}
}

/* ---------- minimum readable sizes (uppercase micro-labels raised to 12px, body copy to 16px) ---------- */
.eyebrow,.hero-content .eyebrow,.badge,.micro,.chip-row span,.lux-stat span,.collage-chip,.callout small,.callout-note,small,.fleet-mini span,.w-copy a,.utility-actions>a span,.utility-tag{font-size:max(.75rem,12px)!important}
.btn,.contact-pill,.exp-pill span,.text-link{font-size:.8rem!important}
.section-head p,.fan-copy p,.adv-text p,.blog-copy p,.footer-brand p,.w-copy p,.fleet-mini p,.dropdown-menu a,.planning-steps p,.callout-note,.map-caption p,.contact-list strong{font-size:1rem!important}

/* ---------- 44px hit areas for small controls ---------- */
.w-copy a,.text-link{display:inline-flex;align-items:center;min-height:44px}
.hero-dot{min-width:44px}
.heart{width:44px;height:44px}
.round-btn.sm{width:44px;height:44px}
.fan-dots{gap:0}
.fan-dots button,.fan-dots button.on{width:44px;height:44px;border-radius:0;background:none!important;display:grid;place-items:center}
.fan-dots button::before{content:"";width:9px;height:9px;border-radius:50%;background:rgba(255,255,255,.35);transition:transform 250ms var(--ease-out),background-color 250ms var(--ease-out)}
.fan-dots button.on::before{width:30px;border-radius:6px;background:var(--lime)}
html[data-theme="light"] .fan-dots button::before{background:rgba(18,38,44,.35)}
html[data-theme="light"] .fan-dots button.on::before{background:var(--lime-txt,#2f7a28)}

.callout-note span,.lux-pin-list a{font-size:1rem!important}
.footer-bottom{font-size:.9rem}
@media(max-width:980px){.hero-content p{font-size:1rem!important}}

/* ---------- light-theme contrast fixes (>= 4.5:1) ---------- */
html[data-theme="light"] .route-box span,
html[data-theme="light"] .timeline-copy>span,
html[data-theme="light"] .attraction-copy small,
html[data-theme="light"] .local-copy small,
html[data-theme="light"] a.discovery-link{color:#2f7a28!important}
html[data-theme="light"] .tour-facts span{color:#52666a!important}
html[data-theme="light"] .gallery-filters button.active{color:#0b161b!important}
.discovery-link,.vehicle-copy a,.attraction-copy a,.local-copy a,.image-card-copy a,.tour-copy a,.day-copy a,.guide-card a{display:inline-flex;align-items:center;min-height:44px}
.nav-search form{height:46px}
.nav-search input{height:100%}
html:not([data-theme="light"]) .vehicle-copy strong{color:#9fd3cc!important}

/* ---------- 3D island stage: never wider than the screen, readable hint ---------- */
@media(max-width:700px){.lux-island-stage{min-height:0!important;aspect-ratio:1/1;width:100%}}
.lux-island-hint{background:rgba(9,20,25,.72);color:#e9eeea!important;padding:6px 14px;border-radius:999px;font-size:.75rem!important;white-space:nowrap}
@media(max-width:700px){.lux-island-hint{display:none}}

/* ---- Callout banner: real panorama with pins on Sigiriya, Ella (Nine Arch Bridge) and Galle (2026-10-14) ---- */
.callout-banner{min-height:0;aspect-ratio:1584/672;background:#0b161b}
.callout-media{position:absolute;inset:0}
.callout-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.callout-media .callout-shade{background:linear-gradient(90deg,rgba(6,14,18,.55),rgba(6,14,18,0) 32%,rgba(6,14,18,0) 70%,rgba(6,14,18,.45))}
.callout-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.callout-lines line{stroke:var(--lime);stroke-width:1.5;vector-effect:non-scaling-stroke;stroke-dasharray:100;stroke-dashoffset:100}
.callout-pin{position:absolute;z-index:2;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:var(--lime);box-shadow:0 0 0 2px rgba(255,255,255,.9),0 2px 8px rgba(0,0,0,.4);pointer-events:none}
.callout-pin:after{content:"";position:absolute;inset:-6px;border-radius:50%;border:1.5px solid var(--lime);opacity:0}
.callout-media .callout{translate:0 -50%;white-space:nowrap}
.callout-media .callout:before{display:none}
.callout-media .callout.c1{left:auto;right:79%;top:17.5%;bottom:auto}
.callout-media .callout.c2{left:80%;right:auto;top:64%;bottom:auto}
.callout-media .callout.c3{left:auto;right:77%;top:70%;bottom:auto}
.reveal.in .callout-lines line{stroke-dashoffset:0;transition:stroke-dashoffset 700ms var(--ease-out) 250ms}
.reveal.in .callout-pin:after{animation:callout-ping 2.4s var(--ease-out) 900ms infinite}
@keyframes callout-ping{0%{transform:scale(.6);opacity:.9}100%{transform:scale(2.2);opacity:0}}
html:not(.js-anim) .callout-lines line{stroke-dashoffset:0}
@media (max-width:1100px){.callout-media .callout{padding:10px 14px}.callout-media .callout strong{font-size:1.15rem}}
@media (max-width:820px){
  .callout-banner{aspect-ratio:auto;min-height:440px}
  .callout-media img{object-position:52% 50%}
  .callout-lines{display:none}
  .callout-pin{display:none}
  .callout-media .callout{translate:none}
  .callout-media .callout.c1{left:4%;right:auto;top:5%}
  .callout-media .callout.c2{left:auto;right:4%;top:auto;bottom:30%}
  .callout-media .callout.c3{left:4%;right:auto;top:auto;bottom:5%}
}
@media (prefers-reduced-motion:reduce){
  .callout-lines line{stroke-dashoffset:0!important;transition:none!important}
  .callout-pin:after{animation:none!important}
}

/* Vehicle photos are transparent cut-outs: show them on a soft spotlight stage, not a white box */
html .vehicle-art,
html .fleet-mini-img,
html[data-theme="dark"] .vehicle-art,
html[data-theme="dark"] .fleet-mini-img{
  background:radial-gradient(ellipse 75% 65% at 50% 62%,rgba(92,186,71,.20),rgba(63,138,140,.12) 45%,transparent 75%),linear-gradient(180deg,#132a31,#0c1a1f)!important;
}
html[data-theme="light"] .vehicle-art,
html[data-theme="light"] .fleet-mini-img{
  background:radial-gradient(ellipse 75% 65% at 50% 62%,rgba(92,186,71,.18),transparent 72%),linear-gradient(180deg,#f4f8f2,#e3ece0)!important;
}
html .vehicle-art img,
html .fleet-mini-img img{
  padding:6% 6% 4%;box-sizing:border-box;filter:drop-shadow(0 14px 18px rgba(0,0,0,.35));
}
