/* ============================================================
   CABI.net Marketing Site - marketing.css
   ============================================================ */

@import url('tokens.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--fb);
  color: var(--ink);
  background: var(--sur);
  -webkit-font-smoothing: antialiased;
}

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nh); z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--g);
  background: transparent;
  transition: background 0.2s, box-shadow 0.2s;
}
.nav.on { background: rgba(255,255,255,0.96); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--bdr); }
.logo { font-family: var(--fd); font-size: clamp(1.75rem, 3vw, 2.25rem); color: #fff; transition: color 0.2s; }
.logo em { color: var(--accent); font-style: normal; }
.nav.on .logo { color: var(--ink); }
.nl { display: flex; gap: 2rem; }
.nl a { font-size: 0.875rem; font-weight: 500; color: rgba(255,255,255,0.8); transition: color 0.2s; }
.nl a:hover { color: #fff; }
.nav.on .nl a { color: var(--ink-s); }
.nav.on .nl a:hover { color: var(--ink); }
.na { display: flex; align-items: center; gap: 0.75rem; }
.btn-ng { background: none; border: none; color: rgba(255,255,255,0.8); cursor: pointer; font-family: var(--fb); font-size: 0.875rem; font-weight: 500; padding: 0.5rem 1rem; transition: color 0.2s; }
.btn-ng:hover { color: #fff; }
.nav.on .btn-ng { color: var(--ink-s); }
.nav.on .btn-ng:hover { color: var(--ink); }
.hbg { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hbg span { display: block; width: 24px; height: 2px; background: #fff; transition: background 0.3s; }
.nav.on .hbg span { background: var(--ink); }
.mnav { display: none; position: fixed; top: var(--nh); left: 0; right: 0; z-index: 199; background: var(--sur); padding: 1rem var(--g) 2rem; border-top: 1px solid var(--bdr); flex-direction: column; }
.mnav a { font-size: 1rem; font-weight: 500; color: var(--ink-m); padding: 0.875rem 0; border-bottom: 1px solid var(--bdr); }
.mnav.open { display: flex; }

/* Scroll container */
.page { height: 100vh; overflow-y: scroll; scroll-snap-type: y mandatory; scroll-behavior: smooth; scroll-padding-top: var(--nh); background: var(--sur); }

/* Snap sections — height excludes the fixed nav so content fills the visible area exactly */
.s { scroll-snap-align: start; height: calc(100vh - var(--nh)); position: relative; overflow: hidden; }
/* Hero fills the full viewport — the transparent nav is designed to overlay it */
.page > .s:first-child { height: 100vh; }

/* Shared */
.con { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--g); }
.lbl { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); margin-bottom: 0.875rem; }
.lbl-l { color: rgba(255,255,255,0.45); }
.lbl-g { color: var(--success); }
.lbl-a { color: var(--accent); }
.h2 { font-family: var(--fd); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.1; color: var(--ink); margin-bottom: 1.25rem; }
.h2-l { color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; font-family: var(--fb); font-size: 0.9rem; font-weight: 500; padding: 0.65rem 1.5rem; border-radius: 0.5rem; border: 1.5px solid transparent; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.btn-lg { font-size: 1rem; padding: 0.85rem 2rem; }
.btn-b  { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-b:hover  { background: var(--blue-d); border-color: var(--blue-d); transform: translateY(-1px); }
.btn-gl { background: transparent; color: #fff; border-color: rgba(255,255,255,0.45); }
.btn-gl:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn-gd { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-gd:hover { background: var(--ink); color: #fff; }

/* Reveal */
.rv, .rv-l, .rv-r { opacity: 0; transform: translateY(28px); transition: opacity 0.75s var(--eo), transform 0.75s var(--eo); }
.rv-l { transform: translateX(-36px); }
.rv-r { transform: translateX(36px); }
.in   { opacity: 1 !important; transform: none !important; }

/* 01 Hero */
.hbg2 { position: absolute; inset: 0; background: linear-gradient(135deg, #0d1117 0%, #1a2540 50%, #0f1f35 100%); }
.hbg2 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.hov  { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.28) 60%, transparent 100%); }
.hbd  { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--nh) + clamp(2rem,6vh,4rem)) var(--g) 2.5rem; }
.hco  { max-width: 640px; }
.hey  { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 1.25rem; }
.hh1  { font-family: var(--fd); font-size: clamp(3rem,6.5vw,5.5rem); line-height: 1; color: #fff; margin-bottom: 1.25rem; }
.hh1 em { font-style: italic; color: rgba(255,255,255,0.55); }
.hsb  { font-size: clamp(0.95rem,1.5vw,1.1rem); font-weight: 300; color: rgba(255,255,255,0.65); max-width: 480px; margin-bottom: 2rem; line-height: 1.75; }
.hct  { display: flex; gap: 1rem; flex-wrap: wrap; }
.shi  { display: flex; flex-direction: column; gap: 0.625rem; }
.shi span { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.28); }
.shl  { width: 1px; height: 40px; background: rgba(255,255,255,0.15); overflow: hidden; }
.shl::after { content: ''; display: block; width: 100%; height: 100%; background: rgba(255,255,255,0.5); animation: sa 2s ease-in-out infinite; }
@keyframes sa { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

/* 02 Intro */
.intro { background: var(--sur-w); display: flex; align-items: center; }
.itx   { font-family: var(--fd); font-size: clamp(2rem,5vw,3rem); color: var(--ink-m); line-height: 1.45; }

/* 03 Showcase */
.shw   { background: var(--ink); }
.shwg  { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.shwst { display: grid; grid-template-rows: 1fr 1fr; }
.rp    { position: relative; overflow: hidden; }
.rp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.72); transition: transform 0.8s var(--eo), filter 0.4s; }
.rp:hover img { transform: scale(1.04); filter: brightness(0.6); }
.rl    { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.75rem; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%); }
.rtg   { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 0.375rem; }
.rl p  { font-size: 0.875rem; color: rgba(255,255,255,0.75); line-height: 1.5; max-width: 280px; }

/* 04 How It Works */
.how   { background: var(--sur); display: flex; align-items: center; padding: 5rem 0; }
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 2.5rem; margin-top: 3rem; }
.stn   { font-family: var(--fd); font-size: 3rem; color: var(--bdr); line-height: 1; margin-bottom: 1rem; }
.step h3 { font-size: 0.95rem; font-weight: 600; color: var(--ink); margin-bottom: 0.5rem; }
.step p  { font-size: 0.875rem; color: var(--ink-s); line-height: 1.7; }

/* 05/06 Splits */
.sp   { display: grid; grid-template-columns: 1fr 1fr; }
.sp-d { background: var(--ink); }
.spm  { position: relative; overflow: hidden; }
.spm img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--eo); }
.sp:hover .spm img { transform: scale(1.03); }
.spc  { display: flex; flex-direction: column; justify-content: center; padding: clamp(3rem,7vw,6rem); }
.spc p { font-size: 1rem; color: var(--ink-s); line-height: 1.75; margin-bottom: 2rem; max-width: 420px; }
.sp-d .spc p { color: rgba(255,255,255,0.6); }

/* 07 Stats */
.sts  { background: var(--blue); display: flex; align-items: center; }
.stsg { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; text-align: center; }
.stv  { font-family: var(--fd); font-size: clamp(2.5rem,5vw,4rem); color: #fff; line-height: 1; margin-bottom: 0.5rem; }
.stl  { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.55); }

/* 08 Projects */
.pjs  { background: var(--sur-w); display: flex; align-items: center; padding: 4rem 0; }
.pjh  { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2.5rem; gap: 2rem; flex-wrap: wrap; }
.pjg  { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.pjc  { display: block; background: var(--sur); border: 1px solid var(--bdr); border-radius: 4px; overflow: hidden; transition: transform 0.3s var(--eo), box-shadow 0.3s var(--eo); }
.pjc:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,0.1); }
.pji  { aspect-ratio: 4/3; overflow: hidden; }
.pji img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--eo); }
.pjc:hover .pji img { transform: scale(1.04); }
.pjb  { padding: 1.25rem; }
.pjt  { display: flex; gap: 0.5rem; margin-bottom: 0.625rem; }
.tag  { font-size: 0.67rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--blue); background: rgba(37,99,235,0.08); padding: 0.2rem 0.55rem; border-radius: 2px; }
.tag-g { color: var(--success-dark); background: var(--success-light); }
.tag-a { color: var(--accent); background: var(--accent-light); }
.pjb h3 { font-size: 0.95rem; font-weight: 600; color: var(--ink); margin-bottom: 0.4rem; line-height: 1.3; }
.pjb p  { font-size: 0.825rem; color: var(--ink-s); line-height: 1.6; }

