/* ============================================================
   EZYSPHERE - shared design system
   Editorial, premium, intentionally not "template SaaS".
   Per-page brand accents are set with --brand / --brand-2
   in an inline <style> AFTER this file loads.
   ============================================================ */

:root {
  /* House palette (Ezysphere corporate) */
  --ink:        #10171c;   /* near-black slate */
  --ink-soft:   #1a2730;
  --slate:      #2d4350;
  --muted:      #6c8492;
  --line:       rgba(16, 23, 28, 0.10);
  --line-soft:  rgba(16, 23, 28, 0.06);
  --paper:      #f6f4ef;   /* warm off-white, not pure white */
  --paper-2:    #efebe2;
  --white:      #ffffff;

  /* Brand accent - overridden per page */
  --brand:      #2d6a7f;   /* teal, house default */
  --brand-2:    #6ab4c8;
  --brand-ink:  #ffffff;   /* text color on brand fills */

  --maxw: 1180px;
  --gut: clamp(22px, 5vw, 64px);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* fine grain so flats don't look "rendered" */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- type scale ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 460;
  line-height: 1.02;
  letter-spacing: -0.018em;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
}
.display em { font-style: italic; font-variation-settings: "SOFT" 60, "WONK" 1; color: var(--brand); }

h2.section-title {
  font-family: var(--font-display);
  font-weight: 480;
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
}
h2.section-title em { font-style: italic; color: var(--brand); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--brand);
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--slate); max-width: 56ch; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
section { position: relative; padding-block: clamp(70px, 11vw, 150px); }
.tight { padding-block: clamp(48px, 7vw, 90px); }

