/*
 * Mahina Jewelry - Modern Responsive Stylesheet
 * Mobile-first approach with progressive enhancement
 */

/* ---------- CSS RESET & NORMALIZATION ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- CUSTOM PROPERTIES ---------- */
:root {
  /* Colors */
  --primary: #84a7bb;
  --primary-light: #a7c1d1;
  --primary-dark: #6a8a9b;
  --secondary: #755654;
  --secondary-light: #8e6c6a;
  --secondary-dark: #5c4341;
  --text: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --light: #e6f0f7;
  --light-transparent: rgba(230, 240, 247, 0.9);
  --dark-transparent: rgba(51, 51, 51, 0.7);
  
  /* Typography */
  --font-primary: 'Georgia', serif;
  --font-secondary: 'Arial', sans-serif;
  --font-display: 'TANTWINKLE', var(--font-secondary);
  --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --line-height: 1.5;
  
  /* Spacing */
  --spacing-xs: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --spacing-sm: clamp(0.75rem, 0.6rem + 0.75vw, 1.25rem);
  --spacing: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --spacing-md: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  --spacing-lg: clamp(2rem, 1.6rem + 2vw, 3.5rem);
  --spacing-xl: clamp(3rem, 2.4rem + 3vw, 5rem);
  
  /* Layout */
  --container-padding: var(--spacing);
  --max-width: 75rem; /* 1200px */
  --content-width: min(100% - (var(--container-padding) * 2), var(--max-width));
  
  /* UI Elements */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-index layers */
  --z-below: -1;
  --z-normal: 1;
  --z-above: 10;
  --z-top: 100;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --secondary: #5c4341;
    --text: #e6e6e6;
    --text-light: #cccccc;
    --light: #2a3a45;
  }
}

/* ---------- FONT FACE ---------- */
@font-face {
  font-family: 'TANTWINKLE';
  src: url('TANTWINKLE.otf') format('opentype'),
       url('TANTWINKLE.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn { 
  from { opacity: 0; } 
  to { opacity: 1; } 
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.7; transform: translateX(-50%) scale(1.1); }
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes textGradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Removed letterFadeIn animation as it's now handled by anime.js */

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- BASE STYLES ---------- */
html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--text);
  background-color: none;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

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

input, 
button, 
textarea, 
select {
  font: inherit;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: normal;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* Accessibility */
.skip-link {
  position: absolute;
  top: -9999px;
  left: -9999px;
  background: var(--primary);
  color: var(--white);
  padding: var(--spacing-sm);
  z-index: var(--z-top);
}

.skip-link:focus {
  top: 0;
  left: 0;
}

/* ---------- UTILITY CLASSES ---------- */
.container {
  width: var(--content-width);
  margin-inline: auto;
  padding: 0 var(--container-padding);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.125em; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---------- LAYOUT COMPONENTS ---------- */
/* Header / Hero Section */
header.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 45vh;
  overflow: hidden;
  background-color: var(--primary);
}

.hero .content {
  position: relative;
  z-index: var(--z-normal);
  width: 100%;
  padding: var(--spacing);
}

.hero img {
  max-width: min(80%, 21.875rem); /* 350px */
  margin-inline: auto;
  opacity: 0;
  animation: fadeIn 2s ease forwards;
}

.tagline {
  font-family: var(--font-secondary);
  font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  margin-top: var(--spacing-sm);
  color: var(--white);
  opacity: 0;
  animation: fadeIn 2s ease forwards;
  animation-delay: 1s;
}

/* Feature Section */
.feature-section {
  position: relative;
  /* Background for the feature section */
  background-color: var(--secondary-dark);
  color: var(--white);
  padding-bottom: 200px;
}

.fullwidth-image {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.fullwidth-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.overlay-text {
  position: absolute;
  color: var(--white);
  font-family: var(--font-secondary);
  text-transform: uppercase;
}

.overlay-text.main {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  font-size: clamp(0.9rem, 0.5rem + 2.5vw, 2rem);
  text-align: center;
  pointer-events: none;
  text-transform: uppercase;
}

.text-line {
  display: block;
  width: 100%;
  text-align: center;
  position: absolute;
  left: 0;
  padding: 0.25em 0;
}

.first-line {
  top: 5%; /* Positioned higher on mobile */
}

.second-line {
  top: 20%; /* Increased spacing to prevent overlap on mobile */
}

.letter {
  display: inline-block;
  line-height: 1.3em;
  padding: 0.05em 0;
  opacity: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(173, 216, 230, 0.8) 25%,
    rgba(135, 206, 235, 0.9) 50%,
    rgba(173, 216, 230, 0.8) 75%,
    rgba(255, 255, 255, 0.9) 100%
  );
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 0.625rem rgba(255, 255, 255, 0.3);
  animation: textGradientMove 8s ease infinite;
}

/* Feature Content */
.feature-content {
  position: relative;
  width: 100%;
  padding: var(--spacing);
  color: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 18.75rem; /* 300px */
  align-items: center;
}

.bg-text {
  position: relative;
  font-family: 'TANTWINKLE', 'Georgia', serif;
  font-size: clamp(3rem, 2rem + 5vw, 8rem);
  line-height: 1.2;
  color: var(--secondary-light);
  z-index: 1;
  letter-spacing: 0.05em;
  width: 100%;
  overflow: visible;
  text-align: center;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1.5rem;
  order: 1;
}

.copy {
  position: relative;
  z-index: var(--z-normal);
  padding: var(--spacing-sm);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: var(--radius-sm);
  order: 2;
  margin-top: 1rem;
  width: 90%;
  text-align: center;
}

.copy p {
  font-family: var(--font-secondary);
  font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.9rem);
  line-height: 1.5;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 300;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Image Grid */
.image-grid {
  display: flex;
  flex-direction: column;
  gap: var(--spacing);
  width: 100%;
  margin-top: var(--spacing-lg);
  order: 3;
  align-items: center;
}

.image-grid a {
  display: block;
  width: 100%;
  max-width: 300px;
  overflow: hidden;
  transition: transform var(--transition);
}

.image-grid a:hover {
  transform: translateY(-5px);
}

.image-grid img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform var(--transition);
  border-radius: 0; /* Remove any border radius to match the mockup */
}

