/* CSS Reset to override ua.css */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    font-weight: normal;
}

p, div, span, a, button, img {
    margin: 0;
    padding: 0;
}

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

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

ul, ol, li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Form element resets */
input, textarea, select, fieldset {
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

input[type="text"], input[type="email"], input[type="password"], 
input[type="number"], input[type="tel"], input[type="url"], 
textarea, select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

input[type="checkbox"], input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: auto;
    height: auto;
}

input[type="submit"], input[type="button"], input[type="reset"] {
    cursor: pointer;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

legend {
    padding: 0;
    margin: 0;
}

body {
    background: linear-gradient(180deg, #bd9a73 0%, #bd9a73 55%, #ECE7D9 100%); /* Tan gradient */
    min-height: 100vh;
    font-kerning: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-family: 'Alan Sans', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.min-h-screen {
    min-height: 60vh;
}
.font-coolvetica {
    font-family: 'Righteous', cursive, sans-serif;
}
.main-bg {
    background-color: #bd9a73; /* A deep olive green */
}
.text-main {
    color: #4A4A3A;
}
.btn-orange {
    background-color: #C87D59; /* Burnt orange */
    color: bd9a73;
}
.btn-beige {
    background-color: #bd9a73; /* Light beige */
}
 .btn-active {
    background-color: #4A4A3A;
    color: #ECE7D9;
}

/* Modern button interactions */
.btn-orange,
.btn-beige,
.btn-active {
    transition: transform 200ms ease, box-shadow 250ms ease, background-color 200ms ease, color 200ms ease, opacity 200ms ease;
    will-change: transform;
}
.btn-orange:hover,
.btn-beige:hover,
.btn-active:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}
.btn-orange:active,
.btn-beige:active,
.btn-active:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}
.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}
.hero-bg-shapes::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -150px;
    width: 400px;
    height: 400px;
    background-color: #C87D59;
    opacity: 0.3;
    border-radius: 50%;
    filter: blur(50px);
}
 .hero-bg-shapes::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 350px;
    height: 350px;
    background-color: #DAB98F;
     opacity: 0.2;
    border-radius: 50%;
    filter: blur(50px);
}
.circuit-board {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://www.transparenttextures.com/patterns/circuit-board.png');
    opacity: 0.05;
    z-index: -1;
}

/* Thumbnail polish */
.thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 300ms ease;
}
.tile:hover .thumb { transform: scale(1.06); }

.thumb-gradient {
    background: linear-gradient(135deg, rgba(200,125,89,0.18), rgba(88,89,69,0.18));
}

/* Hero background image behind SVG window */
.hero-bg-image {
    background-image: url('assets/lwlbg_1.png');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    transition: opacity 0.8s ease;
}

/* Preview iframe container */
#preview-iframe-container {
    background: transparent;
    position: relative;
    overflow: hidden;
}

#preview-iframe-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border-radius: 16px;
    z-index: 1;
    pointer-events: none;
}

#preview-iframe-container iframe {
    background: url(assets/lwlbg_2.webp) center/cover no-repeat;
    border-radius: 16px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

/* Preview loading state */
#preview-iframe-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #C87D59;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 3;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Preview overlay with website info */
.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 0 0 16px 16px;
    z-index: 4;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

#preview-iframe-container:hover .preview-overlay {
    transform: translateY(0);
}

.preview-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Righteous', cursive;
}

.preview-description {
    font-size: 0.875rem;
    opacity: 0.9;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-family: 'Almarai', sans-serif;
}

/* Enhanced preview container animations */
#preview-iframe-container {
    transform: scale(0.95);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#preview-iframe-container:not(.loading) {
    transform: scale(1);
}

/* Improved iframe scaling and positioning */
#preview-iframe-container iframe {
    transform: scale(0.5) translateZ(0);
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Performance optimizations */
#preview-iframe-container,
#preview-iframe-container iframe,
.preview-overlay {
    will-change: transform, opacity;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Smooth hover effects for preview container */
#preview-iframe-container:hover {
    transform: scale(1.02);
}