/* ---------- buttons ---------- */
.btn {
  --pad-y: 14px;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-size: 0.92rem; font-weight: 600; letter-spacing: 0.01em;
  padding: var(--pad-y) 26px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .35s var(--ease), background .3s, color .3s, box-shadow .35s, border-color .3s;
  will-change: transform;
}
.btn .i { transition: transform .35s var(--ease); }
.btn:hover .i { transform: translateX(4px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -14px color-mix(in srgb, var(--brand) 75%, transparent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-light { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.28); }
.btn-light:hover { background: rgba(255,255,255,0.16); transform: translateY(-2px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gut);
  transition: padding .5s var(--ease), background .5s var(--ease), box-shadow .5s, backdrop-filter .5s;
}
.nav.scrolled {
  padding: 12px var(--gut);
  background: color-mix(in srgb, var(--ink) 90%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255,255,255,0.07), 0 24px 50px -28px rgba(0,0,0,0.6);
}
.nav.scrolled .brand-text, .nav.scrolled .nav-links a { color: rgba(255,255,255,0.82); }
.nav.scrolled .nav-links a:hover { color: #fff; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 34px; width: 34px; object-fit: contain; border-radius: 8px; }
.brand-text { font-family: var(--font-display); font-size: 1.28rem; letter-spacing: 0.01em; color: var(--ink); transition: color .4s; }
.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; }
.nav-links a { font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em; color: var(--slate); transition: color .3s; }
.nav-links a:hover { color: var(--brand); }
.nav-cta {
  font-size: 0.82rem; font-weight: 600; padding: 9px 20px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink); transition: all .3s;
}
.nav.scrolled .nav-cta { color: #fff; border-color: rgba(255,255,255,0.35); }
.nav-cta:hover { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { width: 24px; height: 2px; background: var(--ink); transition: .3s; }
.nav.scrolled .nav-burger span { background: #fff; }

/* dark-themed app pages flip nav defaults */
.theme-dark .nav .brand-text,
.theme-dark .nav .nav-links a { color: rgba(255,255,255,0.8); }
.theme-dark .nav .nav-cta { color: #fff; border-color: rgba(255,255,255,0.3); }
.theme-dark .nav .nav-burger span { background: #fff; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: rgba(255,255,255,0.62); padding-block: 70px 34px; }
.foot a { color: rgba(255,255,255,0.62); transition: color .3s; }
.foot a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot h4 { color: #fff; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 18px; font-weight: 600; }
.foot ul { list-style: none; display: grid; gap: 11px; font-size: 0.9rem; }
.foot .brand-text { color: #fff; }
.foot-lead { font-size: 0.92rem; max-width: 34ch; margin: 18px 0 22px; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); margin-top: 54px; padding-top: 26px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.82rem; color: rgba(255,255,255,0.45);
}
.foot-social { display: flex; gap: 14px; }
.foot-social a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.16); transition: all .3s;
}
.foot-social a:hover { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); transform: translateY(-3px); }

/* ---------- device frame (phone mockup) ---------- */
.device {
  position: relative; width: 290px; aspect-ratio: 9 / 19.5;
  border-radius: 28px; padding: 12px;
  background: #141417;
  box-shadow:
    0 2px 1px rgba(255,255,255,0.18) inset,
    0 -2px 2px rgba(0,0,0,0.5) inset,
    0 50px 90px -30px rgba(0,0,0,0.55);
}
.device::before { /* notch */
  content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 26px; background: #08080a; border-radius: 0 0 16px 16px; z-index: 3;
}
.device-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 16px; overflow: hidden; background: #000;
}
.device-screen img { width: 100%; height: 100%; object-fit: cover; }
.device-float { animation: floaty 6s var(--ease) infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-16px) } }

/* ---------- cards / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 500;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.card {
  background: var(--white); border: 1px solid var(--line-soft); border-radius: 20px;
  padding: 30px; transition: transform .45s var(--ease), box-shadow .45s, border-color .45s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -34px rgba(16,23,28,0.4); border-color: var(--line); }
.card .ico {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.2rem; margin-bottom: 20px;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand);
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s } .reveal.d2 { transition-delay: .16s }
.reveal.d3 { transition-delay: .24s } .reveal.d4 { transition-delay: .32s }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .device-float { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- prose (legal pages) ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-family: var(--font-display); font-weight: 480; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.01em; }
.prose h2 { font-family: var(--font-display); font-weight: 480; font-size: 1.4rem; margin: 40px 0 12px; }
.prose p, .prose li { color: var(--slate); font-size: 1.02rem; }
.prose ul, .prose ol { padding-left: 22px; margin: 12px 0; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose code { background: var(--paper-2); padding: 2px 7px; border-radius: 6px; font-size: 0.92em; }
.prose table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.prose th, .prose td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 0.95rem; vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; color: var(--slate); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 0.98rem; color: var(--ink);
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--white); outline: none; transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkrow { display: flex; gap: 11px; align-items: flex-start; margin: 6px 0 4px; }
.checkrow input { width: auto; margin-top: 4px; }
.checkrow label { font-weight: 400; color: var(--slate); font-size: 0.92rem; }

/* ============================================================
   APP LANDING PAGES (dark, brand-accented)
   A page sets --brand / --brand-2 / --app-bg / --app-card
   and adds class="theme-dark" to <body>.
   ============================================================ */
.theme-dark {
  --app-bg:   #0e1014;
  --app-card: #171a21;
  background: var(--app-bg);
  color: #eef1f6;
}
.theme-dark .foot { background: #07090c; }

.app-hero {
  position: relative; overflow: hidden;
  padding-top: 150px; padding-bottom: clamp(60px, 9vw, 110px);
}
.app-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 50px; align-items: center; }
.app-hero h1 { color: #fff; margin: 20px 0 22px; }
.app-hero .lede { color: rgba(238,241,246,0.72); margin-bottom: 32px; }
.app-icon {
  width: 78px; height: 78px; border-radius: 20px; display: grid; place-items: center;
  font-size: 2rem; color: var(--brand-ink, #fff); margin-bottom: 22px;
  background: var(--brand);
  box-shadow: 0 20px 40px -16px color-mix(in srgb, var(--brand) 65%, transparent);
}
.store-row { display: flex; gap: 14px; flex-wrap: wrap; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05); color: #fff; transition: all .3s var(--ease);
}
.store-btn:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); border-color: rgba(255,255,255,0.32); }
.store-btn i { font-size: 1.7rem; }
.store-btn .s { font-size: 0.66rem; opacity: 0.7; display: block; line-height: 1; }
.store-btn .b { font-size: 1rem; font-weight: 600; line-height: 1.2; }
.app-hero-stage { position: relative; display: grid; place-items: center; min-height: 540px; }

