/* ========================================
   TimeBalance — style.css
   Base: variables, reset, typography, layout
   ======================================== */

/* ===== VARIABLES ===== */
:root {
  --primary:       #2E5E4E;
  --primary-light: #3a7862;
  --secondary:     #5F8D6B;
  --gold:          #D4A937;
  --gold-light:    #E8C76A;
  --success:       #7DA36B;
  --bg:            #F8F5EE;
  --card-bg:       #FFFDF8;
  --text:          #1E2A24;
  --text-muted:    #6B7A70;
  --border:        #D8CFC0;
  --hero-gradient: linear-gradient(135deg, #2E5E4E, #5F8D6B);
  --btn-gradient:  linear-gradient(90deg, #D4A937, #E8C76A);
  --shadow-sm:     0 2px 12px rgba(46,94,78,.08);
  --shadow-md:     0 8px 32px rgba(46,94,78,.12);
  --shadow-lg:     0 20px 60px rgba(46,94,78,.18);
  --radius:        20px;
  --radius-pill:   50px;
  --transition:    .3s cubic-bezier(.4,0,.2,1);
}

body.dark {
  --bg:        #0f1a15;
  --card-bg:   #162118;
  --text:      #e8f0ea;
  --text-muted:#8fad97;
  --border:    #2a3d30;
  --shadow-sm: 0 2px 12px rgba(0,0,0,.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,.4);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: 'Poppins', sans-serif; cursor: pointer; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 3px; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
.section-header { text-align: center; margin-bottom: 56px; }

/* ===== TYPOGRAPHY ===== */
.section-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(46,94,78,.1); color: var(--primary);
  padding: 7px 18px; border-radius: var(--radius-pill);
  font-size: .78rem; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; margin-bottom: 16px;
  border: 1px solid rgba(46,94,78,.15);
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800; line-height: 1.2;
  letter-spacing: -.5px; margin-bottom: 14px;
}
.section-title span {
  background: var(--hero-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-desc {
  color: var(--text-muted); font-size: 1rem;
  line-height: 1.75; max-width: 580px; margin: 0 auto;
}

/* ===== LOADING SCREEN ===== */
#loading {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--hero-gradient);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  transition: opacity .5s ease, visibility .5s ease;
}
#loading.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-logo { font-size: 2rem; font-weight: 800; color: #fff; }
.loading-logo span { color: var(--gold); }
.spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== BACK TO TOP ===== */
#btt {
  position: fixed; bottom: 24px; right: 24px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; font-size: 1rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  display: none; align-items: center; justify-content: center;
}
#btt.visible { display: flex; }
#btt:hover { background: var(--primary-light); transform: translateY(-3px); }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  background: var(--hero-gradient);
  padding: 140px 0 80px; text-align: center; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: var(--bg); clip-path: ellipse(55% 100% at 50% 100%);
}
.page-hero .section-badge { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.2); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: #fff; margin-bottom: 14px; }
.page-hero h1 span { color: var(--gold-light); }
.page-hero p { color: rgba(255,255,255,.8); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
