/* =========================
   THEME VARIABLES
========================= */
:root{
  --bg:#ffffff;
  --ink:#0f172a;
  --muted:#334155;
  --card:#ffffff;
  --border:#e5e7eb;
  --shadow: 0 10px 30px rgba(2,6,23,.08);

  --green:#1f7a3f;
  --green-2:#2aa35a;

  --blue:#0b63c7;
  --blue-2:#2d7fe0;

  --radius:18px;

  --focus: rgba(31,122,63,.22);
}

:root { --header-h: 72px; } /* set this to your header height */

html { scroll-padding-top: var(--header-h); }

/* If you have a main wrapper */
main { padding-top: 60px; }

html[data-theme="dark"]{
  --bg:#0b1220;
  --ink:#e5e7eb;
  --muted:#9ca3af;
  --card:#0f1a2f;
  --border:#22314f;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --focus: rgba(42,163,90,.22);
}

*{ box-sizing:border-box; }

html{
  scroll-behavior: smooth;
}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);
  background:var(--bg);
}

img{ max-width:100%; display:block; }

.container{
  width:min(1100px, calc(100% - 24px));
  margin:0 auto;
}

.small{ font-size: 12px; }
.muted{ color:var(--muted); }
.w-full{ width:100%; }
.center{ display:flex; justify-content:center; }

:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 12px;
}

/* =========================
   SECTION DEFAULTS
========================= */
section{
  scroll-margin-top: 88px; /* offset for sticky header */
}

/* =========================
   HEADER / NAV (MOBILE FIRST)
========================= */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom:1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.nav-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:12px 0;
  gap:12px;
  min-width:0; /* helps truncation / prevents overflow */
}

.brand{
  text-decoration:none;
  color:var(--ink);
  font-weight:800;
  letter-spacing:.2px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:6px 10px;
  border-radius:14px;
  flex:0 0 auto; /* keep logo/brand from shrinking weirdly */
}
.brand:hover{
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.brand-logo{
  width:54px;
  height:54px;
  object-fit:contain;
  border-radius:999px;
}

.brand-mark{
  font-size:18px;
  font-weight:900;
  white-space:nowrap;
}

/* ✅ Hide "ConnEasy" text below 500px */
@media (max-width: 499px){
  .brand-mark{ display:none; }
}

@media (max-width: 380px){
  .icon-btn{
    margin-right: 10px;
  }
}

/* ✅ Mobile-first: hide desktop nav */
.nav{
  display:none;
  align-items:center;
  gap:22px;
}

.nav-link{
  text-decoration:none;
  color:var(--muted);
  font-weight:800;
  padding:8px 10px;
  border-radius:12px;
  transition: background .12s ease, color .12s ease;
}
.nav-link:hover{
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}
.nav-link.active{
  color:var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.nav-actions{
  margin-left:auto;
  display:flex;
  gap:10px;
  align-items:center;
  flex:0 0 auto; /* keep right-side buttons visible */
  min-width:max-content; /* prevents wrapping/hiding */
  padding-left:10px; /* small guaranteed breathing room from logo */
}

/* Always respect the HTML hidden attribute */
[hidden] { display: none !important; }

/* Extra safety for this component */
.user-menu[hidden] { display: none !important; }

/* =========================
   USER MENU (Logged-in Icon)
========================= */

.user-menu{
  position:relative;
  display:inline-flex;
  align-items:center;
}

/* Make sure hidden always hides elements (important) */
[hidden] { display: none !important; }

/* Nicer user icon (avatar button) */
.user-btn{
  padding: 0;
  justify-content: center; /* overrides icon-btn justify-content:flex-start */
}

.user-avatar{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 950;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(180deg, var(--green-2), var(--green));
  box-shadow: 0 10px 18px rgba(31,122,63,0.18);
}

.user-btn:hover .user-avatar{
  box-shadow: 0 14px 28px rgba(31,122,63,0.22);
}

.user-dropdown{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  min-width:170px;
  padding:8px;
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--card);
  box-shadow: var(--shadow);
  display:none;
  z-index:60;
}

.user-dropdown.open{
  display:block;
}

.dropdown-item{
  width:100%;
  text-align:left;
  padding:10px 12px;
  border-radius:12px;
  background:transparent;
  border:none;
  font-weight:800;
  color:var(--ink);
  cursor:pointer;
  transition: background .12s ease;
}

.dropdown-item:hover{
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

/* ✅ Extra safety: if space gets tight, reduce gap slightly */
@media (max-width: 380px){
  .nav-actions{ gap:8px; }
  .nav-row{ gap:10px; }
}

/* ✅ Mobile-first: burger shown */
.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  border:1px solid var(--border);
  background:var(--card);
  border-radius:12px;
  height:40px;
  width:44px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease;
  flex:0 0 auto;
}
.icon-btn:active{ transform: translateY(1px); }

.burger{
  display:block;
  width:18px;height:2px;
  background:var(--ink);
  position:relative;
  margin:0 auto;
}
.burger::before,.burger::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;height:2px;
  background:var(--ink);
}
.burger::before{ top:-6px; }
.burger::after{ top:6px; }

