/* ==========================================================================
   Main Stylesheet - Piknini Nutri Landing Page
   ========================================================================== */

/* Import utilities and base styles */
@import './vendor/normalize.css';
@import './utilities/variables.css';
@import './utilities/typography.css';
@import './utilities/animations.css';
@import './utilities/responsive.css';

/* Import component styles */
@import './components/header.css';
@import './components/hero.css';
@import './components/features.css';
@import './components/testimonials.css';
@import './components/pricing.css';
@import './components/faq.css';
@import './components/footer.css';

/* ==========================================================================
   Global Styles
   ========================================================================== */

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

/* Body styles */
body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--background-primary);
  overflow-x: hidden;
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Selection styles */
::selection {
  background-color: var(--primary-500);
  color: var(--white);
}

::-moz-selection {
  background-color: var(--primary-500);
  color: var(--white);
}

/* ==========================================================================
   Button Components
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-normal);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button variants */
.btn--primary {
  background-color: var(--black);
  color: var(--white);
  border-color: var(--black);
  box-shadow: 4 4 0px 0 rgba(0, 0, 0, 1);
}

.btn--primary:hover {
  background-color: var(--primary-700);
  border-color: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--white);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn--secondary {
  background-color: transparent;
  color: var(--black);
  border-color: var(--black);
  box-shadow: 4 4 0px 0 rgba(0, 0, 0, 1);

}

.btn--secondary:hover {
  background-color: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-700);
}

.btn--secondary:active {
  background-color: var(--primary-100);
}

.btn--outline {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn--outline:hover {
  background-color: var(--neutral-50);
  border-color: var(--neutral-300);
}

.btn--ghost {
  background-color: transparent;
  color: var(--text-primary);
  border-color: transparent;
}

.btn--ghost:hover {
  background-color: var(--neutral-100);
}

/* Button sizes */
.btn--small {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

.btn--large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
  min-height: var(--btn-height-lg);
}

.btn--xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--font-size-xl);
  min-height: var(--btn-height-xl);
}

.btn--full-width {
  width: 100%;
}

/* Button with icon */
.btn__icon {
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.btn:hover .btn__icon {
  transform: translateX(2px);
}

/* ==========================================================================
   Form Components
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-4);
}

.form-group textarea {
  width: 100%;
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--input-padding-x);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--white);
  border: var(--input-border-width) solid var(--border);
  border-radius: var(--input-border-radius);
  transition: var(--transition-fast);
  min-height: var(--input-height);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Form validation states */
.form-input--error,
.form-textarea--error {
  border-color: var(--error);
}

.form-input--error:focus,
.form-textarea--error:focus {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input--success,
.form-textarea--success {
  border-color: var(--success);
}

.form-input--success:focus,
.form-textarea--success:focus {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-error {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--error);
}

.form-help {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* ==========================================================================
   Card Components
   ========================================================================== */

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-light);
}

.card__body {
  padding: var(--space-6);
}

.card__footer {
  padding: var(--space-6);
  border-top: 1px solid var(--border-light);
  background-color: var(--neutral-50);
}

/* ==========================================================================
   Badge Components
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge--primary {
  background-color: var(--primary-100);
  color: var(--primary-800);
}

.badge--success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.badge--warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge--error {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-index-docked);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background-color: var(--primary-600);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: var(--transition-normal);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.back-to-top:active {
  transform: translateY(0);
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.loading {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--neutral-200);
  border-top: 2px solid var(--primary-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading--large {
  width: 2rem;
  height: 2rem;
  border-width: 3px;
}

/* ==========================================================================
   Skeleton Loading
   ========================================================================== */

.skeleton {
  background: linear-gradient(90deg, var(--neutral-200) 25%, var(--neutral-100) 50%, var(--neutral-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton--text {
  height: 1rem;
  margin-bottom: var(--space-2);
}

.skeleton--title {
  height: 1.5rem;
  margin-bottom: var(--space-3);
}

.skeleton--avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
}

.skeleton--button {
  height: 2.5rem;
  width: 8rem;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Text utilities */
.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

/* Layout utilities */
.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-4-3 {
  aspect-ratio: 4 / 3;
}

/* Border utilities */
.border {
  border: 1px solid var(--border);
}

.border-t {
  border-top: 1px solid var(--border);
}

.border-r {
  border-right: 1px solid var(--border);
}

.border-b {
  border-bottom: 1px solid var(--border);
}

.border-l {
  border-left: 1px solid var(--border);
}

.border-none {
  border: none;
}

/* Border radius utilities */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius-base); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: var(--radius-3xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow utilities */
.shadow-none { box-shadow: none; }
.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-base); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }
.shadow-inner { box-shadow: var(--shadow-inner); }

/* Background utilities */
.bg-white { background-color: var(--white); }
.bg-primary { background-color: var(--primary-600); }
.bg-primary-50 { background-color: var(--primary-50); }
.bg-primary-100 { background-color: var(--primary-100); }
.bg-neutral-50 { background-color: var(--neutral-50); }
.bg-neutral-100 { background-color: var(--neutral-100); }
.bg-neutral-900 { background-color: var(--neutral-900); }

/* Z-index utilities */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Opacity utilities */
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}