/* ZolWeb studio pages: tokens, header, buttons, template cards, preview modal, footer */
:root {
  /* "Eternal blue sky" palette */
  --paper: #f5fbfe; --paper-2: #e6f4fb; --ink: #041627; --ink-2: #4b6476; --line: #d3e6f0;
  --accent: #0077b6; --sky: #00d4ff; --sky-2: #48cae4; --mist: #caf0f8; --night: #03045e;
  --sky-grad: linear-gradient(135deg, #00d4ff, #0077b6);
  --display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", system-ui, sans-serif;
  --wrap: 1240px; --gut: clamp(16px, 4vw, 40px);
}
body { background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.serif { font-family: var(--display); font-weight: 700; letter-spacing: -.035em; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; color: var(--accent);
      background: var(--sky-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-right: .06em; }
.eyebrow { font: 500 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }

/* Header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .4s, box-shadow .4s, padding .4s; padding: 22px 0; }
.site-header.scrolled { background: rgba(245, 251, 254, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); padding: 14px 0; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 24px/1 var(--display); text-decoration: none; letter-spacing: -.04em; }
.brand svg { width: 28px; height: 28px; }
.brand i { font-style: normal; background: var(--sky-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a { text-decoration: none; font-size: 15px; color: var(--ink-2); transition: color .3s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.burger { display: none; background: none; border: 0; padding: 8px; }
.burger span { display: block; width: 24px; height: 1.5px; background: var(--ink); margin: 6px 0; transition: transform .4s var(--ease-out); }
.nav-open .burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-open .burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; border-radius: 999px; border: 1px solid var(--ink);
       text-decoration: none; font: 500 15px/1 var(--sans); background: transparent; transition: background .35s, color .35s, border-color .35s, transform .5s var(--ease-out); }
.btn svg { width: 16px; height: 16px; transition: transform .4s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 12px 28px -12px rgba(0, 119, 182, .6); }
.btn-sky { background: var(--sky-grad); color: #fff; border-color: transparent; box-shadow: 0 12px 28px -14px rgba(0, 119, 182, .7); }
.btn-sky:hover { filter: brightness(1.06); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 11px 18px; font-size: 14px; }
.nav .btn { padding: 11px 20px; }

/* Template cards */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: clamp(28px, 4vw, 48px); }
.tpl { display: flex; flex-direction: column; }
.tpl.hide { display: none; }
.tpl-view { position: relative; padding: 0 0 30px; cursor: pointer; border: 0; background: none; text-align: left; display: block; width: 100%; }
.tpl-frame { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 34px 70px -34px rgba(4, 22, 39, .45); transition: transform .9s var(--ease-out), box-shadow .9s var(--ease-out); }
.tpl-chrome { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #eaf3f8; }
.tpl-chrome i { width: 9px; height: 9px; border-radius: 50%; background: #c4d8e4; }
.tpl-chrome b { margin-left: 12px; height: 16px; border-radius: 5px; background: #fff; font: 500 10.5px/16px var(--sans); color: #6b8597; padding: 0 10px; }
.tpl-shot { aspect-ratio: 16 / 10; overflow: hidden; }
.tpl-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1.4s var(--ease-out); }
.tpl-phone { position: absolute; right: 4%; bottom: 0; width: 21%; aspect-ratio: 390 / 844; border-radius: 18px; overflow: hidden; border: 5px solid var(--ink);
             background: var(--ink); box-shadow: 0 24px 40px -18px rgba(4, 22, 39, .55); transition: transform .9s var(--ease-out); }
.tpl-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tpl-play { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%) scale(.85); opacity: 0; transition: all .5s var(--ease-out);
            background: var(--ink); color: var(--paper); border-radius: 999px; padding: 13px 20px; font: 500 14px/1 var(--sans); display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.tpl-play svg { width: 16px; height: 16px; }
.tpl-view:hover .tpl-frame, .tpl-view:focus-visible .tpl-frame { transform: translateY(-6px); box-shadow: 0 46px 80px -34px rgba(4, 22, 39, .5); }
.tpl-view:hover .tpl-shot img { transform: scale(1.035); }
.tpl-view:hover .tpl-phone { transform: translateY(-12px) rotate(2deg); }
.tpl-view:hover .tpl-play, .tpl-view:focus-visible .tpl-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.tpl-body { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: start; padding-top: 22px; }
.tpl-body h3 { font: 700 32px/1.05 var(--display); letter-spacing: -.02em; margin: 0; }
.tpl-type { font-size: 14px; color: var(--ink-2); }
.swatches { display: flex; gap: 6px; padding-top: 8px; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.tpl-body p { grid-column: 1 / -1; color: var(--ink-2); margin: 6px 0 0; font-size: 15.5px; }
.tpl-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.tpl-tags span { font-size: 12.5px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
.tpl-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Preview modal */
.pv { position: fixed; inset: 0; z-index: 200; background: rgba(4, 22, 39, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
      display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity .45s var(--ease-out); }
.pv.open { opacity: 1; pointer-events: auto; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px var(--gut); background: var(--paper); flex-wrap: wrap; }
.pv-title { font: 700 22px/1 var(--display); }
.pv-title small { font: 400 14px/1 var(--sans); color: var(--ink-2); margin-left: 8px; }
.pv-devices { display: flex; gap: 4px; background: var(--paper-2); border-radius: 999px; padding: 4px; }
.pv-devices button { border: 0; background: transparent; border-radius: 999px; padding: 8px 14px; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); transition: background .3s, color .3s; }
.pv-devices button svg { width: 16px; height: 16px; }
.pv-devices button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.pv-actions { display: flex; gap: 8px; align-items: center; }
.pv-x { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; }
.pv-x svg { width: 18px; height: 18px; }
.pv-stage { flex: 1; display: flex; justify-content: center; align-items: stretch; padding: 22px; overflow: hidden; min-height: 0; }
.pv-screen { width: 100%; max-width: 100%; background: #fff; border-radius: 12px; overflow: hidden; transform: translateY(24px) scale(.98);
             transition: width .7s var(--ease-out), max-width .7s var(--ease-out), border-radius .7s, transform .6s var(--ease-out); box-shadow: 0 40px 90px -30px rgba(0,0,0,.6); }
.pv.open .pv-screen { transform: none; }
.pv-screen iframe { width: 100%; height: 100%; border: 0; display: block; }
.pv[data-device="tablet"] .pv-screen { max-width: 820px; border-radius: 22px; }
.pv[data-device="phone"] .pv-screen { max-width: 390px; border-radius: 34px; border: 8px solid #111; }
.pv-lock { overflow: hidden; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 34px; font-size: 14px; color: var(--ink-2); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .nav-links { position: fixed; inset: 0; background: var(--paper); flex-direction: column; justify-content: center; gap: 28px;
               opacity: 0; pointer-events: none; transition: opacity .45s var(--ease-out); }
  .nav-links a { font: 700 34px/1 var(--display); color: var(--ink); }
  .nav-open .nav-links { opacity: 1; pointer-events: auto; }
  .burger { display: block; position: relative; z-index: 2; }
  .nav > .btn { display: none; }
  .tpl-body h3 { font-size: 28px; }
  .pv-devices .lbl, .pv-open-tab .lbl { display: none; }
  .pv-bar { padding: 10px 14px; }
  .pv-title small { display: none; }
  .pv-stage { padding: 10px; }
  .pv[data-device] .pv-screen { max-width: 100%; border-radius: 12px; border: 0; }
  .pv-devices { display: none; }
}

/* Home teaser: all templates in one row on wide screens */
@media (min-width: 1100px) {
  .tpl-grid.compact { grid-template-columns: repeat(3, 1fr); gap: 34px; }
  .tpl-grid.compact .tpl-body h3 { font-size: 28px; }
  .tpl-grid.compact .tpl-phone { width: 24%; border-width: 4px; border-radius: 14px; }
}

/* Hero showcase */
.showcase, .hero-art.showcase { position: relative; aspect-ratio: 1 / .86; }
.sc-laptop { position: absolute; left: 0; top: 4%; width: 92%; border-radius: 14px; overflow: hidden; background: #fff;
             box-shadow: 0 50px 90px -40px rgba(4, 22, 39, .55), 0 0 0 1px rgba(4,22,39,.06); }
.sc-bar { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #eaf3f8; }
.sc-bar i { width: 9px; height: 9px; border-radius: 50%; background: #c4d8e4; }
.sc-bar b { margin-left: 12px; height: 16px; border-radius: 5px; background: #fff; font: 500 10.5px/16px var(--sans); color: #6b8597; padding: 0 10px; min-width: 130px; }
.sc-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.sc-screen img, .sc-phone > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top;
  opacity: 0; transform: scale(1.06); transition: opacity 1.1s var(--ease-out), transform 5.5s cubic-bezier(.2,.6,.2,1); }
.sc-screen img.on, .sc-phone > img.on { opacity: 1; transform: scale(1); }
.sc-phone { position: absolute; right: 0; bottom: 6%; width: 27%; aspect-ratio: 390 / 844; border-radius: 26px; overflow: hidden; background: #111;
            border: 6px solid #111; box-shadow: 0 40px 60px -24px rgba(4, 22, 39, .6); }
.sc-phone > img { transition-delay: .15s; }
.sc-notch { position: absolute; z-index: 2; top: 6px; left: 50%; transform: translateX(-50%); width: 32%; height: 12px; border-radius: 99px; background: #111; }
.sc-caption { position: absolute; left: 4%; bottom: 0; display: grid; gap: 4px; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
              padding: 12px 16px 14px; min-width: 230px; box-shadow: 0 18px 36px -20px rgba(4,22,39,.4); transition: transform .5s var(--ease-out); }
.sc-caption:hover { transform: translateY(-3px); }
.sc-now { font: 500 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.sc-caption strong { font: 700 20px/1.15 var(--display); }
.sc-bar-p { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.sc-bar-p i { display: block; height: 100%; background: var(--accent); transform-origin: left; animation: scProg 4.2s linear forwards; }
.showcase.paused .sc-bar-p i { animation-play-state: paused; }
@keyframes scProg { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.sc-dots { position: absolute; left: 4%; top: calc(100% + 18px); display: flex; gap: 6px; }
.sc-dots button { width: 22px; height: 4px; border-radius: 4px; border: 0; padding: 0; background: var(--line); transition: background .3s, width .4s var(--ease-out); }
.sc-dots button.on { width: 40px; background: var(--ink); }
@media (max-width: 760px) { .sc-caption { min-width: 0; padding: 10px 12px 12px; } .sc-caption strong { font-size: 16px; } .sc-dots { display: none; } }

/* Template card links */
a.tpl-view { text-decoration: none; color: inherit; }
.sc-caption { text-decoration: none; color: inherit; }
.tpl-use { align-self: center; margin-left: 4px; font-size: 14px; font-weight: 500; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.tpl-use:hover { color: var(--ink); }