/* 09 Full-bleed */
.fb     { }
.fb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.45); }
.fbo    { position: absolute; inset: 0; display: flex; align-items: center; background: linear-gradient(to right, rgba(0,0,0,0.55) 0%, transparent 70%); }
.fbc    { padding: 0 var(--g); max-width: 540px; }
.fbc .h2 { margin-bottom: 1.75rem; }

/* 10 Testimonial */
.tst   { background: var(--sur); display: flex; align-items: center; }
.tsti  { max-width: 800px; margin-inline: auto; text-align: center; }
.tstq  { font-family: var(--fd); font-style: italic; font-size: clamp(1.25rem,2.5vw,1.85rem); color: var(--ink); line-height: 1.5; margin-bottom: 2.5rem; }
.tsta  { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.tstar { width: 48px; height: 48px; border-radius: 50%; background: var(--bdr); flex-shrink: 0; }
.tsta strong { display: block; font-size: 0.9rem; font-weight: 600; }
.tsta span   { display: block; font-size: 0.8rem; color: var(--ink-s); }

/* 11 CTA */
.cta  { background: var(--ink); display: flex; align-items: center; }
.ctai { text-align: center; max-width: 560px; margin-inline: auto; }
.ctai h2 { font-family: var(--fd); font-size: clamp(2rem,4vw,3rem); color: #fff; margin-bottom: 1rem; }
.ctai p  { font-size: 1rem; color: rgba(255,255,255,0.55); margin-bottom: 2.5rem; }

/* Footer */
.ft   { background: var(--ink-d); border-top: 1px solid rgba(255,255,255,0.07); padding: 4rem 0 2rem; scroll-snap-align: start; }
.ftt  { display: grid; grid-template-columns: 1fr 2fr; gap: 4rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 2rem; }
.ftb p { font-size: 0.85rem; color: rgba(255,255,255,0.35); line-height: 1.7; max-width: 260px; margin-top: 1rem; }
.ftcs  { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.ftc h4 { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.3); margin-bottom: 1rem; }
.ftc a  { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-bottom: 0.65rem; transition: color 0.2s; }
.ftc a:hover { color: #fff; }
.ftbt { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.ftbt p { font-size: 0.78rem; color: rgba(255,255,255,0.22); }
.ftl    { display: flex; gap: 1.5rem; }
.ftl a  { font-size: 0.78rem; color: rgba(255,255,255,0.22); transition: color 0.2s; }
.ftl a:hover { color: rgba(255,255,255,0.55); }

@media (max-width: 1024px) { .steps { grid-template-columns: repeat(2,1fr); } .stsg { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 768px)  { .sp { grid-template-columns: 1fr; } .sp-d .spm { order: -1; } .spm { min-height: 45vh; } .shwg { grid-template-columns: 1fr; } .shwst { grid-template-columns: 1fr 1fr; grid-template-rows: auto; } .pjg { grid-template-columns: 1fr; } .ftt { grid-template-columns: 1fr; gap: 2rem; } .ftcs { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px)  { .nl, .na { display: none; } .hbg { display: flex; } .steps { grid-template-columns: 1fr; } .stsg { grid-template-columns: repeat(2,1fr); } .hct { flex-direction: column; } .ftcs { grid-template-columns: 1fr; } }

/* ── Registration Modal ─────────────────────────────────────── */
.reg-modal { position: fixed; inset: 0; z-index: 500; background: rgba(13,17,23,0.78); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 1.5rem; overflow-y: auto; opacity: 0; pointer-events: none; transition: opacity 0.3s var(--eo); }
.reg-modal.open { opacity: 1; pointer-events: all; }
.reg-modal-bd { background: var(--sur); border-radius: 6px; width: 100%; max-width: 460px; padding: 2rem; margin: auto; position: relative; transform: translateY(20px); transition: transform 0.35s var(--eo); box-shadow: 0 24px 64px rgba(0,0,0,0.35); }
.reg-modal.open .reg-modal-bd { transform: translateY(0); }
.reg-modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; cursor: pointer; font-size: 1.4rem; color: var(--ink-s); line-height: 1; padding: 0.25rem 0.5rem; border-radius: 2px; transition: color 0.2s; }
.reg-modal-close:hover { color: var(--ink); }
.reg-modal-hd { margin-bottom: 2rem; }
.reg-modal-hd .logo { font-size: 2.25rem; color: var(--ink); margin-bottom: 1.25rem; display: inline-block; }
.reg-modal-hd h2 { font-family: var(--fd); font-size: 1.75rem; color: var(--ink); line-height: 1.15; margin-bottom: 0.5rem; }
.reg-modal-hd p { font-size: 0.875rem; color: var(--ink-s); line-height: 1.6; }
.reg-field { margin-bottom: 1.25rem; }
.reg-field label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ink); margin-bottom: 0.4rem; letter-spacing: 0.02em; }
.reg-field input,
.reg-field select { width: 100%; padding: 0.7rem 0.875rem; border: 1.5px solid var(--bdr); border-radius: 3px; font-family: var(--fb); font-size: 0.95rem; color: var(--ink); background: var(--sur); transition: border-color 0.2s; outline: none; box-sizing: border-box; }
.reg-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.875rem center; padding-right: 2.25rem; cursor: pointer; }
.reg-field input::placeholder { color: var(--ink-s); opacity: 0.5; }
.reg-field input:focus,
.reg-field select:focus { border-color: var(--blue); }
.reg-field input.err,
.reg-field select.err { border-color: #ef4444; }
.reg-err { font-size: 0.82rem; color: #ef4444; margin-bottom: 1rem; padding: 0.6rem 0.75rem; background: rgba(239,68,68,0.06); border-radius: 3px; }
.reg-submit { width: 100%; justify-content: center; margin-top: 0.5rem; }
.reg-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.reg-ok { text-align: center; padding: 1rem 0; }
.reg-ok-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--success-light); color: var(--success-dark); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; margin: 0 auto 1.5rem; }
.reg-ok h3 { font-family: var(--fd); font-size: 1.75rem; color: var(--ink); margin-bottom: 0.75rem; }
.reg-ok p  { font-size: 0.9rem; color: var(--ink-s); margin-bottom: 2rem; line-height: 1.6; }
@media (max-width: 480px) { .reg-modal-bd { padding: 2rem 1.5rem; } }

/* ── Tester registration popup ──────────────────────────────────
   Ported from LandingPage/Css/loginRegistration.css's #step-register-1
   system (.auth-card/.auth-step/.form-group/.form-input/.auth-success),
   re-prefixed .ri- since this page loads neither loginRegistration.css
   nor style.css. Deliberately its own system, not a reuse of the
   .reg-modal/.reg-field block above (different, unused visual language
   left as-is). */
.ri-overlay {
  position: fixed; inset: 0; z-index: 300; /* above .nav's 200 */
  display: none; align-items: center; justify-content: center;
  padding: 1.5rem; overflow-y: auto;
  background: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.25s var(--eo);
}
.ri-overlay.open { display: flex; }
.ri-overlay.ri-visible { opacity: 1; }

.ri-card {
  /* margin:auto (not align-items alone) so a card taller than the viewport
     stays reachable by scrolling the overlay instead of having its top
     clipped — align-items:center alone can position a flex child off the
     top of an overflow:auto container with no way to scroll back to it. */
  margin: auto;
  position: relative;
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 10px 30px -4px rgb(0 0 0 / 0.08);
}

.ri-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: var(--ink-s);
  padding: 0.25rem 0.5rem; transition: color 0.2s;
}
.ri-close:hover { color: var(--ink); }

.ri-header { margin-bottom: 2rem; }
.ri-header h2 { font-family: var(--fd); font-size: 1.75rem; font-weight: normal; color: var(--ink); line-height: 1.15; margin-bottom: 0.5rem; }
.ri-header p  { font-size: 0.875rem; color: var(--ink-s); margin: 0; line-height: 1.65; }

.ri-step { display: none; }
.ri-step.active { display: block; animation: riFadeIn 0.3s var(--eo); }
@keyframes riFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ink); margin-bottom: 0.4rem; letter-spacing: 0.02em; }
.form-input {
  width: 100%; padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--neutral-200); border-radius: var(--radius-md);
  font-family: var(--fb); font-size: 0.95rem; color: var(--ink);
  background: var(--neutral-50);
  transition: border-color 0.2s, background 0.2s; outline: none; box-sizing: border-box;
}
.form-input::placeholder { color: var(--ink-s); opacity: 0.5; }
.form-input:focus { border-color: var(--blue); background: #ffffff; }
.form-hint { display: block; margin-top: 0.375rem; font-size: 0.8125rem; color: var(--ink-s); opacity: 0.7; }

.ri-error { display: none; font-size: 0.8125rem; color: var(--danger); margin: -0.5rem 0 1rem; }
.ri-error.show { display: block; }

/* Device toggle in the tester popup — two mutually-exclusive pills. */
.ri-device-choice { display: flex; gap: 0.5rem; }
.ri-device-btn {
  flex: 1; padding: 0.7rem 1rem; border: 1px solid var(--bdr); border-radius: 8px;
  background: #fff; font: inherit; font-size: 0.9rem; color: var(--ink);
  cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
}
.ri-device-btn svg { flex-shrink: 0; }
.ri-device-btn:hover { border-color: var(--blue); }
/* Selected = green border + soft ring, no fill — matches the app modal
   card/length-button selected state. */
.ri-device-btn.selected {
  border-color: var(--success);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 0 3px var(--success-light);
}

.ri-card .btn { width: 100%; justify-content: center; margin-top: 0.5rem; }
.ri-card .btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.ri-success { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.5rem 0; gap: 0.75rem; }
.ri-success-icon { width: 72px; height: 72px; background: var(--success-light); color: var(--success-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 0.5rem; }
.ri-success h2 { font-family: var(--fd); font-size: 1.75rem; font-weight: normal; color: var(--ink); }
.ri-success p  { font-size: 0.875rem; color: var(--ink-s); }

@media (max-width: 520px) { .ri-card { padding: 1.75rem; } }
