/* ============================================================
   BASE — CubCode shared styles
   Variables · Reset · Typography · Buttons · Nav · Footer
   ============================================================ */

/* --- Variables --------------------------------------------- */
:root {
  /* Light section backgrounds — logo's warm bear-body tones */
  --bg:   #F8F4EF;
  --bgs:  #FFFFFF;
  --bgd:  #F0E8DC;

  /* Dark section backgrounds — logo's deep navy */
  --nv:   #0C1C30;
  --nvm:  #102240;
  --nvc:  #091826;
  --nvd:  #060F1C;

  /* Accent — pulled directly from logo pixel values */
  --am:   #E08820;
  --aml:  #EFA840;
  --amd:  #B86810;
  --tl:   #1570A0;  /* light-section use only */
  --cy:   #2EACC8;  /* dark-section use only */
  --or:   #D86024;
  --mu:   #B87A14;

  /* Text — light mode */
  --tx:   #0D1E38;
  --mt:   #5C6E82;

  /* Text — dark mode (hero / footer) */
  --txd:  #EAE8E0;
  --mtd:  #7A9AAE;

  /* Borders */
  --bd:   rgba(13, 30, 56, .12);
  --bdl:  rgba(21, 112, 160, .16);
  --bdd:  #1A3550;
  --bddl: rgba(46, 172, 200, .14);
}

/* --- Reset -------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--tx);
  overflow-x: hidden;
  line-height: 1.65;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography utilities ---------------------------------- */
.tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  color: var(--tl);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 14px;
}

.sh {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.85rem, 3.3vw, 2.6rem);
  line-height: 1.12;
  color: var(--tx);
}

.sub {
  font-size: 1.05rem;
  color: var(--mt);
  line-height: 1.75;
  max-width: 560px;
}

/* --- Buttons ----------------------------------------------- */
.ba {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--am);
  color: var(--nv);
  padding: 14px 28px;
  border-radius: 6px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
}

.ba:hover {
  background: var(--aml);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(224, 136, 32, .3);
}

.bo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--tl);
  padding: 14px 28px;
  border-radius: 6px;
  border: 2px solid var(--tl);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.bo:hover {
  background: rgba(21, 112, 160, .07);
  transform: translateY(-2px);
}

/* --- Scroll reveal ----------------------------------------- */
.rev {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.rev.in {
  opacity: 1;
  transform: none;
}

/* --- Navigation -------------------------------------------- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 14px 0;
  background: rgba(248, 244, 239, .96);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--bd);
  transition: background .35s, border-color .35s;
}

#nav.dark {
  background: rgba(12, 28, 48, .92);
  border-bottom-color: var(--bddl);
}

#nav .ni {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.lt {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--tx);
  transition: color .35s;
}

.lt span { color: var(--am); }

#nav.dark .lt { color: #fff; }

.nul {
  display: flex;
  list-style: none;
  gap: 26px;
  align-items: center;
}

.nul a {
  color: var(--mt);
  text-decoration: none;
  font-weight: 600;
  font-size: .83rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .2s;
}

.nul a:hover,
.nul a.active {
  color: var(--am);
}

#nav.dark .nul a { color: var(--mtd); }

#nav.dark .nul a:hover,
#nav.dark .nul a.active {
  color: var(--am);
}

.nul .cta {
  background: var(--am);
  color: var(--nv) !important;
  padding: 9px 20px;
  border-radius: 6px;
  transition: background .2s !important;
}

.nul .cta:hover { background: var(--aml) !important; }

.hbg {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hbg span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tx);
  border-radius: 2px;
  transition: background .35s;
}

#nav.dark .hbg span { background: var(--txd); }

#mob {
  display: none;
  position: fixed;
  top: 57px;
  left: 0;
  right: 0;
  z-index: 199;
  background: rgba(248, 244, 239, .99);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bd);
  padding: 20px 24px 28px;
}

#mob.open { display: block; }

#mob a {
  display: block;
  color: var(--tx);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 0;
  border-bottom: 1px solid var(--bd);
}

/* --- Footer ------------------------------------------------ */
footer {
  background: var(--nv);
  border-top: 1px solid var(--bddl);
  padding: 48px 0 20px;
  --mt: var(--mtd);
}

.fg3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--bddl);
  margin-bottom: 20px;
}

.fb p {
  color: var(--mtd);
  font-size: .86rem;
  line-height: 1.65;
  margin-top: 11px;
  max-width: 280px;
}

.fc2 h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--txd);
  font-size: .86rem;
  margin-bottom: 12px;
}

.ful {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ful a {
  color: var(--mtd);
  text-decoration: none;
  font-size: .82rem;
  transition: color .2s;
}

.ful a:hover { color: var(--am); }

.fbot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .73rem;
  color: var(--mtd);
}

.fleg { font-family: 'JetBrains Mono', monospace; }

footer .lt { color: var(--txd) !important; margin-left: 10px; }

.fbear { font-family: 'JetBrains Mono', monospace; font-size: .7rem; color: var(--mt); }

/* --- Responsive (shared) ----------------------------------- */
@media (max-width: 1024px) {
  .fg3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nul  { display: none; }
  .hbg  { display: flex; }
  .fg3  { grid-template-columns: 1fr; gap: 24px; }
  .fbot { flex-direction: column; gap: 6px; text-align: center; }
}