.theme-dark .eyebrow { color: var(--brand-2, var(--brand)); }
.theme-dark .section-title { color: #fff; }
.theme-dark .section-title em { color: var(--brand-2, var(--brand)); }
.theme-dark .lede { color: rgba(238,241,246,0.7); }

/* feature grid on app pages */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 54px; }
.feat {
  padding: 30px; border-radius: 20px; background: var(--app-card);
  border: 1px solid rgba(255,255,255,0.07); transition: transform .45s var(--ease), border-color .45s;
}
.feat:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.feat .ico {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem;
  margin-bottom: 18px; background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand-2, var(--brand));
}
.feat h4 { color: #fff; font-size: 1.1rem; margin-bottom: 8px; }
.feat p { color: rgba(238,241,246,0.62); font-size: 0.93rem; }

/* stat row */
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-top: 50px; }
.stat { padding: 26px; border-radius: 18px; background: var(--app-card); border: 1px solid rgba(255,255,255,0.07); text-align: center; }
.stat .n { font-family: var(--font-display); font-size: 2.2rem; color: var(--brand-2, var(--brand)); line-height: 1; }
.stat .l { font-size: 0.82rem; color: rgba(238,241,246,0.6); margin-top: 8px; }

/* screenshot strip */
.shots {
  display: flex; gap: 22px; overflow-x: auto; padding: 50px 0 26px; scroll-snap-type: x mandatory;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: color-mix(in srgb, var(--brand) 70%, transparent) transparent;
}
.shots::-webkit-scrollbar { height: 4px; }
.shots::-webkit-scrollbar-track { background: rgba(255,255,255,0.06); border-radius: 999px; }
.shots::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--brand);
  transition: height .2s;
}
.shots:hover::-webkit-scrollbar-thumb { box-shadow: 0 0 10px color-mix(in srgb, var(--brand) 60%, transparent); }
.shots .device { flex: none; scroll-snap-align: center; }

/* alt split (how it works) */
.app-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px,5vw,70px); align-items: center; }
.steps-list { display: grid; gap: 22px; margin-top: 30px; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.step .num {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  font-family: var(--font-display); font-size: 1.1rem; color: var(--brand-ink, #fff);
  background: var(--brand);
}
.step h4 { color: #fff; font-size: 1.08rem; margin-bottom: 4px; }
.step p { color: rgba(238,241,246,0.62); font-size: 0.93rem; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(40px,6vw,72px); text-align: center;
  background: var(--brand); }
.cta-band h2 { font-family: var(--font-display); font-weight: 500; color: var(--brand-ink, #fff); font-size: clamp(1.8rem,3.6vw,2.8rem); letter-spacing: -0.01em; }
.cta-band p { color: color-mix(in srgb, var(--brand-ink, #fff) 82%, transparent); max-width: 52ch; margin: 14px auto 28px; }
.cta-band .store-row { justify-content: center; }
.cta-band .store-btn { background: rgba(0,0,0,0.18); border-color: rgba(255,255,255,0.3); }

/* back-to-studio link */
.app-back { display: inline-flex; align-items: center; gap: 8px; font-size: 0.84rem; color: rgba(238,241,246,0.6); margin-bottom: 8px; }
.app-back:hover { color: #fff; }

@media (max-width: 980px) {
  .app-hero-inner, .app-split { grid-template-columns: 1fr; }
  .app-hero-stage { order: -1; min-height: 440px; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .feat-grid { grid-template-columns: 1fr; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav-links, .nav > .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 20px; align-items: flex-start;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); padding: 26px var(--gut) 32px;
  }
  .nav-links.open a { color: rgba(255,255,255,0.85); font-size: 1rem; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; }
}

/* ---------- store badge availability + coming-soon modal ---------- */
.store-btn.soon { cursor: default; opacity: 0.75; }
.store-btn.soon:hover { transform: none; }

.ezy-modal-overlay {
  position: fixed; inset: 0; z-index: 10000; padding: 24px;
  background: rgba(12, 14, 16, 0.6);
  display: grid; place-items: center;
  opacity: 0; transition: opacity 0.25s;
}
.ezy-modal-overlay.show { opacity: 1; }
.ezy-modal {
  background: #fff; color: #10171c; border-radius: 20px;
  padding: 40px 36px; max-width: 400px; width: 100%; text-align: center;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.45);
}
.ezy-modal .ico {
  width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 18px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: #10171c; color: #fff;
}
.ezy-modal h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.55rem; margin-bottom: 10px; }
.ezy-modal p { color: #5b6770; font-size: 0.95rem; line-height: 1.55; margin-bottom: 24px; }
.ezy-modal-close {
  border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.92rem;
  padding: 12px 30px; border-radius: 999px; background: #10171c; color: #fff;
}
.ezy-modal-close:hover { opacity: 0.85; }
