/* NANEM - HOME PAGE */

.home-container {
  max-width: 800px;
  margin: 48px auto;
  padding: 0 20px;
}

/* Guest landing; shared navbar, footer, and authenticated home keep their styles. */
.page-container:has(.home-landing) {
  max-width: none;
  padding: 0;
}

html:has(.home-landing) {
  scroll-behavior: smooth;
}

.home-landing {
  --home-soft: #f3f5ee;
  --home-radius: 14px;
}

.home-landing :is(h1, h2, h3, p) {
  margin: 0;
}

.home-landing :is(h1, h2, h3) {
  text-wrap: balance;
}

.home-landing p {
  line-height: 1.7;
}

.home-wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.home-eyebrow {
  color: var(--color-primary);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-hero {
  overflow: hidden;
  padding-top: clamp(48px, 6vw, 82px);
  background: var(--home-soft);
}

.home-hero__copy {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 24px;
  text-align: center;
  animation: home-enter 600ms ease-out both;
}

.home-hero h1 {
  max-width: 920px;
  font-size: clamp(2.4rem, 4.5vw, 3.85rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.home-hero h1 span {
  color: var(--color-primary);
}

.home-hero__description {
  max-width: 580px;
  color: var(--color-muted);
  font-size: 1.05rem;
}

.home-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.home-landing .home-button {
  min-height: 46px;
  height: auto;
  padding: 13px 21px;
  transition: background-color 180ms ease, box-shadow 180ms ease,
    transform 180ms ease;
}

.home-button .icon,
.home-link .icon {
  transition: transform 180ms ease;
}

.home-button:hover .icon,
.home-link:hover .icon {
  transform: translateX(3px);
}

.home-preview {
  max-width: 1040px;
  margin: 48px auto 0;
  overflow: hidden;
  border: 1px solid #d6dccd;
  border-bottom: 0;
  border-radius: var(--home-radius) var(--home-radius) 0 0;
  background: var(--color-surface);
  box-shadow: 0 10px 36px rgb(48 65 38 / 5%);
  animation: home-enter 700ms 100ms ease-out both;
}

.home-preview__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.home-preview__dots {
  display: flex;
  gap: 5px;
}

.home-preview__dots i {
  width: 7px;
  height: 7px;
  border: 1px solid #c8cebf;
  border-radius: 50%;
}

.home-preview__body {
  padding: 28px 30px 30px;
}

.home-preview__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.home-preview__heading h2 {
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.home-preview__categories {
  flex-shrink: 0;
  color: var(--color-primary);
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-preview__grid,
.home-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-plant {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 200ms ease, box-shadow 200ms ease,
    transform 200ms ease;
}

.home-plant__photo {
  overflow: hidden;
  aspect-ratio: 1.85;
  background: var(--home-soft);
}

.home-landing img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-plant img {
  transition: transform 450ms ease;
}

.home-plant__copy {
  padding: 16px;
}

.home-plant h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.home-plant p {
  margin-top: 5px;
  color: var(--color-muted);
  font-size: 0.74rem;
}

.home-section {
  padding-block: clamp(52px, 6vw, 80px);
  scroll-margin-top: 90px;
}

.home-section__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 32px;
}

.home-section__heading .home-eyebrow {
  margin-bottom: 14px;
}

.home-section__heading h2,
.home-story h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.22;
}

.home-section__heading > p {
  max-width: 355px;
  color: var(--color-muted);
  font-size: 0.94rem;
}

.home-features {
  gap: 24px;
}

.home-feature {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: border-color 200ms ease, transform 200ms ease;
}

.home-feature__icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 10px;
  background: var(--home-soft);
  color: var(--color-primary);
}

.home-feature h3 {
  margin-bottom: 10px;
  font-size: 1.13rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.home-feature p {
  color: var(--color-muted);
  font-size: 0.88rem;
}

.home-story {
  padding-block: clamp(48px, 6vw, 76px);
  background: var(--home-soft);
}

.home-story__layout {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  align-items: center;
  gap: clamp(32px, 5vw, 68px);
}

.home-story__photo {
  overflow: hidden;
  aspect-ratio: 1.35;
  border-radius: 12px;
  background: var(--color-border);
}

.home-story__copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 20px;
}

.home-story__copy > p:not(.home-eyebrow) {
  max-width: 470px;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.home-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.home-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 44px;
  border-radius: var(--home-radius);
  background: var(--color-primary);
  color: #fff;
}

.home-cta h2 {
  font-size: clamp(1.55rem, 2.5vw, 1.9rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.home-cta p {
  margin-top: 10px;
  color: #edf0e8;
  font-size: 0.9rem;
}

.home-landing .home-button--white {
  flex-shrink: 0;
  background: #fff;
  color: var(--color-primary);
}

.home-button--white:hover {
  background: #f2f4ee;
}

@keyframes home-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .home-plant:hover {
    border-color: var(--color-sage);
    box-shadow: 0 6px 20px rgb(48 65 38 / 7%);
    transform: translateY(-3px);
  }

  .home-plant:hover img {
    transform: scale(1.035);
  }

  .home-feature:hover {
    border-color: var(--color-sage);
    transform: translateY(-2px);
  }
}

@media (max-width: 760px) {
  .home-wrap {
    padding-inline: 20px;
  }

  .home-hero__copy {
    gap: 20px;
  }

  .home-hero__description {
    max-width: 470px;
    font-size: 0.95rem;
  }

  .home-preview {
    margin-top: 34px;
  }

  .home-preview__body {
    padding: 22px 18px;
  }

  .home-preview__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 18px;
  }

  .home-preview__heading h2 {
    font-size: 1.05rem;
  }

  .home-preview__grid {
    gap: 10px;
  }

  .home-plant__copy {
    padding: 12px 10px;
  }

  .home-plant h3 {
    font-size: 0.86rem;
  }

  .home-plant p {
    font-size: 0.7rem;
  }

  .home-section__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 26px;
  }

  .home-features,
  .home-story__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .home-feature {
    padding: 25px;
  }

  .home-story__layout {
    gap: 30px;
  }

  .home-story__photo {
    aspect-ratio: 1.6;
  }

  .home-cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 25px;
    padding: 30px;
  }
}

