@import url('tokens.css');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, var(--color-bg-primary), var(--color-bg-secondary));
  color: var(--color-text-primary);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
}

h1 {
  font-size: var(--fs-huge);
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--color-green-20), var(--color-cobalt-40));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: var(--fs-xxxl);
  margin-bottom: var(--space-3);
  color: var(--color-text-accent);
}

h3 {
  font-size: var(--fs-xxl);
  margin-bottom: var(--space-2);
  color: var(--color-text-primary);
}

h4 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-2);
  color: var(--color-text-secondary);
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--color-text-link-hover);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Lists */
ul,
ol {
  margin-left: var(--space-4);
  margin-bottom: var(--space-3);
}

li {
  margin-bottom: var(--space-1);
  color: var(--color-text-secondary);
}

/* Layout components using BEM */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container--wide {
  max-width: 1400px;
}

.container--narrow {
  max-width: 800px;
}

/* Header */
.header {
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  font-size: var(--fs-xl);
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-green-40), var(--color-cobalt-40));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.header__menu {
  display: flex;
  list-style: none;
  margin: 0;
  gap: var(--space-4);
}

.header__menu-item {
  margin: 0;
}

.header__menu-link {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
}

.header__menu-link:hover,
.header__menu-link--active {
  background-color: var(--color-bg-tertiary);
  text-decoration: none;
}

/* Hero section */
.hero {
  padding: var(--space-12) 0;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, rgba(10, 15, 10, 0.9), rgba(13, 24, 16, 0.8)), url('../assets/images/hero-background.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, var(--color-green-100) 0%, transparent 70%);
  opacity: 0.3;
  z-index: -1;
}

.hero__title {
  font-size: clamp(var(--fs-xxxl), 4vw, var(--fs-huge));
  margin-bottom: var(--space-4);
  line-height: var(--lh-tight);
}

.hero__subtitle {
  font-size: var(--fs-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-green-60), var(--color-green-40));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-green);
  color: white;
  text-decoration: none;
}

.btn--secondary {
  background: transparent;
  color: var(--color-cobalt-40);
  border: 2px solid var(--color-cobalt-40);
}

.btn--secondary:hover {
  background: var(--color-cobalt-40);
  color: white;
  text-decoration: none;
}

/* Cards */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
}

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

.card__header {
  margin-bottom: var(--space-3);
}

.card__title {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-1);
  color: var(--color-text-accent);
}

.card__subtitle {
  color: var(--color-text-tertiary);
  font-size: var(--fs-sm);
}

.card__content {
  margin-bottom: var(--space-3);
}

.card__footer {
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}

/* Grid layouts */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Sections */
.section {
  padding: var(--space-10) 0;
}

.section--hero {
  padding: var(--space-16) 0;
}

.section--dark {
  background: var(--color-bg-secondary);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section__title {
  font-size: var(--fs-xxxl);
  margin-bottom: var(--space-2);
}

.section__subtitle {
  font-size: var(--fs-lg);
  color: var(--color-text-tertiary);
  max-width: 600px;
  margin: 0 auto;
}

/* Features */
.feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.feature__icon {
  width: var(--space-6);
  height: var(--space-6);
  background: var(--color-green-40);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-bg-primary);
  flex-shrink: 0;
}

.feature__content {
  flex: 1;
}

.feature__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-1);
  color: var(--color-text-primary);
}

.feature__description {
  color: var(--color-text-secondary);
  margin: 0;
}

/* Footer */
.footer {
  background: var(--color-bg-primary);
  border-top: 1px solid var(--color-border);
  padding: var(--space-8) 0;
  margin-top: var(--space-16);
}

.footer__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.footer__section {
  line-height: var(--lh-relaxed);
}

.footer__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-2);
  color: var(--color-text-accent);
}

.footer__bottom {
  text-align: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-tertiary);
  font-size: var(--fs-sm);
}

/* Responsive design */
@media (max-width: 768px) {
  .header__menu {
    display: none;
  }

  .header__nav {
    justify-content: center;
  }

  .hero {
    padding: var(--space-8) 0;
  }

  .section {
    padding: var(--space-6) 0;
  }

  .section--hero {
    padding: var(--space-10) 0;
  }

  .container {
    padding: 0 var(--space-2);
  }
}

/* Utility classes */
.text--center { text-align: center; }
.text--left { text-align: left; }
.text--right { text-align: right; }

.mb--0 { margin-bottom: 0; }
.mb--1 { margin-bottom: var(--space-1); }
.mb--2 { margin-bottom: var(--space-2); }
.mb--3 { margin-bottom: var(--space-3); }
.mb--4 { margin-bottom: var(--space-4); }

.hidden { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}