/* Mobile drawer */
.mobile-drawer{
  display:none;
  border-top:1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.mobile-drawer.open{ display:block; }

.mobile-drawer-inner{
  width:min(1100px, calc(100% - 24px));
  margin:0 auto;
  padding:14px 0 18px;
  display:grid;
  gap:10px;
}

.drawer-link{
  text-decoration:none;
  color:var(--ink);
  font-weight:850;
  padding:10px 12px;
  border-radius:12px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.drawer-link:hover{
  background: color-mix(in srgb, var(--ink) 9%, transparent);
}
.drawer-divider{
  height:1px;
  background: color-mix(in srgb, var(--border) 85%, transparent);
  margin:4px 0;
}

/* =========================
   BUTTONS
========================= */
.btn{
  border:none;
  border-radius:14px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  user-select:none;
  color:var(--ink);
  text-decoration: none; /* ← removes underline from button links */
}
.btn:active{ transform: translateY(1px); }

.btn-lg{
  padding:12px 18px;
  border-radius:16px;
  font-size:16px;
  margin:0;
}

.btn-blue {
  background: white;
}

.btn-primary{
  background:linear-gradient(180deg, var(--green-2), var(--green));
  color:#fff;
  box-shadow: 0 10px 18px rgba(31,122,63,.18);
}
.btn-primary:hover{ box-shadow: 0 14px 28px rgba(31,122,63,.22); }

.btn-outline{
  background:var(--card);
  border:1px solid var(--border);
  color:var(--ink);
}
.btn-outline:hover{ background: color-mix(in srgb, var(--ink) 5%, transparent); }

.btn-ghost{
  background:transparent;
  border:1px solid transparent;
  color:var(--ink);
}
.btn-ghost:hover{
  border-color:var(--border);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.btn-primary-blue{
  background: linear-gradient(180deg, var(--blue-2), var(--blue));
  color:#fff;
  box-shadow: 0 10px 18px rgba(11,99,199,.22);
}

.btn-primary-blue:hover{
  box-shadow: 0 14px 28px rgba(11,99,199,.28);
}


/* =========================
   SECTIONS
========================= */
.section{ padding:44px 0; }

.section-title{
  text-align:center;
  font-size:36px;
  margin:0 0 10px;
  letter-spacing:-.6px;
}
.section-subtitle{
  text-align:center;
  margin:0 0 26px;
  color:var(--muted);
}

/* =========================
   HERO (MOBILE FIRST)
========================= */
.hero{ padding:0px 0 88px; }

.hero-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
  align-items:center;
}

.hero-title{
  font-size:40px;
  line-height:1.02;
  margin:0 0 14px;
  letter-spacing:-1px;
}
.hero-subtitle{
  margin:0 0 18px;
  color:var(--muted);
  font-size:16px;
  max-width:520px;
}

.hero-cta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

/* phone */
.phone-stack{
  position:relative;
  height:360px;
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
}
.phone{
  height:100%;
  width:100%;
  border-radius:22px;
  background:var(--card);
  box-shadow: 0 24px 60px rgba(2,6,23,.12);
  object-fit:contain;
}


/* Optional: remove the frame look in dark mode */
html[data-theme="dark"] .phone{
  background: transparent;
}

html[data-theme="dark"] .phone-stack{
  align-items: flex-start;   /* removes top gap */
  padding-top: 10px;         /* controlled spacing */
}

html[data-theme="dark"] .phone-stack{
  border-radius: 22px;
  overflow: hidden;
}

html[data-theme="dark"] .phone-dark{
  border-radius: 22px;     /* instead of contain */
  background: #080E18; /* so corners are visible */
}


/* Phones */
.phone-dark { display: none; }

html[data-theme="dark"] .phone-light { display: none; }
html[data-theme="dark"] .phone-dark  { display: block; }

/* Logos */
.logo-dark { display: none; }

html[data-theme="dark"] .logo-light { display: none; }
html[data-theme="dark"] .logo-dark  { display: block; }


/* =========================
   HOW IT WORKS (MOBILE FIRST)
========================= */
.how-grid{
  margin-top:22px;
  display:grid;
  grid-template-columns: 1fr;
  gap:18px;
}

.how-card{
  background:linear-gradient(180deg, var(--card), color-mix(in srgb, var(--card) 85%, var(--bg)));
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.how-header{
  padding:14px 16px;
  color:#fff;
  font-weight:950;
  font-size:22px;
  text-align:center;
}
.how-header-green{ background:linear-gradient(180deg, var(--green-2), var(--green)); }
.how-header-blue{ background:linear-gradient(180deg, var(--blue-2), var(--blue)); }

.how-body{ padding:16px 16px 18px; }

.circle-img{
  width:180px;height:180px;
  border-radius:999px;
  overflow:hidden;
  margin:8px auto 16px;
  border:6px solid color-mix(in srgb, var(--card) 80%, transparent);
  box-shadow: 0 12px 24px rgba(2,6,23,.10);
}
.circle-img img{ width:100%; height:100%; object-fit:cover; }

.feature-list{ display:grid; gap:12px; }

.feature{
  display:grid;
  grid-template-columns: 52px 1fr;
  gap:14px;
  padding:14px;
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius:16px;
  background:var(--card);
  transition: transform .12s ease, box-shadow .12s ease;
}
.feature:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(2,6,23,.08);
}
.feature h3{ margin:0 0 4px; }
.feature p{ margin:0; color:var(--muted); }

.feature-ico{
  width:42px;height:42px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  color:#fff;
}
.feature-ico-green{ background:linear-gradient(180deg, var(--green-2), var(--green)); }
.feature-ico-blue{ background:linear-gradient(180deg, var(--blue-2), var(--blue)); }

.how-actions{
  display:flex;
  justify-content:center;
  margin-top:14px;
}

/* =========================
   PARTNER STRIP
========================= */
.strip{
  padding: 26px 0;
  background:linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 80%, var(--card)));
  border-top:1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-bottom:1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.logos{
  width:100vw;
  margin-left:calc(50% - 50vw);
  display:flex;
  justify-content:center;
  padding:0;
}

.partner-badges{
  display:block;
  width:92vw;
  max-width:950px;
  height:auto;
}

/* Partner badges */
.badges-dark { display:none; }

html[data-theme="dark"] .badges-light { display:none; }
html[data-theme="dark"] .badges-dark  { display:block; }


.strip-inner{
  padding-top:6px;
  padding-bottom:6px;
}

.strip-title{
  text-align:center;
  margin:8px 0 0;
  font-size: 28px;
  font-weight:950;
  letter-spacing:-0.4px;
  color:var(--ink);
}

/* =========================
   STEPS (MOBILE FIRST)
========================= */
.steps-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:16px;
  margin-top:18px;
}