#preview-iframe-container:hover iframe {
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 12px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Tile click feedback animation */
.tile-clicked .tile {
    transform: scale(0.95);
    transition: transform 0.15s ease-out;
}

.tile-clicked .card-container {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transition: box-shadow 0.3s ease;
}

/* Prevent inline SVG baseline gaps and fix 1px seam at top */
.hero-svg { display: block; }
.hero-top-fix { top: -15px; transform: translateY(-18%); }

/* Smaller contained logo variant for specific tiles */
.thumb--contain-sm {
    object-fit: contain;
    padding: 18px;
}

/* Organic hero gradient animation */
.hero-ambient {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(1200px 600px at 80% 10%, rgba(200,125,89,0.25), transparent 60%),
                radial-gradient(900px 500px at 5% 85%, rgba(218,185,143,0.22), transparent 60%),
                linear-gradient(180deg, rgba(88,89,69,0.25) 0%, rgba(88,89,69,0) 50%);
    animation: ambientShift 12s ease-in-out infinite alternate;
    pointer-events: none;
}

/* Clip helper to keep overlays inside the SVG window */
.clip-hero { clip-path: url(#heroClip); -webkit-clip-path: url(#heroClip); }

/* Parallax overlay in front of hero image */
.parallax-overlay { position: relative; width: 100%; height: 100%; pointer-events: none; }
.parallax-overlay .slider-box {
    float: right;
    margin: 10px 20px;
    position: relative;
    z-index: 1000;
    pointer-events: auto; /* enable slider interaction */
}
.parallax-overlay #range { margin-top: 5px; color: #eee; font-size: 10pt; margin-left: 10px; position: relative; }
.parallax-overlay #specks { position: absolute; z-index: 999; height: 100%; width: 100%; }
.parallax-overlay .speck {
    opacity: 0;
    height: 4px;
    width: 4px;
    background: url('https://i1272.photobucket.com/albums/y391/matthew_williams10/speck_zpsu9xym9zl.png');
    background-size: cover;
    position: absolute;
    border-radius: 10px;
    z-index: 99;
}
.parallax-overlay .img {
    position: absolute;
    height: 100000px;
    width: 100000px;
    top: -8500px;
    left: -8000px;
    animation-timing-function: cubic-bezier(0.250, 0.250, 0.750, 0.750);
    animation-name: float;
    animation-iteration-count: infinite;
}
.parallax-overlay #img-1 { opacity: .12; background: url('https://image.ibb.co/jcTvpv/dust1.jpg'); background-repeat: repeat; animation-duration: 600s; }
.parallax-overlay #img-2 { opacity: .1;  background: url('https://image.ibb.co/goU1Uv/dust2.jpg'); background-repeat: repeat; animation-duration: 450s; }
.parallax-overlay #img-3 { opacity: .08; background: url('https://image.ibb.co/cymRwa/dust3.jpg'); background-repeat: repeat; animation-duration: 350s; }

@keyframes twinkle {
  0% { transform: translate(0px, 0px); }
  30% { opacity: 0; }
  50% { opacity: .75; }
  70% { opacity: 0; }
  100% { transform: translate(175px, 100px); }
}
@keyframes float {
  0% { transform: translate(0px, 0px); }
  100% { transform: translate(8000px, 4000px); }
}

@keyframes ambientShift {
    0%   { filter: hue-rotate(0deg) saturate(100%); transform: translate3d(0,0,0) scale(1); }
    50%  { filter: hue-rotate(-6deg) saturate(110%); transform: translate3d(0,-6px,0) scale(1.02); }
    100% { filter: hue-rotate(6deg) saturate(110%); transform: translate3d(0,6px,0) scale(1.01); }
}

/* Subtle film grain overlay */
.grain {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .08;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grainShift 1.5s steps(4) infinite;
}

@keyframes grainShift {
    0% { transform: translate(0,0); }
    25% { transform: translate(-1%, 1%); }
    50% { transform: translate(1%, -1%); }
    75% { transform: translate(1%, 1%); }
    100% { transform: translate(0,0); }
}

/* Fade/slide entrances */
.fade-up {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 700ms ease forwards;
}
.fade-up-delay {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 800ms ease 120ms forwards;
}
.fade-up-slower {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 900ms ease 220ms forwards;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Cards and tiles polish */
.tile {
    transition: transform 250ms cubic-bezier(.2,.8,.2,1), box-shadow 250ms ease, background-color 200ms ease, opacity 200ms ease;
    will-change: transform;
}
.tile:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.tile:active { transform: translateY(-2px) scale(1.005); box-shadow: 0 12px 28px rgba(0,0,0,.16); }


@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: .8; }
    50% { transform: scale(1.25); opacity: 1; }
}

/* Accent underline on headings - removed */

/* Layout and Structure */
.page-container {
    position: relative;
    min-height: 60vh;
}

.hero-section {
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 75vh;
    overflow: hidden;
    transform: translateY(-18%);
}

@media (min-width: 768px) {
    .hero-section {
        height: 70vh;
    }
}

@media (min-width: 1024px) {
    .hero-section {
        height: 80vh;
    }
}

@media (min-width: 1280px) {
    .hero-section {
        height: 75vh;
    }
}

.hero-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.main-container {
    position: relative;
    z-index: 10;
    padding: 0 1rem;
    max-width: 80rem;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .main-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .main-container {
        padding: 0 2rem;
    }
}

.main-content {
    padding-bottom: 4rem;
}

/* Typography */
.hero-title {
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.hero-logo-container {
    display: inline-flex;
    align-items: center;
    color: white;
}

.hero-logo {
    height: 5rem;
    width: 5rem;
    margin-right: 0.75rem;
}

.hero-heading {
    font-size: 4.5rem;
    font-weight: bold;
    font-family: 'Righteous', cursive, sans-serif;
    color: white;
    transition: all 0.3s ease;
    letter-spacing: -0.153em;
}

.hero-heading span {
    display: inline-block;
    transition: text-shadow 0.3s ease, color 0.3s ease;
}

/* Hover effect to make text disappear into background when tiles are hovered */
.tiles-hovered .hero-heading span {
    text-shadow: 0 25px 50px rgba(0, 0, 0, 0.75);
    color: transparent;
}

/* Staggered animation delays for each letter - forward on hover */
.tiles-hovered .hero-heading span:nth-child(1) { transition-delay: 0s; }
.tiles-hovered .hero-heading span:nth-child(2) { transition-delay: 0.05s; }
.tiles-hovered .hero-heading span:nth-child(3) { transition-delay: 0.1s; }
.tiles-hovered .hero-heading span:nth-child(4) { transition-delay: 0.15s; }
.tiles-hovered .hero-heading span:nth-child(5) { transition-delay: 0.2s; }
.tiles-hovered .hero-heading span:nth-child(6) { transition-delay: 0.25s; }
.tiles-hovered .hero-heading span:nth-child(7) { transition-delay: 0.3s; }
.tiles-hovered .hero-heading span:nth-child(8) { transition-delay: 0.35s; }
.tiles-hovered .hero-heading span:nth-child(9) { transition-delay: 0.4s; }
.tiles-hovered .hero-heading span:nth-child(10) { transition-delay: 0.45s; }
.tiles-hovered .hero-heading span:nth-child(11) { transition-delay: 0.5s; }
.tiles-hovered .hero-heading span:nth-child(12) { transition-delay: 0.55s; }
.tiles-hovered .hero-heading span:nth-child(13) { transition-delay: 0.6s; }
.tiles-hovered .hero-heading span:nth-child(14) { transition-delay: 0.65s; }

/* Staggered animation delays for each letter - reversed on return */
.hero-heading span:nth-child(1) { transition-delay: 0.65s; }
.hero-heading span:nth-child(2) { transition-delay: 0.6s; }
.hero-heading span:nth-child(3) { transition-delay: 0.55s; }
.hero-heading span:nth-child(4) { transition-delay: 0.5s; }
.hero-heading span:nth-child(5) { transition-delay: 0.45s; }
.hero-heading span:nth-child(6) { transition-delay: 0.4s; }
.hero-heading span:nth-child(7) { transition-delay: 0.35s; }
.hero-heading span:nth-child(8) { transition-delay: 0.3s; }
.hero-heading span:nth-child(9) { transition-delay: 0.25s; }
.hero-heading span:nth-child(10) { transition-delay: 0.2s; }
.hero-heading span:nth-child(11) { transition-delay: 0.15s; }
.hero-heading span:nth-child(12) { transition-delay: 0.1s; }
.hero-heading span:nth-child(13) { transition-delay: 0.05s; }
.hero-heading span:nth-child(14) { transition-delay: 0s; }

.hero-subtitle {
    margin-top: 0.5rem;
    font-size: 1.125rem;
    color: #d1d5db;
    letter-spacing: 0.025em;
}



.dot {
    height: 0.5rem;
    width: 0.5rem;
    background-color: #9ca3af;
    border-radius: 9999px;
    animation: breathe 2200ms ease-in-out infinite;
}

.dot:nth-child(2) {
    animation-delay: 150ms;
}

.dot:nth-child(3) {
    animation-delay: 300ms;
    background-color: #d1d5db;
}

.dot:nth-child(4) {
    animation-delay: 450ms;
}

/* Main Content Section */
.main-content-section {
    padding: 4rem 0;
}

.content-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .content-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .content-container {
        padding: 0 2rem;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: #4b5563;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-top: 1px solid #e5e7eb;
}

.footer-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #374151;
}

@media (min-width: 640px) {
    .footer-container {
        padding: 0.5rem 1.5rem;
    }
}

@media (min-width: 1024px) {
    .footer-container {
        padding: 0.5rem 2rem;
    }
}

.footer-copyright {
    opacity: 0.7;
}

/* Body and Base Styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1f2937;
}

/* Detail Panel Styles */
.detail-title {
    font-size: 1.125rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.detail-description {
    margin-bottom: 0.5rem;
}

.detail-link {
    color: #2563eb;
    text-decoration: underline;
}

.hidden {
    display: none;
}

/* Product Cards */
.card-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    padding: 4rem 1rem;
    flex-wrap: wrap;
}

.card-container {
    position: relative;
    width: 9rem;
    height: 9rem;
    cursor: pointer;
}

.card-shadow,
.card-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, filter 0.1s ease-out, opacity 0.1s ease-out;
}

