/* ================================================
   Aaray PACKAGING — GLOBAL STYLES
   style.css — CSS custom properties, reset, typography
   ================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  /* Colors */
  --color-navy: #0f1239;
  --color-navy-85: rgba(15, 18, 57, 0.85);
  --color-navy-07: rgba(15, 18, 57, 0.07);
  --color-navy-light: #1a1f5e;
  --color-white: #ffffff;
  --color-off-white: #f8f9ff;
  --color-gold: #c9a84c;
  --color-gold-light: #e0c270;
  --color-muted: #5a5f8a;
  --color-muted-dark: rgba(255, 255, 255, 0.7);

  /* Glass */
  --glass-light-bg: rgba(255, 255, 255, 0.45);
  --glass-light-border: rgba(255, 255, 255, 0.8);
  --glass-dark-bg: rgba(255, 255, 255, 0.08);
  --glass-dark-border: rgba(255, 255, 255, 0.15);
  --blur: blur(24px);

  /* Gradients */
  --gradient-navy: linear-gradient(135deg, #0f1239 0%, #1a1f5e 100%);
  --gradient-gold: linear-gradient(135deg, #c9a84c 0%, #e0c270 100%);
  --gradient-hero: linear-gradient(
    135deg,
    #f0f2ff 0%,
    #e8ecff 40%,
    #f5f0ff 100%
  );
  --gradient-section-a: linear-gradient(
    135deg,
    #e8ecff 0%,
    #f0e8ff 50%,
    #ffe8f5 100%
  );
  --gradient-section-b: linear-gradient(
    160deg,
    #0f1239 0%,
    #1a1060 50%,
    #0d1a3a 100%
  );
  --gradient-section-c: linear-gradient(
    135deg,
    #f5f0ff 0%,
    #e8f0ff 50%,
    #f0fff8 100%
  );
  --gradient-mesh:
    radial-gradient(at 20% 30%, rgba(201, 168, 76, 0.12) 0%, transparent 55%),
    radial-gradient(at 80% 70%, rgba(15, 18, 57, 0.08) 0%, transparent 55%),
    radial-gradient(at 50% 50%, rgba(138, 43, 226, 0.04) 0%, transparent 60%);

  /* Typography — full sans-serif stack */
  --font-heading: "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Spacing */
  --section-padding: clamp(60px, 8vw, 120px);
  --container-max: 1280px;
  --container-pad: clamp(16px, 4vw, 48px);

  /* Border radius */
  --radius-card: 20px;
  --radius-btn: 12px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(15, 18, 57, 0.08);
  --shadow-card-hover: 0 16px 48px rgba(15, 18, 57, 0.18);
  --shadow-gold: 0 4px 24px rgba(201, 168, 76, 0.25);

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Modern CSS Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-navy);
  background-color: var(--color-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-navy);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h4 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.005em;
}

p {
  color: var(--color-muted);
  max-width: 65ch;
}

/* Dark section overrides */
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--color-white);
}

.section-dark p {
  color: var(--color-muted-dark);
}

/* ---- Section Labels ---- */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 12px;
}

/* ---- Skip to content ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 12px 24px;
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: 600;
  border-radius: var(--radius-btn);
  z-index: 9999;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 16px;
}

/* ---- Focus Styles ---- */
:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Selection ---- */
::selection {
  background: rgba(201, 168, 76, 0.25);
  color: var(--color-navy);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-off-white);
}

::-webkit-scrollbar-thumb {
  background: var(--color-navy);
  border-radius: 3px;
}

/* ---- carousel ---- */
.p-carousel {
  margin-top: -50px;
  height: 800px;
  overflow: hidden;
  position: relative;
}

.p-carousel .list {
  position: absolute;
  top: 0;
  width: 100%;
  max-width: 100%;
  left: 50%;
  transform: translateX(-50%);
  height: 80%;
}

.p-carousel .list .item {
  position: absolute;
  top: 0;
  left: 0;
  width: 70%;
  height: 100%;
  font-size: 15px;
}

.p-carousel .list .item img {
  width: 50%;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.p-carousel .list .item .detail {
  opacity: 0;
  pointer-events: none;
}

.p-carousel .list .item .intro {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  opacity: 0;
  pointer-events: none;
}

.p-carousel .list .item:nth-child(2) .intro {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.5s;
}

.p-carousel .list .item:nth-child(n + 6) {
  opacity: 0;
  pointer-events: none;
}

.p-carousel .list .item:nth-child(2) {
  transform: translate(0, 0);
  filter: blur(0);
  z-index: 10;
  opacity: 1;
}

.p-carousel .list .item:nth-child(1) {
  transform: translate(-100%, -5%) scale(1.5);
  filter: blur(20px);
  z-index: 11;
  opacity: 0;
  pointer-events: none;
}

.p-carousel .list .item:nth-child(3) {
  transform: translate(50%, 10%) scale(0.8);
  filter: blur(10px);
  z-index: 9;
  opacity: 1;
}

.p-carousel .list .item:nth-child(4) {
  transform: translate(90%, 20%) scale(0.5);
  filter: blur(30px);
  z-index: 9;
  opacity: 1;
}

.arrows {
  position: absolute;
  bottom: 70px;
  width: 1140px;
  max-width: 90%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.arrows #next,
.arrows #prev {
  padding: 10px 14px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.75);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow:
    0 2px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}