.step{
  background:var(--card);
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
  text-align:center;
  transition: transform .12s ease, box-shadow .12s ease;
}
.step:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(2,6,23,.10);
}
.step h3{ margin:12px 0 8px; }
.step p{ margin:0; color:var(--muted); }

.step-phone{
  position:relative;
  border-radius:18px;
  overflow:hidden;
  max-width:240px;
  margin:0 auto;
  background:var(--card);
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
}

.step-phone img{
  width:100%;
  height:200px;
  object-fit:contain;
  background:#fff;
}

.step-badge{
  position:absolute;
  left:12px;
  bottom:12px;
  width:38px;height:38px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:950;
  background:linear-gradient(180deg, var(--green-2), var(--green));
  box-shadow: 0 10px 18px rgba(31,122,63,.22);
}

/* =========================
   ABOUT (MOBILE FIRST)
========================= */
.about-card{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
  padding:16px;
  border-radius: var(--radius);
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
  background:linear-gradient(180deg, var(--card), color-mix(in srgb, var(--card) 85%, var(--bg)));
  box-shadow: var(--shadow);
  align-items:center;
}

.about-photo{
  width:100%;
  display: block;
  border-radius:16px;
  object-fit:cover;
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
}

.about-caption{
  margin-top:0px;
  padding:8px 10px;
  border-radius:12px;
  text-align:center;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color:var(--ink);
  font-weight:900;
}

.about-right h3{ margin:0 0 8px; font-size:20px; }
.about-right p{ margin:0; color:var(--muted); line-height:1.6; }
.about-actions{ margin-top:14px; }

/* =========================
   FOOTER (MOBILE FIRST)
========================= */
.footer{
  padding:42px 0 18px;
  background:linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 70%, var(--card)));
  border-top:1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.footer-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}

.footer-card{
  padding:16px;
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: var(--radius);
  background:var(--card);
  box-shadow: var(--shadow);
}
.footer-card h3{ margin:0 0 12px; }

.footer-logo{
  width:50px;
  height:50px;
}

