/* Shared base for CloudHomi's sample sites (public/samples/*.html).
   Self-hosted fonts only — the site's CSP allows font-src 'self'. */
@font-face { font-family: "Archivo"; src: url("fonts/archivo-var-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-italic-var.woff2") format("woff2"); font-style: italic; font-weight: 100 900; font-display: swap; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body { font-family: "Archivo", "Helvetica Neue", Arial, sans-serif; line-height: 1.5; }
img { display: block; max-width: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
em, .serif { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 400; }
.sample-foot { text-align: center; font-size: 12px; opacity: .55; padding: 26px 0 30px; letter-spacing: .04em; }
@media (max-width: 760px) { .wrap { padding: 0 20px; } }

/* Scroll reveal (fx.js adds .in) and sticky nav shadow */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--d, 0) * 90ms); }
.rv.in { opacity: 1; transform: none; }
.sticky { position: sticky; top: 0; z-index: 50; transition: box-shadow .3s ease, background .3s ease; }
.sticky.scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.35); }
.zoom { overflow: hidden; }
.zoom img { transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.zoom:hover img { transform: scale(1.06); }
.stars { letter-spacing: 2px; }
/* Generic footer — colours come from the page */
.foot { padding: 70px 0 10px; }
.foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot h5 { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; opacity: .6; margin-bottom: 14px; font-weight: 600; }
.foot li { list-style: none; margin: 8px 0; font-size: 15px; opacity: .85; }
.foot .bar { display: flex; justify-content: space-between; border-top: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 15%, transparent); margin-top: 50px; padding-top: 22px; font-size: 13px; opacity: .6; }
.news { display: flex; gap: 8px; margin-top: 16px; }
.news span { flex: 1; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius: 999px; padding: 12px 18px; font-size: 14px; opacity: .7; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* =====================================================================
   Showcase layer — shared by every sample site. Each page sets its own
   --acc / --acc2 colours; everything below picks them up.
   ===================================================================== */
:root { --acc: #0d9488; --acc2: #6d28d9; }

/* Headlines rise in word by word (fx.js splits them) */
.split { display: block !important; }
.sw { display: inline-block !important; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.sw > span { display: inline-block !important; transform: translateY(105%); transition: transform 1s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--w, 0) * 60ms); }
.split-in .sw > span { transform: none; }

/* Accent words in headlines: a flowing gradient */
h1 em, h2 em, .grad-text {
  background: linear-gradient(100deg, var(--acc), var(--acc2), var(--acc));
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
  animation: flow 6s ease-in-out infinite;
}
@keyframes flow { 50% { background-position: 100% 0; } }

/* Gradient cards: a glowing gradient edge that lights on hover, a soft wash inside */
.gc { position: relative; isolation: isolate; transition: transform .5s cubic-bezier(.16,1,.3,1), box-shadow .5s ease; transform-style: preserve-3d; will-change: transform; }
.gc::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: 2; pointer-events: none;
  background: linear-gradient(var(--ga, 135deg), var(--acc), var(--acc2), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .25; transition: opacity .4s ease;
}
.gc::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--acc) 16%, transparent), transparent 60%);
  opacity: 0; transition: opacity .4s ease;
}
.gc:hover { box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--acc) 55%, transparent); }
.gc:hover::before { opacity: 1; animation: spin-edge 3s linear infinite; }
.gc:hover::after { opacity: 1; }
@property --ga { syntax: "<angle>"; inherits: false; initial-value: 135deg; }
@keyframes spin-edge { to { --ga: 495deg; } }

/* Buttons: a lift and a shimmer sweep */
.btn { position: relative; overflow: hidden; transition: transform .25s cubic-bezier(.2,1.4,.4,1), box-shadow .25s ease !important; }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.4) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s ease; pointer-events: none; }
.btn:hover { transform: translateY(-3px) !important; box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--acc) 70%, transparent); }
.btn:hover::after { transform: translateX(120%); }

/* Photos: slow zoom on hover; hero photos drift on scroll (fx.js sets --py) */
.zoom img, .ph img { transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.gc:hover img, .zoom:hover img { transform: scale(1.07); }
.parallax { transform: translateY(var(--py, 0px)) scale(1.08); will-change: transform; }

/* Text strips scroll by themselves */
.ticker { overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; animation: tick 28s linear infinite; }
@keyframes tick { to { transform: translateX(-50%); } }

/* Paragraphs and labels fade up */
.fu { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--d, 0) * 80ms); }
.fu.in { opacity: 1; transform: none; }

/* A thin animated colour line under the sticky nav */
.sticky::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--acc), var(--acc2), var(--acc)); background-size: 200% 100%; animation: flow 5s linear infinite; opacity: 0; transition: opacity .3s; }
.sticky.scrolled::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .sw > span, .fu { transform: none !important; opacity: 1 !important; transition: none; }
  h1 em, h2 em, .grad-text, .ticker-track, .gc:hover::before, .sticky::after { animation: none; }
  .parallax { transform: none; }
}
