/*
 * Global styles and theme variables
 *
 * This stylesheet defines the look and feel of the Koinu landing page. It uses
 * modern CSS techniques like flexbox, CSS grid and custom properties to create
 * a responsive and accessible layout. Animations are controlled through
 * transition and transform properties and toggled via JavaScript when
 * elements come into view.
 */

/* CSS variables for easy theming */
:root {
  --color-primary: #ff9fa8; /* soft pink inspired by cherry blossoms */
  --color-secondary: #ffa74a; /* warm orange accent for buttons */
  --color-dark: #1f2933; /* dark slate for text and footer */
  --color-light: #fff5f6; /* very light pink for sections */
  --color-neutral: #f9f9fb;
  --font-heading: "Montserrat", sans-serif;
  --font-body: "Nunito", sans-serif;
  --transition-base: 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & base styling */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-neutral);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container utility class */
.container {
  width: 90%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Navigation bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.navbar .logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-secondary);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-weight: 600;
  color: var(--color-dark);
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--color-secondary);
}

/* Sections */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--color-dark);
}

/* Hero Section */
.hero {
  height: 100vh;
  background-image: url("images/hero.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.9)
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  text-align: center;
  max-width: 700px;
  padding: 1.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-dark);
  margin-bottom: 1rem;
}

.hero-mission {
  font-size: 1.125rem;
  color: var(--color-dark);
  margin-bottom: 2rem;
}

/* Additional element in hero: explainer for token name */
.hero-explainer {
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 2rem;
  color: var(--color-dark);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  text-decoration: none;
}

.primary-btn {
  background-color: var(--color-secondary);
  color: #ffffff;
}

.secondary-btn {
  background-color: var(--color-primary);
  color: var(--color-dark);
}

.btn:hover,
.btn:focus {
  transform: translateY(-3px);
}

/* Story section */
.story {
  background-color: var(--color-light);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: 2rem;
}

.story-text {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-dark);
}

.story-image img {
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* About section */
.about {
  background-color: var(--color-neutral);
}

.about-intro,
.about-mission {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1.125rem;
  color: var(--color-dark);
  text-align: center;
}

.token-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: var(--color-light);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.stat-card h3 {
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--color-secondary);
}

.stat-card p {
  font-weight: 600;
  font-size: 1.125rem;
}

/* Contract address card in buy section */
.contract-card {
  background-color: var(--color-light);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  max-width: 500px;
  margin: 2rem auto 0;
  text-align: center;
}

.contract-card h3 {
  font-family: var(--font-heading);
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.contract-card p {
  font-weight: 600;
  word-break: break-all;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  color: var(--color-dark);
}

.contract-card .tertiary-btn {
  background-color: var(--color-secondary);
  color: #ffffff;
}

.contract-card .tertiary-btn:hover,
.contract-card .tertiary-btn:focus {
  transform: translateY(-3px);
}

/* Buy section */
.buy {
  background-color: var(--color-light);
  text-align: center;
}

.buttons-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.buttons-row .btn {
  min-width: 180px;
}

/* Community section */
.community {
  background-color: var(--color-neutral);
}

.testimonials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.testimonial-card {
  background-color: var(--color-light);
  border-left: 4px solid var(--color-secondary);
  padding: 1.5rem;
  border-radius: 0.5rem;
  max-width: 350px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  position: relative;
}

.testimonial-card cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  color: var(--color-secondary);
  font-weight: 600;
}

.community-note {
  margin-top: 2rem;
  font-size: 1rem;
  text-align: center;
  color: var(--color-dark);
}

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

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-links a {
  color: #ffffff;
  margin: 0 0.5rem;
  font-size: 1.25rem;
  transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--color-primary);
}

/* Reveal animation classes */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.5rem;
  }
  .section {
    padding: 4rem 0;
  }
}
