/* ==========================================================================
   Alara ERP Homepage — Design System & Styles
   Visually aligned with ABRA Flexi aesthetic: light, airy, card-based
   Accent: teal (#0D9488) instead of Flexi golden (#ffab26)
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --accent: #0D9488;
  --accent-hover: #0F766E;
  --accent-light: #CCFBF1;
  --bg-white: #FFFFFF;
  --bg-light: #F6F7F9;
  --text-dark: #1E1E21;
  --text-gray: #37373E;
  --text-muted: #718096;
  --text-on-dark: #E2E8F0;
  --border: #DCE2E6;
  --card-shadow: 0px 20px 40px rgba(79, 81, 122, 0.10);
  --card-shadow-hover: 0px 25px 50px rgba(79, 81, 122, 0.16);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1280px;
  --nav-height: 72px;
  --radius: 5px;
  --radius-lg: 10px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-dark);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

/* ---------- Utilities ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--light {
  background: var(--bg-light);
}

.section--dark {
  background: var(--text-dark);
  color: var(--text-on-dark);
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 300;
  color: var(--text-dark);
  margin-bottom: 1rem;
  text-align: center;
}

.section--dark .section-title {
  color: var(--bg-white);
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.section--dark .section-subtitle {
  color: var(--text-on-dark);
  opacity: 0.8;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: 2rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn--small {
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  z-index: 1000;
  transition: box-shadow 0.3s;
}

.nav--scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__logo {
  display: flex;
  align-items: baseline;
  color: var(--text-dark);
  text-decoration: none;
  gap: 0.375rem;
}

.logo__text {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: inherit;
}

.logo__erp {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__link {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-gray);
  text-decoration: none;
  transition: color 0.2s;
}

.nav__link:hover {
  color: var(--accent);
}

.nav__lang {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-light);
  border-radius: 2rem;
  padding: 2px;
}

.nav__lang-btn {
  padding: 0.3rem 0.75rem;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 2rem;
  transition: all 0.2s;
}

.nav__lang-btn--active {
  background: var(--bg-white);
  color: var(--text-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav__cta {
  margin-left: 0.5rem;
}

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

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s;
}

/* Mobile nav */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-white);
  padding: 2rem 1.5rem;
  z-index: 999;
}

.nav__mobile--open {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav__mobile a {
  font-size: 1.125rem;
  color: var(--text-dark);
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 5rem;
  background: var(--bg-white);
  text-align: center;
}

.hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.hero__title strong {
  font-weight: 700;
  color: var(--accent);
}

.hero__subtitle {
  font-size: 1.1875rem;
  color: var(--text-gray);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- About (3 cards) ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.card__text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- Features (2x3 grid) ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.feature:hover {
  border-color: var(--accent);
  box-shadow: var(--card-shadow);
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: var(--radius-lg);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.feature__text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- Why Alara (4 items) ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.why-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.why-item__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 1.25rem;
}

.why-item__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.why-item__text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- Contact / Signup Form ---------- */
.form-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form__group {
  display: flex;
  flex-direction: column;
}

.form__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-gray);
  margin-bottom: 0.375rem;
}

.form__input,
.form__textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text-dark);
  background: var(--bg-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.form__textarea {
  resize: vertical;
  min-height: 100px;
}

.form__submit {
  align-self: flex-start;
}

.form__success {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
}

.form__success--visible {
  display: block;
  animation: fadeIn 0.4s ease;
}

.form__success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.form__success-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form__success-text {
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--text-dark);
  color: var(--text-on-dark);
  padding: 3rem 0 2rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__logo {
  display: flex;
  align-items: baseline;
  color: var(--bg-white);
  text-decoration: none;
  gap: 0.3rem;
}

.footer__logo .logo__text {
  font-size: 1.375rem;
  color: var(--bg-white);
}

.footer__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer__link {
  font-size: 0.875rem;
  color: var(--text-on-dark);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer__link:hover {
  opacity: 1;
  color: var(--text-on-dark);
}

.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copy {
  font-size: 0.8125rem;
  opacity: 0.5;
}

.footer__partner {
  font-size: 0.8125rem;
  opacity: 0.5;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .nav__cta {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 2rem);
    padding-bottom: 3rem;
  }

  .hero__title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }

  .section {
    padding: 3rem 0;
  }

  .cards-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}
