:root {
  --bg: #f8fffa;
  --surface: #ffffff;
  --surface-soft: #f1fff6;
  --text: #173226;
  --muted: #4b6a5d;
  --accent: #2e9a57;
  --accent-dark: #1d7b43;
  --brand-dark: #0f4d2f;
  --border: #d4efdd;
  --shadow: 0 10px 24px rgba(9, 61, 30, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  line-height: 1.6;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--brand-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.site-nav .container {
  width: 100%;
  margin: 0;
  padding-left: 1rem;
  padding-right: 1rem;
}

.nav-content {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  gap: 2rem;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
  flex: 1;
}

.nav-auth {
  margin-left: auto;
}

.nav-link {
  display: inline-block;
  padding: 0.75rem 1.2rem;
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  background-color: rgba(46, 154, 87, 0.2);
  color: var(--accent);
}

.nav-link.active {
  background-color: var(--accent);
  color: #ffffff;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  gap: 6px;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--brand-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    gap: 0;
    border-radius: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-link {
    padding: 1rem 1.5rem;
    border-radius: 0;
    width: 100%;
  }

  .nav-auth {
    margin-left: 0;
  }

  .nav-link:hover {
    background-color: rgba(46, 154, 87, 0.3);
  }
}

.hero {
  padding: 5rem 0 4rem;
  background-image:
    linear-gradient(rgba(15, 77, 47, 0.62), rgba(15, 77, 47, 0.5)),
    url("../images/Background.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--border);
}

.hero-content {
  text-align: center;
}

.tagline {
  margin: 0;
  color: #d9ffe7;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin: 0.7rem 0;
  color: #ffffff;
}

.intro {
  margin: 0 auto 1.75rem;
  max-width: 700px;
  color: #f1fff7;
  font-size: 1.06rem;
}

.cta-btn {
  display: inline-block;
  text-decoration: none;
  background-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
  padding: 0.82rem 1.2rem;
  border-radius: 0.72rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cta-btn:hover,
.cta-btn:focus-visible {
  transform: translateY(-1px);
  background-color: var(--accent-dark);
}

.section {
  padding: 4rem 0;
}

.section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-bottom: 1.2rem;
}

.habits .section-intro {
  color: var(--muted);
}

.habit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.habit-card {
  position: relative;
  background: #0f4d2f;
  border: 1px solid var(--border);
  border-left: 10px solid var(--accent);
  border-radius: 0.95rem;
  padding: 0;
  min-height: 430px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.habit-card:hover {
  transform: translateY(-9px) scale(1.01);
  box-shadow: 0 22px 34px rgba(9, 61, 30, 0.2);
}

.habit-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  margin: 0;
  border: 0;
}

.habit-content {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1;
  background: linear-gradient(rgba(255, 255, 255, 0.76), rgba(248, 255, 251, 0.7));
  border: 1px solid rgba(209, 239, 221, 0.92);
  border-radius: 0.85rem;
  padding: 0.9rem 0.95rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 22px rgba(9, 61, 30, 0.2);
}

.habit-card h3 {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.54rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #114b2f;
  text-shadow: none;
}

.habit-card p {
  margin: 0;
  color: #1d4f36;
  font-size: 1.11rem;
  line-height: 1.55;
  font-weight: 600;
  text-shadow: none;
}

.habits h2 {
  font-size: clamp(1.9rem, 4.2vw, 2.4rem);
  color: #0f4d2f;
  margin-bottom: 1.35rem;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.about p,
.contact p {
  max-width: 900px;
  margin-top: 0;
  color: var(--muted);
}

.about,
.contact {
  border-top: 1px solid var(--border);
}

.about {
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 5.5rem 0;
  background-image:
    linear-gradient(rgba(15, 77, 47, 0.62), rgba(15, 77, 47, 0.62)),
    url("../images/Background.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.about .container {
  width: min(1320px, 97%);
}

.habits .container {
  width: min(1320px, 97%);
}

.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.35rem;
  align-items: stretch;
}

.about-main,
.about-highlight-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.about-main {
  padding: 1.4rem 1.35rem;
  display: grid;
  gap: 0.9rem;
}

.about h2 {
  font-size: clamp(1.9rem, 4.2vw, 2.4rem);
  margin-bottom: 1.35rem;
}

.about-main p {
  color: var(--muted);
  margin-bottom: 0;
}

.about-highlights {
  display: grid;
  gap: 0.85rem;
}

.about-highlight-card {
  padding: 1rem 1.05rem;
}

.about-highlight-card h3 {
  margin-bottom: 0.45rem;
  color: var(--accent-dark);
}

.about-highlight-card p {
  margin: 0;
  color: var(--muted);
}

.about-logo-panel {
  background-color: transparent;
  background-image:
    linear-gradient(rgba(15, 77, 47, 0.22), rgba(15, 77, 47, 0.22)),
    url("../images/Logo.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 170%;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  min-height: 100%;
}

.contact {
  background: var(--brand-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  min-height: 460px;
  display: flex;
  align-items: center;
}

.contact .container {
  text-align: center;
  width: min(1320px, 97%);
}

.contact h2 {
  color: #ffffff;
  font-size: clamp(2rem, 4.8vw, 2.9rem);
  margin-bottom: 0.9rem;
  letter-spacing: 0.01em;
}

.contact > .container > p {
  margin-inline: auto;
  max-width: 900px;
  color: #d9ffe7;
  font-size: 1.15rem;
  line-height: 1.75;
  margin-bottom: 1.6rem;
}

.contact-card {
  background: linear-gradient(180deg, #f6fff9 0%, #ebfff3 100%);
  border: 1px solid #ccefd9;
  border-radius: 1rem;
  padding: 1.25rem 1.3rem;
  box-shadow: 0 16px 30px rgba(8, 50, 27, 0.2);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.contact-card p {
  margin: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 0.85rem 0.9rem;
  font-size: 1.03rem;
  line-height: 1.5;
}

.contact-card strong {
  display: block;
  color: var(--accent-dark);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--brand-dark);
  padding: 1.2rem 0;
}

.footer-content {
  display: flex;
  justify-content: center;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: #e6fff1;
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .hero {
    padding: 4rem 0 3rem;
  }

  .section {
    padding: 3rem 0;
  }

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

  .habit-card {
    min-height: 390px;
  }

  .about {
    min-height: 0;
    padding: 4rem 0;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-logo-panel {
    min-height: 260px;
    background-position: center;
    background-size: 90%;
  }

  .contact {
    min-height: 0;
  }

  .contact > .container > p {
    font-size: 1.03rem;
  }

  .contact-card {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(46, 154, 87, 0.14), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(15, 77, 47, 0.16), transparent 40%),
    linear-gradient(180deg, #f7fffa 0%, #ebf8f0 100%);
}

.auth-wrapper {
  width: min(460px, 92%);
  padding: 2rem 0;
}

.auth-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 2rem;
}

.auth-brand {
  display: inline-block;
  text-decoration: none;
  color: var(--brand-dark);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 0.7rem;
}

.auth-card h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.7rem, 5vw, 2rem);
}

.auth-subtitle {
  margin-top: 0;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.auth-form {
  display: grid;
  gap: 0.75rem;
}

.auth-form label {
  font-weight: 600;
  color: var(--text);
}

.auth-form input {
  border: 1px solid #c5dfd0;
  border-radius: 0.65rem;
  padding: 0.75rem 0.85rem;
  font-size: 1rem;
  color: var(--text);
  background: #fcfffd;
}

.auth-form input:focus {
  outline: 2px solid rgba(46, 154, 87, 0.38);
  border-color: var(--accent);
}

.auth-btn {
  margin-top: 0.35rem;
  border: none;
  border-radius: 0.65rem;
  padding: 0.82rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.auth-btn:hover,
.auth-btn:focus-visible {
  background: var(--accent-dark);
}

.auth-message {
  min-height: 1.5rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-weight: 500;
}

.auth-message.success {
  color: #15703a;
}

.auth-message.error {
  color: #bb2020;
}

.auth-switch {
  margin: 0.95rem 0 0;
  color: var(--muted);
}

.auth-switch a {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch a:hover,
.auth-switch a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .auth-card {
    padding: 1.35rem;
  }
}
