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

/* 1. Font */
@font-face {
  font-family: 'Behove';
  src: url('../font/Behove/Behove.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.login-container h2 {
  font-family: 'Behove', sans-serif;
  font-size: 32px;
  color: #8C5A3C;
}

/* 2. Variabel */
:root {
  --brown: #8C5A3C;
  --brown-d: #5a3212;
  --brown-l: #a0672e;
  --beige: #F0E6D3;
  --cream: #FAF5EC;
  --dark: #1a1008;
  --tan: #C9A07A;
  --tan-l: #E2C9A8;
  --choc: #3D1F00;
}

/* 3. Dasar */
html,
body {
  min-height: 100vh;
  background-color: var(--beige);
  font-family: 'Behove', sans-serif;
  line-height: 1.5;
}

body {
  overflow-x: hidden;
}

/* 4. Navbar */
.navbar {
  font-family: 'Behove';
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  background: var(--brown);
  border-bottom: 3px solid #2c1a08;
}

.nav-left,
.nav-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.nav-left {
  justify-content: flex-start;
}

.nav-right {
  justify-content: flex-end;
}

.nav-center {
  flex: 0;
  text-align: center;
  white-space: nowrap;
}

.logo {
  color: #EDE9E6;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  color: #EDE9E6;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 0.7;
}

.profile-box {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-family: 'Behove', sans-serif;
}

.profile-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

.login-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #EDE9E6 !important;
}

.user-icon {
  width: 22px;
  height: 22px;
  stroke: #00BFFF;
  stroke-width: 2px;
}

.cart-icon {
  position: relative;
  font-size: 20px;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -12px;
  padding: 2px 5px;
  border-radius: 50%;
  background: red;
  color: white;
  font-size: 10px;
  font-weight: bold;
}

/* 5. Page */
.page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px - 38px);
  padding: 40px 20px;
  overflow: hidden;
}

/* 6. Background decorations */
.deco {
  position: absolute;
  border-radius: 50%;
  opacity: 0.13;
  background: var(--brown);
  animation: bob ease-in-out infinite alternate;
}

.deco1 {
  top: -40px;
  left: -60px;
  width: 180px;
  height: 180px;
  animation-duration: 6s;
}

.deco2 {
  right: -30px;
  bottom: 60px;
  width: 120px;
  height: 120px;
  animation-duration: 8s;
  animation-delay: 1s;
}

.deco3 {
  top: 120px;
  right: 120px;
  width: 80px;
  height: 80px;
  opacity: 0.08;
  animation-duration: 5s;
  animation-delay: 2s;
}

.deco4 {
  bottom: 100px;
  left: 80px;
  width: 60px;
  height: 60px;
  opacity: 0.09;
  animation-duration: 7s;
}

@keyframes bob {
  0% {
    transform: translateY(0) scale(1);
  }

  100% {
    transform: translateY(-14px) scale(1.04);
  }
}

.dot {
  position: absolute;
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  background: var(--brown-d);
  opacity: 0.12;
}

.d1 {
  top: 15%;
  left: 14%;
  width: 22px;
  height: 16px;
}

.d2 {
  top: 65%;
  left: 8%;
  width: 16px;
  height: 12px;
}

.d3 {
  top: 25%;
  right: 10%;
  width: 20px;
  height: 15px;
}

.d4 {
  top: 75%;
  right: 20%;
  width: 14px;
  height: 10px;
}

.d5 {
  top: 50%;
  left: 5%;
  width: 18px;
  height: 13px;
}

/* 7. Card */
.card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  padding: 48px 44px 44px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 16px 60px rgba(90, 50, 18, 0.18), 0 2px 8px rgba(90, 50, 18, 0.08);
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.94);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 5px;
  background: linear-gradient(90deg, var(--brown-l), var(--brown), var(--brown-d));
  border-radius: 0 0 8px 8px;
}

/* 8. Header */
.card-header {
  margin-bottom: 32px;
  text-align: center;
}

.brownie-emoji {
  display: block;
  margin-bottom: 12px;
  font-size: 52px;
  line-height: 1;
  animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {

  0%,
  100% {
    transform: rotate(-4deg);
  }

  50% {
    transform: rotate(4deg);
  }
}

.card-title {
  color: var(--dark);
  font-family: 'Baloo 2', cursive;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-sub {
  margin-top: 5px;
  color: var(--tan);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* 9. Form */
.field {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--brown-d);
  font-family: 'Baloo 2', cursive;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  font-size: 17px;
  line-height: 1;
  pointer-events: none;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  height: 50px;
  padding: 0 44px 0 44px;
  border: 2px solid var(--tan-l);
  border-radius: 14px;
  background: var(--cream);
  color: var(--dark);
  font-family: 'Baloo 2', sans-serif;
  font-size: 15px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input::placeholder {
  color: var(--tan);
  font-weight: 400;
}

input:hover {
  border-color: var(--tan);
  background: #fff;
}

input:focus {
  border-color: var(--brown);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(123, 74, 30, 0.12);
}

.pw-wrap input {
  padding-right: 44px;
}

.eye-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 2px 4px;
  border: none;
  background: none;
  color: var(--tan);
  font-size: 18px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.2s;
}

.eye-btn:hover {
  color: var(--brown);
}

.err {
  display: none;
  margin-top: 4px;
  color: #c0392b;
  font-family: 'Baloo 2', sans-serif;
  font-size: 12px;
  font-weight: 600;
}

/* 10. Options */
.options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 24px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brown-d);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brown);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.forgot {
  color: var(--brown-l);
  font-family: 'Baloo 2', cursive;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}