.arrows #back {
  padding: 10px 28px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.75);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow:
    0 2px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}

.arrows #back:hover {
  background: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: scale(1.03);
}

.arrows #back:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.12);
}

.p-carousel .list .item .intro .title {
  font-size: 2em;
  line-height: 0.8em;
}

.p-carousel .list .item .intro .topic {
  font-size: 4em;
  font-weight: 500;
}

.p-carousel .list .item .intro .des {
  font-size: small;
}

.p-carousel .list .item .intro .seeMore {
  background-color: transparent;
  border: none;
  border-bottom: 1px solid #555;
  font-family: Poppins;
  font-weight: 400;
  margin-top: 1.2em;
}

.p-carousel .list .item:nth-child(2) .intro .title,
.p-carousel .list .item:nth-child(2) .intro .topic,
.p-carousel .list .item:nth-child(2) .intro .des,
.p-carousel .list .item:nth-child(2) .intro .seeMore {
  opacity: 0;
  animation: showContent 0.5s 0.7s ease-in-out 1 forwards;
}

@keyframes showContent {
  from {
    transform: translateY(50px);
    filter: blur(30px);
  }

  to {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}

.p-carousel .list .item:nth-child(2) .intro .topic {
  animation-delay: 0.9s;
}

.p-carousel .list .item:nth-child(2) .intro .desc {
  animation-delay: 1.1s;
}

.p-carousel .list .item:nth-child(2) .intro .topic {
  animation-delay: 0.9s;
}

.p-carousel.next .list .item:nth-child(1) {
  animation: positionItem2 0.5s ease-in-out 1 forwards;
}

@keyframes positionItem2 {
  from {
    transform: translate(0, 0);
    filter: blur(0);
    z-index: 10;
    opacity: 1;
  }
}

.p-carousel.next .list .item:nth-child(2) {
  animation: positionItem3 0.7s ease-in-out 1 forwards;
}

@keyframes positionItem3 {
  from {
    transform: translate(50%, 10%) scale(0.8);
    filter: blur(10px);
    z-index: 9;
    opacity: 1;
  }
}

.p-carousel.next .list .item:nth-child(3) {
  animation: positionItem4 0.7s ease-in-out 1 forwards;
}

@keyframes positionItem4 {
  from {
    transform: translate(90%, 20%) scale(0.5);
    filter: blur(30px);
    z-index: 9;
    opacity: 1;
  }
}

.p-carousel.prev .list .item:nth-child(2) {
  animation: positionItem1 0.5s ease-in-out 1 forwards;
}

@keyframes positionItem1 {
  from {
    transform: translate(-100%, -5%) scale(1.5);
    filter: blur(20px);
    z-index: 11;
    opacity: 0;
  }
}

.p-carousel.prev .list .item:nth-child(3) {
  animation: positionItem2 0.5s ease-in-out 1 forwards;
}
.p-carousel.prev .list .item:nth-child(4) {
  animation: positionItem3 0.5s ease-in-out 1 forwards;
}

.p-carousel .list .item {
  transition:
    left 0.5s,
    opacity 0.5s,
    width 0.5s;
}

.p-carousel.showDetail .list .item:nth-child(3),
.p-carousel.showDetail .list .item:nth-child(4) {
  left: 100%;
  opacity: 0;
  pointer-events: none;
}

.p-carousel.showDetail .list .item:nth-child(2) {
  width: 100%;
}
.p-carousel.showDetail .list .item:nth-child(2) .intro {
  opacity: 0;
  pointer-events: none;
}
.p-carousel .list .item:nth-child(2) img {
  transition: right 0.5s;
}
.p-carousel.showDetail .list .item:nth-child(2) img {
  right: 50%;
}
.p-carousel.showDetail .list .item:nth-child(2) .detail {
  opacity: 1;
  pointer-events: auto;
  width: 50%;
  position: absolute;
  right: 0;
  text-align: left;
  top: 50%;
  transform: translateY(-50%);
}
.p-carousel.showDetail .list .item:nth-child(2) .detail .title {
  font-size: 4em;
}
.p-carousel.showDetail .list .item:nth-child(2) .detail .des {
  font-size: 1.1em;
  margin: 1em 0;
}
.p-carousel.showDetail .list .item:nth-child(2) .detail .material,
.p-carousel.showDetail .list .item:nth-child(2) .detail .sizes,
.p-carousel.showDetail .list .item:nth-child(2) .detail .safety,
.p-carousel.showDetail .list .item:nth-child(2) .detail .moq,
.p-carousel.showDetail .list .item:nth-child(2) .detail .printing,
.p-carousel.showDetail .list .item:nth-child(2) .detail .delivery {
  font-size: 1.2em;
  font-weight: 300;
}
