/* ============================================
   PERINTAH WORLDWIDE – perintah.store
   Color scheme inspired by neweracap.com.my
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ── */
:root {
  --bg: #FFFFFF;
  --bg-alt: #F4F4F4;
  --text: #000000;
  --text-muted: #666666;
  --accent: #000000;
  --border: #000000;
  --border-light: #E0E0E0;
  --success: #2ecc71;
  --error: #e74c3c;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Announcement Bar ── */
.announcement-bar {
  background: var(--accent);
  color: var(--bg);
  overflow: hidden;
  white-space: nowrap;
  height: 40px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 100;
}

.announcement-bar__track {
  display: flex;
  animation: marquee 25s linear infinite;
  will-change: transform;
}

.announcement-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.announcement-bar__item .dot {
  width: 4px;
  height: 4px;
  background: var(--bg);
  border-radius: 50%;
  opacity: 0.6;
  flex-shrink: 0;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.header__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.header__logo img {
  height: 64px;
  width: auto;
  transition: transform 0.3s ease;
}

.header__logo:hover img {
  transform: scale(1.05);
}

.header__nav {
  position: absolute;
  right: 40px;
  display: flex;
  gap: 32px;
}

.header__nav a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.header__nav a:hover::after {
  width: 100%;
}

/* ── Hero Section ── */
.hero {
  position: relative;
  height: 85vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('catalog.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  transform: scale(1.05);
  transition: transform 8s ease;
}

.hero:hover .hero__bg {
  transform: scale(1.1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 0 20px;
}

.hero__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 8px 24px;
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease both;
}

.hero__title {
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero__subtitle {
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero__cta {
  display: inline-block;
  border: 2px solid #fff;
  color: #fff;
  padding: 16px 48px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: var(--transition);
  animation: fadeInUp 0.8s ease 0.6s both;
  cursor: pointer;
  background: transparent;
}

.hero__cta:hover {
  background: #fff;
  color: #000;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Catalog Preview ── */
.catalog {
  padding: 100px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.section-header__title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -1px;
  line-height: 1.1;
}

.catalog__image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-alt);
}

.catalog__image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.catalog__image-wrapper:hover img {
  transform: scale(1.02);
}

.catalog__badge {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: var(--accent);
  color: var(--bg);
  padding: 12px 28px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── Marquee Divider ── */
.marquee-divider {
  background: var(--bg-alt);
  padding: 20px 0;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-divider__track {
  display: flex;
  animation: marquee 20s linear infinite;
}

.marquee-divider__item {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  padding: 0 32px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.15;
}

.marquee-divider__item .star {
  font-size: 8px;
  flex-shrink: 0;
}

/* ── Products Grid ── */
.products {
  padding: 100px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.product-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.product-card__image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card__image img {
  transform: scale(1.08);
}

.product-card__info {
  padding: 20px;
  text-align: center;
}

.product-card__name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.product-card__price {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── Subscribe Section ── */
.subscribe {
  background: var(--accent);
  color: var(--bg);
  padding: 100px 40px;
  text-align: center;
}

.subscribe__inner {
  max-width: 600px;
  margin: 0 auto;
}

.subscribe__icon {
  font-size: 36px;
  margin-bottom: 24px;
  opacity: 0.6;
}

.subscribe__title {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.subscribe__text {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 40px;
  line-height: 1.8;
}

.subscribe__form {
  display: flex;
  gap: 0;
  max-width: 500px;
  margin: 0 auto;
}

.subscribe__input {
  flex: 1;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-right: none;
  background: transparent;
  color: #fff;
  padding: 16px 24px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 1px;
  outline: none;
  transition: var(--transition);
}

.subscribe__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
}

.subscribe__input:focus {
  border-color: rgba(255, 255, 255, 0.8);
}

.subscribe__btn {
  background: #fff;
  color: #000;
  border: 2px solid #fff;
  padding: 16px 32px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.subscribe__btn:hover {
  background: transparent;
  color: #fff;
}

.subscribe__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.subscribe__message {
  margin-top: 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  min-height: 24px;
  transition: var(--transition);
}

.subscribe__message--success {
  color: var(--success);
}

.subscribe__message--error {
  color: var(--error);
}

/* ── Footer ── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  padding: 60px 40px;
}

.footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.footer__logo img {
  height: 48px;
  width: auto;
  opacity: 0.8;
}

.footer__socials {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer__socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  transition: var(--transition);
  font-size: 18px;
}

.footer__socials a:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.footer__copy {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ── Scroll Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Loading spinner for subscribe btn ── */
.subscribe__btn .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .announcement-bar__item {
    font-size: 10px;
    letter-spacing: 1.5px;
    padding: 0 16px;
  }

  .header__inner {
    padding: 12px 20px;
  }

  .header__logo img {
    height: 48px;
  }

  .header__nav {
    display: none;
  }

  .hero {
    height: 70vh;
    min-height: 480px;
  }

  .hero__title {
    letter-spacing: -1px;
  }

  .hero__cta {
    padding: 14px 36px;
  }

  .catalog {
    padding: 60px 20px;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .products {
    padding: 60px 20px;
  }

  .products__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card__info {
    padding: 12px;
  }

  .product-card__name {
    font-size: 11px;
  }

  .product-card__price {
    font-size: 12px;
  }

  .subscribe {
    padding: 60px 20px;
  }

  .subscribe__form {
    flex-direction: column;
  }

  .subscribe__input {
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: none;
  }

  .subscribe__input:focus {
    border-right-color: rgba(255, 255, 255, 0.8);
  }

  .footer {
    padding: 40px 20px;
  }
}

@media (max-width: 480px) {
  .products__grid {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 60vh;
    min-height: 400px;
  }
}