.footer-links{
  display:grid;
  gap:10px;
}
.footer-links a{
  color:var(--ink);
  text-decoration:none;
  font-weight:900;
  padding:10px 12px;
  border-radius:12px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.footer-links a:hover{
  background: color-mix(in srgb, var(--ink) 9%, transparent);
}

.form{
  display:grid;
  gap:10px;
}

label span{
  display:block;
  font-weight:950;
  font-size:13px;
  margin-bottom:6px;
}

input, textarea, select{
  width:100%;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  font: inherit;
  outline:none;
  background:var(--card);
  color:var(--ink);
}

input:focus, textarea:focus, select:focus{
  border-color: rgba(31,122,63,.55);
  box-shadow: 0 0 0 4px rgba(31,122,63,.14);
}

.form-hint{
  margin:0;
  font-size:13px;
  color:var(--muted);
}

.social-row{
  display:flex;
  gap:10px;
  margin-top:10px;
}
.social{
  flex:1;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  cursor:pointer;
  background:var(--card);
  font-weight:950;
  color:var(--ink);
  transition: transform .12s ease, background .12s ease;
}
.social:hover{
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.social:active{ transform: translateY(1px); }

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: transform .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}
.social-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2,6,23,.12);
}
.social-icon-btn.tiktok:hover  { background: #000; color: #fff; border-color: #000; }
.social-icon-btn.instagram:hover { background: #e1306c; color: #fff; border-color: #e1306c; }
.social-icon-btn.youtube:hover  { background: #ff0000; color: #fff; border-color: #ff0000; }

.biz-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.biz-box{
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius:16px;
  padding:12px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  display:grid;
  gap:6px;
  color:var(--ink);
}

.footer-bottom{
  margin-top:16px;
  display:flex;
  justify-content:center;
  color:var(--muted);
}

/* =========================
   BACK TO TOP
========================= */
.to-top{
  position:fixed;
  right:16px;
  bottom:16px;
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
  background:var(--card);
  box-shadow: var(--shadow);
  cursor:pointer;
  display:none;
  font-size:18px;
  font-weight:950;
  color:var(--ink);
}
.to-top.show{ display:block; }

/* =========================
   MODAL
========================= */
.modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:80;
}
.modal.open{ display:block; }

.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(2,6,23,.55);
}

.modal-card{
  position:relative;
  width:min(520px, calc(100% - 28px));
  margin: 8vh auto;
  background:var(--card);
  color:var(--ink);
  border-radius: 20px;
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
  box-shadow: 0 30px 80px rgba(2,6,23,.30);
  padding:16px;
}

.modal-close{
  position:absolute;
  right:10px; top:10px;
  width:40px;height:40px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--card);
  cursor:pointer;
  color:var(--ink);
}

.modal-header{ padding:6px 6px 10px; }
.modal-header h2{ margin:0 0 4px; letter-spacing:-.4px; }

.modal-switch{
  display:flex;
  gap:10px;
  padding: 6px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border:1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: 16px;
  margin:8px 0 10px;
}

.switch-btn{
  flex:1;
  border:none;
  background:transparent;
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:950;
  color:var(--muted);
}

.switch-btn.active{
  background:var(--card);
  color:var(--ink);
  box-shadow: 0 10px 18px rgba(2,6,23,.08);
}

.modal-form{
  display:grid;
  gap:10px;
  padding: 6px;
}

.hidden{ display:none !important; }

/* =========================
   REVEAL
========================= */
.reveal{
  opacity:0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible{
  opacity:1;
  transform: translateY(0);
}

/* =========================
   RESPONSIVE (MIN-WIDTH = TABLET/DESKTOP)
========================= */

/* Tablet */
@media (min-width: 520px){
  .container{ width:min(1100px, calc(100% - 40px)); }
  .hero-title{ font-size:46px; }
  .strip-title{ font-size:34px; }
  .section{ padding:56px 0; }
}

/* Desktop */
@media (min-width: 960px){

  .hero-grid{
    grid-template-columns: 1.2fr 1.8fr;
    gap:14px;
  }

  .hero-title{ font-size:56px; }
  .hero-subtitle{ font-size:18px; }

  .phone-stack{
    height:520px;
    width:min(850px, 100%);
    justify-content:flex-start;
  }

  .phone{
    height:min(660px, 100%);
    width:min(900px, 100%);
    border-radius:26px;
  }

  .how-grid{
    grid-template-columns: 1fr 1fr;
    gap:22px;
  }

  .steps-grid{
    grid-template-columns: repeat(3, 1fr);
    gap:18px;
  }

  .about-card{
    grid-template-columns: 320px 1fr;
    gap:18px;
    padding:18px;
  }

  .footer-grid{
    grid-template-columns: 1.2fr .8fr 1fr;
    gap:16px;
  }

  .nav{ display:flex; }
  #mobileMenuBtn{ display:none; }
  .mobile-drawer{ display:none !important; }
}