.forgot:hover {
  color: var(--brown-d);
}

/* 11. Buttons */
.btn-login,
.btn-daftar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 14px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.18s;
}

.btn-login {
  height: 52px;
  border: none;
  background: var(--brown);
  color: #fff;
  font-family: 'Baloo 2', cursive;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  gap: 10px;
  box-shadow: 0 4px 0 var(--brown-d), 0 6px 20px rgba(90, 50, 18, 0.3);
}

.btn-login:hover {
  background: var(--brown-l);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--brown-d), 0 10px 28px rgba(90, 50, 18, 0.35);
}

.btn-login:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--brown-d), 0 4px 12px rgba(90, 50, 18, 0.25);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--tan);
  font-family: 'Baloo 2', cursive;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--tan-l);
  border-radius: 2px;
}

.btn-daftar {
  height: 50px;
  border: 2.5px solid var(--brown);
  background: transparent;
  color: var(--brown);
  font-family: 'Baloo 2', cursive;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  gap: 8px;
}

.btn-daftar:hover {
  background: var(--beige);
  border-color: var(--brown-d);
  color: var(--brown-d);
}

/* 12. Footer */
.card-footer {
  margin-top: 20px;
  color: var(--tan);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}

.card-footer a {
  color: var(--brown);
  font-weight: 700;
  text-decoration: none;
}

.card-footer a:hover {
  text-decoration: underline;
}

/* 13. Overlay */
.success {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 24px;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.success.show {
  opacity: 1;
  pointer-events: all;
}

.success-icon {
  font-size: 56px;
  animation: bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounce {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

.success-title {
  color: var(--dark);
  font-family: 'Baloo 2', cursive;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.success-sub {
  color: var(--tan);
  font-size: 14px;
  font-weight: 600;
}

/* 14. Shake */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-7px);
  }

  40% {
    transform: translateX(7px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

.shake {
  animation: shake 0.38s ease;
}

/* 15. Responsive */
@media (max-width: 992px) {
  .navbar {
    flex-direction: column;
    gap: 15px;
  }

  .nav-left,
  .nav-right {
    width: 100%;
    justify-content: center;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .page {
    padding: 30px 16px;
  }

  .card {
    padding: 40px 24px 36px;
  }
}

@media (max-width: 480px) {
  .logo {
    font: 24px;
  }

  .nav-links a {
    font-size: 15px;
  }

  .card-title {
    font-size: 28px;
  }

  .brownie-emoji {
    font-size: 46px;
  }

  .options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* MOBILE RESPONSIVE */
@media screen and (max-width: 768px) {

  /* NAVBAR */
  .navbar {
    flex-direction: column;
    gap: 15px;
    padding: 15px 20px;
  }

  .nav-left,
  .nav-right {
    width: 100%;
    justify-content: center;
  }

  .nav-links {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links a {
    font-size: 16px;
  }

  /* LOGO */
  .logo {
    width: 220px;
    height: 70px;
  }

  .logo-static,
  .logo-hover {
    width: 200px;
  }

  /* HERO */
  .hero {
    display: flex;
    flex-direction: column;

    gap: 30px;

    padding: 30px 20px 50px;

    min-height: auto;
  }

  /* BOX PUTIH */
  .hero-center {
    width: 100%;

    padding: 35px 25px;

    order: 1;

    border-radius: 20px;
  }

  .hero-center h1 {
    font-size: 48px;
    line-height: 0.95;
  }

  .hero-description {
    font-size: 15px;
  }

  /* BROWNIES KIRI */
  .hero-side:first-child {
    order: 2;
  }

  .hero-side:first-child .floating-img {
    width: 90%;

    transform: none;
  }

  /* BOX KANAN */
  .hero-side:last-child {
    order: 3;
    justify-content: center;
  }

  .hero-side:last-child .floating-img {
    width: 130%;

    max-width: 500px;

    transform: translateX(40px);
  }

  /* BUTTON */
  .btn-order {
    width: 100%;
    text-align: center;
    padding: 16px;
    font-size: 16px;
  }

  /* TICKER */
  .ticker-text span {
    font-size: 12px;
    padding: 0 25px;
  }

}