/* =========================================================
   UberFi — Main Stylesheet
   ========================================================= */

/* ---------------------------------------------------------
   1. CSS Custom Properties
   --------------------------------------------------------- */
:root {
  --primary:       #1d4ed8;
  --primary-dark:  #1e3a8a;
  --primary-light: #dbeafe;
  --primary-hover: #2563eb;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --border:        #e2e8f0;
  --bg:            #f8fafc;
  --white:         #ffffff;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:     0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:     0 10px 25px rgba(0,0,0,.10), 0 4px 10px rgba(0,0,0,.06);
  --radius:        8px;
  --radius-lg:     12px;
  --transition:    0.2s ease;
  --font:          'Inter', 'Open Sans', Arial, sans-serif;
  --container:     1100px;
}

/* ---------------------------------------------------------
   2. CSS Reset
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

/* ---------------------------------------------------------
   3. Typography
   --------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p { margin-bottom: 1rem; color: var(--text); }
p:last-child { margin-bottom: 0; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.eyebrow--white { color: rgba(255,255,255,.8); }
.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.text-muted { color: var(--text-muted); }

/* ---------------------------------------------------------
   4. Container
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---------------------------------------------------------
   5. Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--primary);
  color: var(--white);
  border: 2px solid transparent;
}
.btn--primary:hover {
  background: var(--primary-hover);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(29,78,216,.35);
  transform: translateY(-1px);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.7);
}
.btn--outline:hover {
  background: rgba(255,255,255,.1);
  color: var(--white);
  border-color: var(--white);
}
.btn--outline-blue {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn--outline-blue:hover {
  background: var(--primary);
  color: var(--white);
}
.btn--lg {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  border-radius: 10px;
}
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* ---------------------------------------------------------
   6. Navigation
   --------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.nav--scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1.5rem;
}
.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.nav__logo img {
  display: block;
  max-width: 200px;
}
.nav__logo:hover { color: var(--primary); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav__links li a {
  display: block;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 6px;
  transition: all var(--transition);
}
.nav__links li a:hover,
.nav__links li a.active {
  color: var(--primary);
  background: var(--primary-light);
}
.nav__toggle {
  display: none;
  font-size: 1.4rem;
  color: var(--text);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: background var(--transition);
}
.nav__toggle:hover { background: var(--bg); }

/* ---------------------------------------------------------
   7. Hero
   --------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: var(--primary-dark) center/cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(30,58,138,.90) 0%,
    rgba(29,78,216,.75) 60%,
    rgba(30,58,138,.85) 100%
  );
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  color: var(--white);
  padding: 4rem 0;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  padding: 0.35rem 1rem;
  border-radius: 99px;
  margin-bottom: 1.25rem;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
}
.hero__sub {
  font-size: 1.05rem;
  font-weight: 500;
  color: rgba(255,255,255,.9);
  margin-bottom: 1rem;
  font-style: italic;
}
.hero__body {
  font-size: 1rem;
  color: rgba(255,255,255,.8);
  line-height: 1.75;
  margin-bottom: 2rem;
}

/* ---------------------------------------------------------
   8. Stats Bar
   --------------------------------------------------------- */
.stats-bar {
  background: var(--primary);
  padding: 2rem 0;
}
.stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
.stat__number {
  display: block;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.stat__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------------------------------------------------------
   9. Sections
   --------------------------------------------------------- */
.section {
  padding: 5rem 0;
}
.section--alt {
  background: var(--bg);
}
.section__header {
  margin-bottom: 3rem;
}
.section__header--center {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 3rem;
}
.section__header h2 { margin-bottom: 0.75rem; }
.section__header p   { color: var(--text-muted); }

/* Split layout */
.section__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.section__split--reverse { direction: rtl; }
.section__split--reverse > * { direction: ltr; }

.split__img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.split__img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); }

.split__text h2  { margin-bottom: 1rem; }
.split__text h3  { margin-top: 1.5rem; margin-bottom: 0.5rem; color: var(--primary-dark); }
.split__text p   { color: var(--text-muted); margin-bottom: 1rem; }
.split__text ul  { margin: 1rem 0 1.5rem 0; }
.split__text ul li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.split__text ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ---------------------------------------------------------
   10. Cards Grid
   --------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 1.25rem;
  object-fit: contain;
}
.card h3 { margin-bottom: 0.75rem; font-size: 1.1rem; color: var(--primary-dark); }
.card p  { color: var(--text-muted); font-size: 0.93rem; line-height: 1.65; margin-bottom: 0.75rem; }
.card ul { margin-top: 0.75rem; }
.card ul li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.25rem 0 0.25rem 1.25rem;
  position: relative;
}
.card ul li::before {
  content: '•';
  position: absolute;
  left: 0.25rem;
  color: var(--primary);
  font-weight: 700;
}

/* ---------------------------------------------------------
   11. Features Row
   --------------------------------------------------------- */
.features-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.feature-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.feature-item h3 {
  color: var(--primary-dark);
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}
.feature-item p { color: var(--text-muted); font-size: 0.93rem; }

