/* ============================================================
   Seven by Seven — Demo Engine v2
   Shared stylesheet for showcase demo sites.
   Each site overrides --accent, --bg, --ink etc. in its own
   <style> block after importing this file.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --bg:        #0c0f14;
  --bg-2:      #10141b;
  --panel:     #151a22;
  --panel-2:   #1a2029;
  --line:      #242c38;
  --line-soft: #1c232d;
  --ink:       #eef2f6;
  --ink-dim:   #b9c2cc;
  --muted:     #7d8894;
  --accent:    #34d399;
  --accent-2:  #0ea5e9;
  --on-accent: #06110c;
  --danger:    #f87171;
  --star:      #fbbf24;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  --shadow-1: 0 1px 3px rgba(0,0,0,.35);
  --shadow-2: 0 8px 30px rgba(0,0,0,.4);
  --shadow-3: 0 20px 60px rgba(0,0,0,.5);

  --ease: cubic-bezier(.22,.61,.36,1);
  --t-fast: .18s var(--ease);
  --t-med:  .45s var(--ease);

  --nav-h: 68px;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- 3. Layout primitives ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; position: relative; }
.section--alt { background: var(--bg-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ''; width: 22px; height: 1px; background: var(--accent); opacity: .7;
}

.section-head { max-width: 620px; margin-bottom: 56px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head h2 {
  font-size: clamp(30px, 4.2vw, 46px); font-weight: 700;
  letter-spacing: -.025em; line-height: 1.08; margin-bottom: 14px;
}
.section-head p { color: var(--ink-dim); font-size: 16.5px; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border-radius: var(--r-sm);
  font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  transition: transform var(--t-fast), box-shadow var(--t-fast),
              background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { flex: none; }

.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 24px -6px var(--accent); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px -6px var(--accent); }

.btn--ghost { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn--solid-alt { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); }
.btn--solid-alt:hover { border-color: var(--accent); transform: translateY(-2px); }

.btn--lg { padding: 17px 36px; font-size: 16px; }

/* ---------- 5. Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.nav.is-scrolled { border-bottom-color: var(--line-soft); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav__logo { font-size: 19px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.nav__logo .mark { width: 30px; height: 30px; flex: none; }
.nav__logo em { font-style: normal; color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav__links a { color: var(--ink-dim); font-size: 14px; font-weight: 500; transition: color var(--t-fast); }
.nav__links a:hover { color: var(--ink); }
.nav__cta { margin-left: 6px; padding: 11px 22px; font-size: 14px; }
.nav__burger { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--ink); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroDrift 22s var(--ease) forwards; }
@keyframes heroDrift { to { transform: scale(1); } }
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to right, color-mix(in srgb, var(--bg) 92%, transparent) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 55%, color-mix(in srgb, var(--bg) 30%, transparent) 100%),
    linear-gradient(to top, var(--bg) 2%, transparent 40%);
}
.hero__inner { max-width: 660px; }
.hero h1 {
  font-size: clamp(40px, 6.4vw, 68px); font-weight: 700;
  letter-spacing: -.035em; line-height: 1.04; margin-bottom: 22px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__sub { font-size: 17.5px; color: var(--ink-dim); max-width: 520px; margin-bottom: 34px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__meta {
  display: flex; gap: 28px; margin-top: 52px; padding-top: 26px;
  border-top: 1px solid var(--line-soft); flex-wrap: wrap;
}
.hero__meta .m { font-size: 13.5px; color: var(--muted); }
.hero__meta .m strong { display: block; font-size: 19px; color: var(--ink); font-weight: 700; letter-spacing: -.02em; }

/* ---------- 7. Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 30px;
  transition: transform var(--t-med), border-color var(--t-med), background var(--t-med);
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 65%);
  opacity: 0; transition: opacity var(--t-med);
}
.card:hover { transform: translateY(-4px); border-color: var(--line); background: var(--panel-2); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 17.5px; font-weight: 650; letter-spacing: -.015em; margin-bottom: 8px; }
.card p { color: var(--ink-dim); font-size: 14.5px; }
.card .icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent); margin-bottom: 18px;
}
.card .icon svg { width: 22px; height: 22px; }
.card .card__link {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--accent);
}
.card .card__link svg { transition: transform var(--t-fast); }
.card:hover .card__link svg { transform: translateX(4px); }

/* ---------- 8. Reviews ---------- */
.reviews { columns: 3; column-gap: 22px; }
.review {
  break-inside: avoid; margin-bottom: 22px;
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 26px;
}
.review__stars { display: flex; gap: 3px; color: var(--star); margin-bottom: 12px; }
.review__stars svg { width: 15px; height: 15px; }
.review__text { font-size: 14.5px; color: var(--ink-dim); margin-bottom: 16px; }
.review__who { display: flex; align-items: center; gap: 12px; }
.review__avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.review__name { font-size: 13.5px; font-weight: 600; }
.review__loc { font-size: 12.5px; color: var(--muted); }

