/* ==========================================================================
   CleverKey — site styles
   Brand: CleverKey green (#54A700). Fonts: Inter (body), Gugi (brand).
   ========================================================================== */

:root {
  --green:       #54A700;
  --green-dark:  #3a7400;
  --green-deep:  #152e08;

  --ink:   #141f0e;
  --ink-2: #1f2a17;
  --ink-3: #2f3a26;
  --body:  #4a553f;
  --muted: #5b6553;
  --faint: #6b7563;
  --dim:   #8a9480;

  --line:   #eef1ea;
  --line-2: #eaeee2;
  --line-3: #e4eed4;

  --soft:   #f6fbef;
  --soft-2: #fbfdf7;
  --pill:   #eaf6d9;

  --container: 1200px;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-brand: "Gugi", sans-serif;
}

/* --- base ---------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: #111c0d;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: #468c00; text-decoration: none; }
img { max-width: 100%; }
::selection { background: #dcefc4; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.font-brand { font-family: var(--font-brand); }

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 10px;
  font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn--lg { height: 52px; padding: 0 28px; font-size: 16px; border-radius: 12px; }
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 1px 2px rgba(43,86,0,.25); }
.btn--primary.btn--lg { box-shadow: 0 6px 18px rgba(84,167,0,.28); }
.btn--primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(84,167,0,.35); }
.btn--outline { background: #fff; border-color: #dbe3d1; color: var(--ink-3); }
.btn--outline:hover { color: var(--ink-3); border-color: #c7d3b8; }

/* --- header / nav -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #111c0d; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; background: var(--green); color: #fff; flex: none;
}
.brand-mark--sm { width: 32px; height: 32px; }
.brand-name { font-family: var(--font-brand); font-size: 21px; letter-spacing: -.3px; }
.brand-name--sm { font-size: 19px; color: var(--ink); }

.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-link { font-size: 15px; font-weight: 500; color: #3f4a38; }
.nav-link:hover { color: var(--green-dark); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; margin: 0 auto;
  background: #2f3a26; border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}

/* language switcher */
.locale-switch { position: relative; }
.locale-switch > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-size: 14px; font-weight: 600; color: #3f4a38; cursor: pointer;
}
.locale-switch > summary::-webkit-details-marker { display: none; }
.locale-switch > summary::marker { content: ""; }
.locale-globe { opacity: .7; }
.locale-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 180px; max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 20px 40px -18px rgba(20,31,14,.4); z-index: 60;
}
.locale-link { padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #3f4a38; white-space: nowrap; }
.locale-link:hover { background: var(--soft); color: var(--green-dark); }
.locale-link.is-active { background: var(--pill); color: var(--green-dark); font-weight: 600; }

/* right-to-left (Arabic) */
[dir="rtl"] .hero-lead,
[dir="rtl"] .section-lead,
[dir="rtl"] .partners-lead,
[dir="rtl"] .contact-lead { text-align: right; }
[dir="rtl"] .hero-glow { right: auto; left: -140px; }
[dir="rtl"] .partners-glow { right: auto; left: -120px; }

/* --- headings / eyebrows ------------------------------------------------- */
.section { padding: 96px 0; }
.section--band { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow { display: block; font-size: 14px; font-weight: 700; color: var(--green-dark); letter-spacing: 1.2px; text-transform: uppercase; }
.eyebrow--light { color: #a7dd6f; }

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-title { margin: 14px 0 0; font-size: 40px; line-height: 1.1; letter-spacing: -1px; font-weight: 800; color: var(--ink); }
.section-title--light { color: #fff; }
.section-lead { margin: 16px 0 0; font-size: 18px; line-height: 1.6; color: var(--body); }
.section-lead--narrow { max-width: 520px; }

/* --- hero ---------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #f6fbef 0%, #ffffff 78%); }
.hero-glow {
  position: absolute; top: -120px; right: -140px; width: 520px; height: 520px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #e5f4d0 0%, rgba(229,244,208,0) 70%);
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px;
  align-items: center; padding-top: 84px; padding-bottom: 92px;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--pill); color: var(--green-dark); font-size: 13px; font-weight: 600; letter-spacing: .2px;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.hero-title { margin: 22px 0 0; font-size: 54px; line-height: 1.05; letter-spacing: -1.6px; font-weight: 800; color: var(--ink); text-wrap: balance; }
.hero-lead { margin: 24px 0 0; font-size: 19px; line-height: 1.6; color: var(--body); max-width: 560px; }
.hero-lead strong { color: var(--ink-3); font-weight: 600; }
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.stats { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 28px; }
.stat-num { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -1px; }
.stat-label { font-size: 14px; color: var(--faint); }
.stat-div { width: 1px; background: #e4ead9; }

/* phone mock */
.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone-shadow { position: absolute; inset: 20px 40px; border-radius: 40px; background: linear-gradient(150deg, #dff0c6, #c7e6a3); transform: rotate(-4deg); }
.phone { position: relative; width: 286px; max-width: 100%; border-radius: 40px; background: var(--ink); padding: 12px; box-shadow: 0 34px 70px -24px rgba(20,31,14,.55); }
.phone-screen { border-radius: 30px; background: #f7faf1; overflow: hidden; }
.phone-head { background: var(--green); padding: 22px 20px 26px; color: #fff; }
.phone-head-row { display: flex; align-items: center; justify-content: space-between; }
.phone-brand { font-family: var(--font-brand); font-size: 16px; }
.phone-avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.25); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.phone-sub { margin-top: 20px; font-size: 13px; opacity: .85; }
.phone-title { margin-top: 2px; font-size: 22px; font-weight: 700; }
.phone-body { padding: 22px 20px 24px; margin-top: -14px; }
.phone-key { width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; background: #fff; border: 1px solid #e6ecdb; box-shadow: 0 10px 24px -8px rgba(84,167,0,.4); display: flex; align-items: center; justify-content: center; color: var(--green); }
.phone-list { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.phone-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #edf1e5; border-radius: 14px; padding: 12px 14px; }
.phone-item-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--pill); color: var(--green-dark); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.phone-item-txt { flex: 1; }
.phone-item-name { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.phone-item-meta { display: block; font-size: 11px; color: var(--dim); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #c7d3b8; flex: none; }
.dot--on { background: var(--green); }

/* --- trust strip --------------------------------------------------------- */
.trust { background: var(--soft-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 40px; padding-top: 26px; padding-bottom: 26px; }
.trust-label { font-size: 14px; font-weight: 600; color: var(--faint); letter-spacing: .3px; text-transform: uppercase; }
.trust-pills { display: flex; flex-wrap: wrap; gap: 12px; }
.pill { padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid #e6ebdd; font-size: 15px; font-weight: 600; color: var(--ink-3); }

/* --- cards / icons ------------------------------------------------------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card { border: 1px solid var(--line-2); border-radius: 20px; padding: 28px; background: #fff; }
.card-title { margin: 18px 0 8px; font-size: 18px; font-weight: 700; color: var(--ink-2); }
.card-desc { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
#usecases .card-title { font-size: 19px; }

.ico { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: var(--pill); color: var(--green-dark); flex: none; }
.ico--solid { background: var(--green); color: #fff; }
.ico--row { width: 44px; height: 44px; border-radius: 12px; }

/* --- split layout -------------------------------------------------------- */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-grid--wide { grid-template-columns: 1.05fr .95fr; }
.split-grid--bias { grid-template-columns: 1.1fr .9fr; gap: 56px; }

/* --- product / app ------------------------------------------------------- */
.store-badges { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border-radius: 11px; background: var(--ink); color: #fff; }
.store-badge:hover { color: #fff; }
.store-badge-txt { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge-top { font-size: 10px; opacity: .8; }
.store-badge-name { font-size: 15px; font-weight: 600; }

.features { display: flex; flex-direction: column; gap: 16px; }
.feature { display: flex; align-items: flex-start; gap: 16px; background: var(--soft); border: 1px solid var(--line-3); border-radius: 16px; padding: 22px; }
.feature-ico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--green); color: #fff; flex: none; }
.feature-title { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.feature-desc { font-size: 15px; line-height: 1.5; color: var(--muted); }

/* --- access sharing ------------------------------------------------------ */
.share-roles { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.share-role { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line-3); border-radius: 14px; background: #fff; }
.share-role-title { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.share-role-desc { font-size: 14px; color: var(--muted); }

.keys-card { background: #fff; border: 1px solid var(--line-3); border-radius: 22px; padding: 24px; box-shadow: 0 24px 50px -30px rgba(43,86,0,.35); }
.keys-head { display: flex; align-items: center; justify-content: space-between; }
.keys-title { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.keys-badge { font-size: 12px; font-weight: 600; color: var(--green-dark); background: var(--pill); padding: 5px 10px; border-radius: 8px; }
.keys-list { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.key-row { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-bottom: 1px solid #f0f3ea; }
.key-row:last-child { border-bottom: none; }
.key-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--pill); color: var(--green-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex: none; }
.key-avatar--muted { background: #f1f3ec; color: #98a189; }
.key-info { flex: 1; }
.key-name { display: block; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.key-meta { display: block; font-size: 13px; color: var(--dim); }
.key-status { font-size: 12px; font-weight: 600; color: var(--green-dark); }
.key-status--warn { color: #b58a1a; }
.keys-btn { margin-top: 18px; width: 100%; height: 46px; }

/* --- partners (dark) ----------------------------------------------------- */
.partners { position: relative; overflow: hidden; background: var(--green-deep); color: #eaf3df; }
.partners-glow { position: absolute; top: -160px; right: -120px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(84,167,0,.35) 0%, rgba(84,167,0,0) 70%); }
.partners .container { position: relative; }
.partners-lead { margin: 18px 0 0; font-size: 18px; line-height: 1.6; color: #cfe3bb; max-width: 520px; }
.partners .btn { margin-top: 30px; }
.partner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.partner-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 22px; }
.partner-card-title { font-size: 15px; font-weight: 700; color: #fff; }
.partner-card-desc { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: #b9d3a2; }

/* --- contact ------------------------------------------------------------- */
.contact-box { background: var(--soft); border: 1px solid var(--line-3); border-radius: 28px; padding: 64px 56px; }
.contact-title { margin: 0; font-size: 42px; line-height: 1.08; letter-spacing: -1.2px; font-weight: 800; color: var(--ink); }
.contact-lead { margin: 18px 0 0; font-size: 18px; line-height: 1.6; color: var(--body); max-width: 460px; }
.contact-cards { display: flex; flex-direction: column; gap: 14px; }
.contact-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line-3); border-radius: 16px; padding: 20px 22px; color: inherit; }
.contact-card:hover { color: inherit; }
.contact-card-label { display: block; font-size: 13px; color: #7a8570; }
.contact-card-value { display: block; font-size: 16px; font-weight: 600; color: var(--ink-2); }

/* --- footer -------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--soft-2); }
.footer-top { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; padding-top: 52px; padding-bottom: 52px; }
.footer-brand-col { max-width: 340px; }
.footer-about { margin: 14px 0 0; font-size: 14px; line-height: 1.6; color: var(--faint); }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-heading { font-size: 13px; font-weight: 700; color: var(--dim); letter-spacing: .6px; text-transform: uppercase; }
.footer-links { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer-links a { color: #3f4a38; }
.footer-links a:hover { color: var(--green-dark); }
.footer-bar { border-top: 1px solid var(--line); }
.footer-bar-inner { padding-top: 20px; padding-bottom: 20px; font-size: 13px; color: var(--dim); }

/* --- responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; padding-top: 64px; padding-bottom: 72px; }
  .split-grid, .split-grid--wide, .split-grid--bias { grid-template-columns: 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 44px; }
  .section-title { font-size: 34px; }
  .contact-title { font-size: 36px; }
}

/* hamburger menu */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px 20px 20px;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(20,31,14,.35);
    transform: translateY(-12px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.is-open .nav-menu { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-link { padding: 11px 8px; font-size: 16px; border-radius: 8px; }
  .nav-link:hover { background: var(--soft); }
  .nav-cta { margin-top: 8px; }
  .locale-switch { align-self: flex-start; width: 100%; margin-top: 8px; }
  .locale-switch > summary { width: 100%; height: 40px; }
  .locale-menu { position: static; box-shadow: none; margin-top: 6px; max-height: 240px; inset-inline-end: auto; }
  .nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero-title { font-size: 36px; letter-spacing: -1px; }
  .hero-lead { font-size: 17px; }
  .stats { gap: 14px 26px; }
  .stat-div { display: none; }
  .contact-box { padding: 40px 24px; }
  .contact-title { font-size: 30px; }
  .footer-cols { gap: 40px; }
}

@media (max-width: 480px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .store-badge { flex: 1 1 auto; justify-content: center; }
}
