/* ==========================================================================
   The Relative Web — polish layer (public site + shared components)
   Loaded after app.css / hero4.css / sections*.css. Refines typography,
   spacing, interaction states, mobile layout and rendering performance
   without changing any markup contracts.
   ========================================================================== */
:root {
  --shadow-xs: 0 1px 2px rgba(40, 30, 10, .05);
  --shadow-sm: 0 2px 10px rgba(40, 30, 10, .06), 0 1px 2px rgba(40, 30, 10, .04);
  --shadow: 0 14px 40px rgba(40, 30, 10, .10), 0 2px 6px rgba(40, 30, 10, .05);
  --shadow-lg: 0 30px 70px rgba(40, 30, 10, .16), 0 6px 16px rgba(40, 30, 10, .06);
  --ring: 0 0 0 4px rgba(211, 184, 110, .22);
  --tabular: "tnum" 1, "lnum" 1;
}

/* ---------- base rendering */
html { scroll-padding-top: 90px; }
body { font-feature-settings: "kern" 1, "liga" 1, "calt" 1; text-rendering: optimizeLegibility; }
img { height: auto; }
::selection { background: rgba(211, 184, 110, .28); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible, .chip:focus-visible, .sc-tab:focus-visible { outline: none; box-shadow: var(--ring); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
h2 { letter-spacing: -.015em; }
.lead { font-size: clamp(1.05rem, 1.2vw, 1.2rem); }
.eyebrow { font-weight: 700; }
strong, b { font-weight: 600; }
.num, .tabular { font-variant-numeric: tabular-nums; font-feature-settings: var(--tabular); }
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  h2 { font-size: clamp(1.75rem, 7.6vw, 2.4rem); }
  .lead { font-size: 1rem; }
  .container { width: min(var(--max), calc(100vw - 32px)); }
}

/* ---------- buttons: consistent sizing, tactile states */
.btn { letter-spacing: .005em; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s; }
.btn:active { transform: translateY(0) scale(.985); box-shadow: none; transition-duration: .08s; }
.btn-gold { box-shadow: 0 1px 2px rgba(143, 111, 58, .25), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-outline { background: rgba(255, 255, 255, .55); }
.btn-outline:hover { box-shadow: 0 10px 24px rgba(27, 26, 23, .16); }
.btn-ghost:hover { background: rgba(27, 26, 23, .06); }
.btn .ico { transition: transform .25s var(--ease); }
.btn:hover .ico:last-child { transform: translateX(3px); }
.btn-sm { padding: 9px 16px; font-size: .84rem; gap: 8px; }
.btn-sm .ico { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .btn-lg { padding: 15px 24px; font-size: .98rem; width: 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- forms */
.field { margin-bottom: 20px; }
.field label, .label { font-size: .8rem; letter-spacing: .02em; color: var(--ink-soft); }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]):not([type=range]), select, textarea { box-shadow: var(--shadow-xs); }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #d9cfbc; }
input::placeholder, textarea::placeholder { color: #a39c8f; }
.field.has-error input, .field.has-error select, .field.has-error textarea, input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(196, 88, 79, .12); }
.field .error, .invalid-feedback, .text-danger.small { color: var(--danger); font-size: .8rem; margin-top: 6px; display: block; }
input[type=file] { padding: 10px 12px; font-size: .88rem; }

/* ---------- navigation */
.nav { transition: background .3s, box-shadow .3s, border-color .3s; }
.nav.scrolled { background: rgba(247, 243, 236, .92); box-shadow: 0 10px 30px rgba(40, 30, 10, .06); border-color: var(--line-soft); }
.nav .container { height: 74px; }
.nav-links a { position: relative; padding: 6px 0; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--gold); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-toggle { width: 42px; height: 42px; border-radius: 12px; display: none; place-items: center; color: var(--ink); transition: background .2s; }
.nav-toggle:hover { background: rgba(27, 26, 23, .06); }
.nav-toggle .ico { width: 22px; height: 22px; }
@media (max-width: 960px) {
  .nav .container { height: 64px; }
  .nav-toggle { display: grid; }
  .nav-links { top: 64px; padding: 10px 16px 18px; gap: 0; border-radius: 0 0 20px 20px; max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain; }
  .nav-links a { padding: 14px 10px; border-bottom: 1px solid var(--line-soft); font-size: 1rem; border-radius: 10px; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a::after { display: none; }
  .nav-links a:hover { background: var(--ivory); }
  .nav-actions .btn-sm { padding: 9px 14px; }
  html { scroll-padding-top: 76px; }
}

/* ---------- hero (artwork scene) */
.hero4-grid { padding: 36px 0 24px; }
.hero4 h1 { letter-spacing: -.02em; }
.hero4 .lead { line-height: 1.7; }
@media (max-width: 960px) {
  .hero4-grid { padding-top: 28px; text-align: left; }
  .hero4 h1 { font-size: clamp(2.2rem, 8.6vw, 3.1rem); }
  .scene { margin: 6px -16px 0; }
}
@media (max-width: 640px) {
  .scene .scard, .spol figcaption { display: none; }              /* tiny annotations are illegible at phone width */
  .scene { margin-top: 0; }
  .feature-strip-grid { grid-template-columns: repeat(2, 1fr); height: auto; gap: 0; }
  .fs-item { padding: 14px 12px; border-left: 0; border-top: 1px solid var(--line-soft); justify-content: flex-start; gap: 10px; }
  .fs-item:nth-child(-n+2) { border-top: 0; }
  .fs-item:nth-child(even) { border-left: 1px solid var(--line-soft); }
  .fs-item b { font-size: .86rem; white-space: normal; line-height: 1.25; }
  .fs-ico { width: 36px; height: 36px; }
  .fs-ico .ico { width: 18px; height: 18px; }
}

/* ---------- sections rhythm */
.sec { padding: clamp(56px, 7vw, 96px) 0; }
.sec-head { margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head p { max-width: 60ch; margin-inline: auto; }
.sec-head.row-head p { margin-inline: 0; }
.sec.alt { border-color: var(--line-soft); }
.sec.ink { background: linear-gradient(180deg, #1c2a26 0%, #182420 100%); }
.sec + .sec.alt, .sec.alt + .sec { border-top: 0; }
@media (max-width: 640px) { .sec { padding: 48px 0; } }

/* module cards */
.mod { border-radius: 18px; box-shadow: var(--shadow-xs); }
.mod:hover { box-shadow: var(--shadow); border-color: #ebdcb6; }
.mod-ico { border-radius: 14px; }
.step { background: #fff; box-shadow: var(--shadow-xs); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.step-n { font-style: italic; }
.ticks li .ico { box-shadow: 0 2px 6px rgba(31, 107, 74, .25); }

/* showcase */
.sc-tab { transition: background .2s, color .2s, box-shadow .2s; }
.sc-tab:hover { background: rgba(27, 26, 23, .05); }
.sc-tab.on { box-shadow: var(--shadow-sm); }
@media (max-width: 640px) {
  .sc-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 16px 10px; margin: 0 -16px; -webkit-overflow-scrolling: touch; }
  .sc-tab { scroll-snap-align: start; padding: 9px 14px; font-size: .84rem; }
  .sc-tab.on::after { display: none; }
}

/* trust + stats (dark band) */
.trust-item { transition: background .25s, border-color .25s, transform .25s var(--ease); }
.trust-item:hover { background: rgba(255, 255, 255, .08); border-color: rgba(211, 184, 110, .35); transform: translateY(-3px); }
.sec.ink .stats { gap: 12px; }
.sec.ink .stat b { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .sec.ink .stat { padding: 16px 6px 0; } .sec.ink .stat b { font-size: 2.2rem; } .sec.ink .stat span { font-size: .72rem; } }

/* templates */
.tpl2, .tpl { box-shadow: var(--shadow-xs); }
.tpl2:hover, .tpl:hover { box-shadow: var(--shadow); }
.tpl-body h4, .tpl2-title h4 { letter-spacing: 0; }

/* plans */
.plan { box-shadow: var(--shadow-xs); }
.plan:hover { box-shadow: var(--shadow); }
.plan.hi { box-shadow: var(--shadow-lg); }
.plan .price { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.plan .btn { width: 100%; }
@media (max-width: 900px) { .plans { gap: 16px; } .plan.hi { order: -1; } }

/* destinations, cards */
.dest, .dcard, .card, .feature, .testi, .site-card { box-shadow: var(--shadow-xs); }
.dest:hover, .feature:hover, .dcard:hover { box-shadow: var(--shadow); }
.dest .img img, .dcard img, .frame img, .world-item img, .mosaic img { transition: transform .9s var(--ease); }
.dest:hover .img img { transform: scale(1.05); }
.filters .chip { box-shadow: var(--shadow-xs); }

/* FAQ */
.faq details, .faq-item { transition: border-color .2s, box-shadow .2s; }
.faq details[open], .faq-item[open] { border-color: #ebdcb6; box-shadow: var(--shadow-sm); }
.faq summary:hover, .faq-item summary:hover { color: var(--gold-deep); }

/* CTA + footer */
.cta-pro { background: linear-gradient(135deg, #1c2a26, #16211d); position: relative; overflow: hidden; }
.cta-pro::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(211, 184, 110, .28), transparent 65%); top: -260px; right: -160px; pointer-events: none; }
.cta-pro > * { position: relative; }
@media (max-width: 640px) { .cta-pro { padding: 32px 24px; border-radius: 18px; } .cta-pro .row { width: 100%; } .cta-pro .row .btn { flex: 1; } }
.footer { padding: 60px 0 32px; margin-top: 0; }
.footer li a { transition: color .2s; }
.footer-bottom { gap: 12px; }
@media (max-width: 640px) { .footer { padding: 44px 0 28px; } .footer-grid { gap: 28px; } .footer .promise { font-size: 1.15rem; } .footer-bottom { flex-direction: column; } }

/* ---------- content pages */
.page-head { padding-bottom: 24px; }
.page-head p.lead { max-width: 60ch; }
.prose { font-size: 1.02rem; line-height: 1.75; }
.prose h3 { font-size: 1.6rem; margin-top: 40px; margin-bottom: 10px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--gold-deep); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(143, 111, 58, .35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--gold-deep); }

/* ---------- auth */
.auth-box h1 { font-size: 2.4rem; letter-spacing: -.015em; }
.auth-box .btn-block { padding: 15px 24px; }
.auth-side .quote { text-wrap: pretty; }
@media (max-width: 900px) {
  .auth-side { min-height: 0; padding: 28px 24px; }
  .auth-side .quote { display: none; }
  .auth-side .orb { display: none; }
  .auth-main { padding: 32px 20px 40px; }
  .auth-footnote { display: none; }
}

/* ---------- reveal: make the first screen render instantly, keep motion subtle */
.reveal { transform: translateY(18px); transition-duration: .7s; }
.hero4 .reveal { opacity: 1; transform: none; }
.no-js .reveal, .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- performance: skip layout work for off-screen sections */
.sec, .footer { content-visibility: auto; contain-intrinsic-size: auto 720px; }
.sec.ink { contain-intrinsic-size: auto 640px; }
.footer { contain-intrinsic-size: auto 420px; }

/* ---------- utilities */
.text-balance { text-wrap: balance; }
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 1000; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* ---------- phone: the hero artwork stays within the screen, the feature strip balances as 3 + 2 tiles,
   and the module tab row shows that it scrolls */
@media (max-width: 640px) {
  .hero4-grid { padding-bottom: 6px; }
  .hero4 .lead { font-size: 1rem; line-height: 1.65; margin-bottom: 22px; }
  .scene { margin: 4px -16px -2%; }
  .spol-1 { left: 70%; top: 2%; width: 24%; }
  .spol-2 { left: 67.5%; top: 44%; width: 27%; transform: rotate(-9deg); }
  .spol-beach { left: 1.5%; top: 66%; width: 22%; }
  .leaf-2 { display: none; }                                      /* the small leaf sat on the right edge */
  .leaf-3 { left: 69%; width: 24%; }
  .feature-strip { margin-top: 0; }
  .feature-strip-grid { display: flex; flex-wrap: wrap; justify-content: center; padding: 6px 0 8px; }
  .fs-item, .fs-item:nth-child(even), .fs-item:nth-child(-n+2) { flex: 0 0 33.333%; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 12px 6px; border: 0; }
  .fs-ico { width: 44px; height: 44px; }
  .fs-ico .ico { width: 20px; height: 20px; }
  .fs-item b { font-size: .84rem; line-height: 1.25; white-space: normal; }
  .fs-item small { display: none; }
  .sc-tabs { padding-right: 40px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
}