/* ---------------------------------------------------------
   12. News Grid
   --------------------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.news-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.news-card__date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.news-card h3 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
  color: var(--text);
  line-height: 1.35;
}
.news-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.6;
}
.news-card__link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}
.news-card__link:hover { color: var(--primary-hover); }

/* Full article on news.html */
.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}
.article-card__date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.article-card h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.article-card p  { color: var(--text-muted); line-height: 1.75; }

/* ---------------------------------------------------------
   13. CTA Block
   --------------------------------------------------------- */
.cta-block {
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  border: 1px solid #bfdbfe;
}
.cta-block .eyebrow { color: var(--primary); }
.cta-block h2 { color: var(--primary-dark); margin-bottom: 1.25rem; }
.cta-block p  { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ---------------------------------------------------------
   14. Partners
   --------------------------------------------------------- */
.partners {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}
.partners__logo {
  filter: grayscale(40%);
  opacity: 0.8;
  transition: filter var(--transition), opacity var(--transition);
  max-height: 60px;
  width: auto;
}
.partners__logo:hover { filter: grayscale(0%); opacity: 1; }

/* ---------------------------------------------------------
   15. Footer
   --------------------------------------------------------- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.75);
  padding: 4rem 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer__brand .nav__logo { color: var(--white); margin-bottom: 0.75rem; }
.footer__brand p { font-size: 0.9rem; color: rgba(255,255,255,.6); line-height: 1.65; margin-bottom: 0.5rem; }
.footer__tagline {
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(255,255,255,.5);
  margin-bottom: 0.75rem;
}
.footer h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 1rem;
}
.footer ul li { margin-bottom: 0.5rem; }
.footer ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,.65);
  transition: color var(--transition);
}
.footer ul li a:hover { color: var(--white); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,.4);
}

/* ---------------------------------------------------------
   16. Page Header (inner pages)
   --------------------------------------------------------- */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 5rem 0 4rem;
  text-align: center;
  color: var(--white);
}
.page-header h1 { color: var(--white); margin-bottom: 0.75rem; }
.page-header p  { color: rgba(255,255,255,.8); font-size: 1.1rem; }

/* ---------------------------------------------------------
   17. Contact Form
   --------------------------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3.5rem;
  align-items: start;
}
.contact-info h3 { margin-bottom: 1rem; color: var(--primary-dark); }
.contact-info p  { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.contact-info address {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}
.contact-form h3 { margin-bottom: 1.5rem; color: var(--primary-dark); }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29,78,216,.12);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.93rem;
}
.form-message--success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.form-message--error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.form-message--error ul { padding-left: 1.2rem; list-style: disc; }
.form-message--error ul li { margin-bottom: 0.25rem; }

/* ---------------------------------------------------------
   18. About page extras
   --------------------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}
.team-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.team-photo img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: top;
}
.team-text h3 { color: var(--primary-dark); margin-bottom: 0.3rem; }
.team-text .team-title {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1rem;
}
.team-text p { color: var(--text-muted); line-height: 1.75; }

.stat-highlight {
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.stat-highlight__number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}
.stat-highlight__label {
  font-size: 1rem;
  opacity: 0.85;
}

.impl-list {
  margin-top: 1rem;
}
.impl-list li {
  padding: 0.6rem 0 0.6rem 1.5rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}
.impl-list li:last-child { border-bottom: none; }
.impl-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ---------------------------------------------------------
   19. Divider
   --------------------------------------------------------- */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---------------------------------------------------------
   20. Prose (centered text content)
   --------------------------------------------------------- */
.prose {
  max-width: 760px;
  margin-inline: auto;
}
.prose h2 { margin-bottom: 1rem; }
.prose h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; color: var(--primary-dark); }
.prose p  { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }

/* ---------------------------------------------------------
   21. Responsive Breakpoints
   --------------------------------------------------------- */

/* Tablet: 900px */
@media (max-width: 900px) {
  .section__split,
  .section__split--reverse { grid-template-columns: 1fr; gap: 2.5rem; }
  .section__split--reverse { direction: ltr; }

  .cards-grid     { grid-template-columns: repeat(2, 1fr); }
  .news-grid      { grid-template-columns: repeat(2, 1fr); }
  .features-row   { grid-template-columns: 1fr; }
  .footer__grid   { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .stats-bar__grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .contact-layout { grid-template-columns: 1fr; gap: 2rem; }
  .team-grid      { grid-template-columns: 1fr; }
  .team-photo img { height: 260px; }
}

/* Mobile: 640px */
@media (max-width: 640px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
  }
  .nav__links.is-open { display: flex; }
  .nav__links li a {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-size: 1rem;
  }
  .nav__toggle { display: block; }
  .nav { position: sticky; }

  .hero { min-height: 70vh; }
  .hero__content { padding: 3rem 0; }

  .stats-bar__grid { grid-template-columns: repeat(2, 1fr); }

  .cards-grid   { grid-template-columns: 1fr; }
  .news-grid    { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 1.75rem; }

  .cta-block { padding: 2.5rem 1.25rem; }
  .contact-form { padding: 1.75rem; }

  .btn--lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
  .btn-group { flex-direction: column; align-items: flex-start; }
  .btn-group .btn { width: 100%; justify-content: center; }

  .article-card { padding: 1.5rem; }
  .team-grid { grid-template-columns: 1fr; }
  .stat-highlight { flex-direction: column; gap: 0.5rem; text-align: center; }
}