.card-shadow {
    background: #d5c6af;
    opacity: 1;
    z-index: 1;
    transform-origin: bottom center;
    transform: translateY(0px) scaleY(0.3) skewX(var(--shadow-skew, -15deg));
    filter: blur(25px);
    mask: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
    -webkit-mask: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
}

.card-front {
    background: #fff;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.card-container:hover .card-front {
    transform: translateY(-30px) scale(1.2);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.card-container:hover .card-shadow {
    transform: translateY(var(--shadow-hover-y, -18px)) translateX(var(--shadow-hover-x, 40px)) scaleY(0.4) skewX(var(--shadow-skew, -15deg));
    opacity: 0.25;
    filter: blur(12px);
}

/* Card Content Styles */
.tile-icon {
    height: 2.5rem;
    width: 2.5rem;
    margin-bottom: 0.75rem;
    object-fit: contain;
}

.tile-icon-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.tile-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Card Background Color Overrides */
.tile-lws .card-front { background-color: #f97316; color: white; }
.tile-mfcss .card-front { background-color: #81836E; color: white; }
.tile-friskcinema .card-front { background-color: #f3f4f6; color: #1f2937; }
.tile-nora .card-front { background-color: white; color: #1f2937; }
.tile-friskymotion .card-front { background-color: white; color: #1f2937; }