.image-grid a:hover img {
  transform: scale(1.05);
}

/* Media queries for image grid */
@media (min-width: 48em) {
  .image-grid {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .image-grid a {
    width: calc(33.333% - var(--spacing));
    max-width: 300px;
  }
}

@media (min-width: 62em) {
  .feature-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: var(--spacing-xl);
  }
  
  .bg-text {
    position: absolute;
    top: 0;
    right: 0;
    text-align: right;
    z-index: 0;
    margin-bottom: 0;
    opacity: 0.3; /* Make the background text more subtle */
    color: var(--white);
    width: 100%;
  }
  
  .image-grid {
    order: 1;
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    flex-direction: row;
    justify-content: center;
    z-index: 1;
    width: 100%;
    max-width: 800px;
  }
  
  .copy {
    order: 2;
    margin-top: var(--spacing);
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-align: center;
    z-index: 1;
    width: 100%;
    max-width: 800px;
  }
  
  .image-grid a {
    width: calc(33.333% - var(--spacing));
    max-width: 250px;
  }
  
  /* Adjust the order of images to match the mockup */
  .image-grid a:nth-child(1) {
    order: 3;
  }
  
  .image-grid a:nth-child(2) {
    order: 1;
  }
  
  .image-grid a:nth-child(3) {
    order: 2;
  }
}

/* Parallax Section */
.parallax {
  overflow: hidden;
  position: relative;
}

.parallax-container {
  height: 18.75rem;
  background-image: url('images/row-3.webp');
  background-attachment: scroll;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Footer */
footer {
  background-color: var(--secondary-dark);
  color: var(--white);
  padding: var(--spacing-lg) 0;
  font-family: 'Inter', sans-serif;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: 0;
  width: 100%;
}

.footer-logo {
  text-align: center;
}

.footer-logo img {
  max-width: 180px;
  height: auto;
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing);
}

.contact {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  align-items: center;
  margin-bottom: var(--spacing-sm);
  font-style: normal;
  line-height: 1.6;
  max-width: 30ch;
  text-align: center;
}

footer a {
  color: var(--light);
  font-size: 0.9rem;
  display: block;
  transition: all var(--transition-fast);
  letter-spacing: 0.03em;
  font-weight: 300;
}

.contact a:hover {
  color: var(--white);
  transform: translateY(-1px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
}

.social {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
}

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all var(--transition);
  color: var(--white);
}

.social a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.copyright {
  font-size: 0.75rem;
  opacity: 0.7;
  text-align: center;
  width: 100%;
  margin-inline: auto;
  letter-spacing: 0.03em;
  font-weight: 300;
  border-top: none;
  margin-top: var(--spacing-lg);
  position: relative;
  left: 0;
  right: 0;
}

.copyright p {
  margin: 0;
  width: 100%;
  text-align: center;
  position: relative;
  left: 0;
  right: 0;
}

/* ---------- MEDIA QUERIES ---------- */
/* Small devices (576px and up) */
@media (min-width: 36em) {
  .first-line {
    top: 8%;
  }
  
  .second-line {
    top: 22%;
  }
  
  .overlay-text.main {
    letter-spacing: 0.1em;
  }
  
  .copy {
    max-width: 90%;
  }
}

/* Medium devices (768px and up) */
@media (min-width: 48em) {
  .first-line {
    top: 12%;
  }
  
  .second-line {
    top: 22%;
  }
  
  .overlay-text.main {
    letter-spacing: 0.15em;
  }
  
  .feature-content {
    padding: var(--spacing-md);
    min-height: 25rem;
  }
  
  .copy {
    max-width: 80%;
    padding: var(--spacing);
  }
  
  .parallax-container {
    height: 25rem;
    background-attachment: fixed;
  }
  
  .footer-content {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    width: 100%;
  }
  .footer-logo {
    margin-right: auto;
  }
  .social {
    margin-left: auto;
  }
  .container {
    align-items: center;
  }
  
  .footer-info {
    align-items: center;
    text-align: center;
  }
  
  .contact {
    align-items: center;
  }
}

/* Large devices (992px and up) */
@media (min-width: 62em) {
  .first-line {
    top: 18%;
  }
  
  .second-line {
    top: 26%;
  }
  
  .overlay-text.main {
    letter-spacing: 0.2em;
  }
  
  /* Desktop layout */
  .feature-content {
    flex-direction: row;
    justify-content: space-between;
    padding: var(--spacing-lg);
    align-items: center;
  }
  
  .bg-text {
    order: 2;
    width: 48%;
    margin-bottom: 0;
    text-align: right;
  }
  
  .copy {
    order: 1;
    width: 48%;
    max-width: none;
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    margin-top: 0;
    text-align: left;
  }
  
  .parallax-container {
    height: 31.25rem;
  }
}

/* Extra large devices (1200px and up) */
@media (min-width: 75em) {
  .hero {
    min-height: 50vh;
  }
  
  .hero img {
    max-width: 21.875rem; /* 350px */
  }
  
  .feature-content {
    padding: var(--spacing-xl);
  }
  
  .copy {
    max-width: 60%;
  }
}