@media (max-width: 480px) {
  .home-hero h1 {
    font-size: clamp(2rem, 8.5vw, 2.4rem);
  }

  .home-hero h1 br {
    display: none;
  }

  .home-hero h1 span {
    display: block;
    margin-top: 6px;
  }

  .home-actions {
    width: 100%;
    flex-direction: column;
  }

  .home-actions .home-button {
    width: 100%;
  }

  .home-preview__bar {
    padding: 12px 16px;
  }

  .home-preview__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-plant {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: stretch;
  }

  .home-plant__photo {
    aspect-ratio: auto;
    min-height: 86px;
  }

  .home-plant__copy {
    align-self: center;
    padding: 12px 14px;
  }

  .home-plant h3 {
    font-size: 0.94rem;
  }

  .home-plant p {
    font-size: 0.72rem;
  }

  .home-feature__icon {
    margin-bottom: 18px;
  }

  .home-cta {
    padding: 27px;
  }

  .home-cta .home-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.home-landing) {
    scroll-behavior: auto;
  }

  .home-landing *,
  .home-landing *::before,
  .home-landing *::after {
    animation: none;
    transition: none;
  }
}

/* TAMPILAN USER (SUDAH LOGIN) */
.home-user {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.user-greeting {
  background: #f8faf6;
  border: 1px solid #e4ebd9;
  border-radius: 16px;
  padding: 32px;
}

.user-greeting__badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary, #2d5a27);
}

.user-greeting__title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-text, #111827);
  margin: 8px 0 6px;
}

.user-greeting__sub {
  font-size: 0.95rem;
  color: var(--color-muted, #6b7280);
  margin: 0;
}

/* Quick nav untuk yang sudah login */
.quick-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.quick-nav__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.quick-nav__item:hover {
  border-color: #c3d9bc;
  box-shadow: 0 4px 12px rgba(45, 90, 39, 0.06);
  transform: translateY(-2px);
}

.quick-nav__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e4ebd9;
  color: var(--color-primary, #2d5a27);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.quick-nav__text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text, #111827);
  margin: 0 0 4px;
}

.quick-nav__text p {
  font-size: 0.85rem;
  color: var(--color-muted, #6b7280);
  margin: 0;
  line-height: 1.4;
}
