/* Redesign styles */
:root {
    --gold-1: #ffd56b;
    --gold-2: #f1c40f;
    --gold-3: #a07000;
    --gold-4: #d4af37;
    --ink-1: #0b0f17;
    --ink-2: #0a0e1a;
    --ink-3: #080a0f;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f0f0f0;
    --text-sub: #a0a0a0;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 4rem 2rem;
    background:
        radial-gradient(1200px 600px at 120% -10%, rgba(255, 213, 107, 0.08), transparent 60%),
        radial-gradient(800px 500px at -20% 120%, rgba(241, 196, 15, 0.05), transparent 60%),
        linear-gradient(135deg, var(--ink-1) 0%, var(--ink-2) 45%, var(--ink-3) 100%);
    color: var(--text-main);
    position: relative;
    overflow-x: hidden;
}

/* Loader overlay */
.loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(60% 60% at 50% 40%, rgba(255, 215, 107, 0.06), rgba(0,0,0,0) 70%),
        #05060a;
    z-index: 9999;
    transition: opacity .6s ease, visibility 0s linear .6s;
}
.loader.hide { opacity: 0; visibility: hidden; }

.coin-wrap { filter: drop-shadow(0 20px 30px rgba(0,0,0,.6)) drop-shadow(0 0 70px rgba(255,213,107,.18)); }

.coin { width: 180px; height: 180px; animation: coinSpin 2.8s cubic-bezier(.4,.1,.2,1) infinite; transform-origin: 50% 50%; }

@keyframes coinSpin {
    0%   { transform: rotateZ(0deg) rotateY(0deg); }
    50%  { transform: rotateZ(180deg) rotateY(180deg); }
    100% { transform: rotateZ(360deg) rotateY(360deg); }
}

/* Respect user prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
    .coin { animation: none; }
    .page { transition: none; }
    .loader { transition: none; }
}

.parent {
    margin-bottom: 5rem;
    text-align: center;
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.parent img {
    max-height: 180px;
    width: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
    margin-bottom: 1.5rem;
}

.parent h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold-1);
    margin: 0;
    background: linear-gradient(to bottom, var(--gold-1), var(--gold-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subsidiaries {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

.subBox {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    position: relative;
    height: 350px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.subBox::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.5s;
}

.subBox:hover::before {
    left: 100%;
}

.subBox:hover {
    transform: translateY(-12px);
    border-color: var(--gold-1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 213, 107, 0.1);
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    z-index: 1;
}

.subBox img {
    max-width: 140px;
    max-height: 140px;
    object-fit: contain;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.subBox:hover img {
    transform: scale(1.1) translateY(-10px);
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.4));
}

.description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.95), rgba(10, 14, 26, 0.8));
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border-top: 1px solid var(--glass-border);
}

.subBox:hover .description {
    transform: translateY(0);
}

.description h3 {
    margin: 0 0 0.75rem 0;
    color: var(--gold-1);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.description p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-sub);
    font-weight: 300;
}

/* Page Reveal Animation */
.page { 
    opacity: 0; 
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease; 
}
.page.show { 
    opacity: 1; 
    transform: translateY(0);
}

/* Header Sheen Animation */
body::before {
    content: "";
    position: fixed;
    inset: -10%;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 213, 107, 0.03) 50%, transparent 70%);
    pointer-events: none;
    animation: sweep 15s linear infinite;
    z-index: 0;
}

@keyframes sweep {
    0% { transform: translateX(-20%) translateY(-10%); }
    50% { transform: translateX(20%) translateY(10%); }
    100% { transform: translateX(-20%) translateY(-10%); }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    body { padding: 3rem 1.5rem; }
    .parent h1 { font-size: 1.8rem; letter-spacing: 2px; }
    .subsidiaries { grid-template-columns: 1fr; gap: 2rem; }
    .subBox { height: 320px; }
    .subBox img { max-width: 120px; }
    .description { transform: translateY(0); background: rgba(10, 14, 26, 0.7); position: relative; border-top: none; padding: 1.5rem; }
    .content { justify-content: flex-start; padding-top: 3rem; }
    .subBox:hover { transform: none; }
}