/* ---------- 9. Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery a {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r-sm); aspect-ratio: 4 / 3; background: var(--panel);
}
.gallery img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease), filter .7s var(--ease);
  filter: saturate(.92);
}
.gallery a:hover img { transform: scale(1.06); filter: saturate(1.05); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 26px 14px 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--t-med), transform var(--t-med);
}
.gallery a:hover figcaption { opacity: 1; transform: translateY(0); }
.gallery .span-2 { grid-column: span 2; }

/* ---------- 10. Forms ---------- */
.form {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 40px;
}
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--ink); font-size: 15px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field textarea { min-height: 110px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237d8894' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.form__foot { margin-top: 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form__note { font-size: 12.5px; color: var(--muted); }
.form-done { text-align: center; padding: 30px 10px; display: none; }
.form-done.is-visible { display: block; animation: pop .5s var(--ease); }
.form-done .tick {
  width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
}
.form-done h3 { font-size: 21px; margin-bottom: 6px; }
.form-done p { color: var(--ink-dim); font-size: 14.5px; }
@keyframes pop { 0% { transform: scale(.92); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- 11. Chat widget ---------- */
.chat-fab {
  position: fixed; right: 22px; bottom: 76px; z-index: 120;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-2), 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
  animation: fabPulse 3.2s infinite;
  transition: transform var(--t-fast);
}
.chat-fab:hover { transform: scale(1.07); }
.chat-fab svg { width: 25px; height: 25px; }
@keyframes fabPulse {
  0%, 100% { box-shadow: var(--shadow-2), 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
  55%      { box-shadow: var(--shadow-2), 0 0 0 14px transparent; }
}
.chat-panel {
  position: fixed; right: 22px; bottom: 146px; z-index: 121;
  width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100svh - 190px));
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none;
  transition: opacity var(--t-med), transform var(--t-med);
}
.chat-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.chat-panel__head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line-soft);
  background: var(--panel-2);
}
.chat-panel__head .dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.2); }
.chat-panel__head .t { font-size: 14.5px; font-weight: 650; }
.chat-panel__head .s { font-size: 12px; color: var(--muted); }
.chat-panel__close { margin-left: auto; color: var(--muted); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.chat-panel__close:hover { color: var(--ink); background: var(--line-soft); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg {
  max-width: 82%; padding: 11px 15px; border-radius: 15px;
  font-size: 14px; line-height: 1.5;
  animation: msgIn .3s var(--ease);
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.chat-msg--bot { background: var(--panel-2); border: 1px solid var(--line-soft); border-bottom-left-radius: 5px; align-self: flex-start; color: var(--ink-dim); }
.chat-msg--user { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 5px; align-self: flex-end; font-weight: 500; }
.chat-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 12px; }
.chat-chips button {
  padding: 8px 14px; font-size: 12.5px; font-weight: 550;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink-dim);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.chat-chips button:hover { border-color: var(--accent); color: var(--accent); }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line-soft); }
.chat-input input {
  flex: 1; padding: 12px 15px; font-size: 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px; color: var(--ink);
}
.chat-input input:focus { outline: none; border-color: var(--accent); }
.chat-input button {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
}
.typing { display: inline-flex; gap: 5px; padding: 13px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: tp 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes tp { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ---------- 12. Showcase ribbon ---------- */
.ribbon {
  position: fixed; inset: auto 0 0 0; z-index: 110;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.ribbon__tag { font-family: var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.ribbon__tag b { color: var(--accent); font-weight: 700; }
.ribbon a { font-weight: 650; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.ribbon a:hover { color: var(--accent); }
body.has-ribbon { padding-bottom: 48px; }

/* ---------- 13. Footer ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 64px 0 40px; background: var(--bg-2); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 44px; margin-bottom: 44px; }
.footer__brand p { color: var(--muted); font-size: 14px; max-width: 320px; margin-top: 12px; }
.footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer__links { list-style: none; display: grid; gap: 10px; }
.footer__links a { color: var(--ink-dim); font-size: 14px; }
.footer__links a:hover { color: var(--accent); }
.footer__base {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--muted);
}

/* ---------- 14. Scroll reveal (CSS-first, JS enhances) ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-stagger.is-in > * { opacity: 1; transform: none; }
.reveal-stagger.is-in > *:nth-child(1) { transition-delay: .04s; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: .10s; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: .22s; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: .28s; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: .34s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero__media img { animation: none; transform: none; }
  html { scroll-behavior: auto; }
}
/* If JS never runs, never hide content */
.no-js .reveal, .no-js .reveal-stagger > * { opacity: 1; transform: none; }

/* ---------- 15. Misc ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 26px 12px; border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--panel); }
.stat strong { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.03em; color: var(--accent); }
.stat span { font-size: 12.5px; color: var(--muted); }

.tick-list { list-style: none; display: grid; gap: 12px; }
.tick-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-dim); font-size: 15px; }
.tick-list svg { flex: none; margin-top: 3px; color: var(--accent); }

/* ---------- 16. Responsive ---------- */
@media (max-width: 960px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .reviews { columns: 2; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .section { padding: 68px 0; }
  .wrap { padding: 0 20px; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav.is-open .nav__links {
    display: flex; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 18px 22px 22px;
  }
  .nav.is-open .nav__links a { padding: 9px 0; font-size: 15px; }
  .nav.is-open .nav__cta { margin: 10px 0 4px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .reviews { columns: 1; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .span-2 { grid-column: span 2; }
  .form__grid { grid-template-columns: 1fr; }
  .form { padding: 26px 20px; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .hero__meta { gap: 18px; }
  .ribbon { font-size: 11px; padding: 9px 14px; }
  .chat-fab { bottom: 66px; }
  .chat-panel { bottom: 134px; }
}
