* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    background: #050609;
    color: #F5E9DB;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.main-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 16px 64px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.floating-layer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.header-bar {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(5,6,9,0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(212,175,55,0.25);
    box-shadow: 0 18px 45px rgba(0,0,0,0.65);
    gap: 24px;
}

.header-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo-img {
    max-height: 64px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.7);
    background: radial-gradient(circle at 20% 0%, rgba(212,175,55,0.45) 0%, transparent 55%);
}

.header-title-text {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 28px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #F5E9DB;
    text-shadow: 0 0 24px rgba(0,0,0,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px;
}

.header-nav-link {
    position: relative;
    padding: 8px 0;
    color: #F5E9DB;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    outline: none;
    border: none;
    background: transparent;
}

.header-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #D4AF37, #DBB885);
    transition: width 0.25s ease;
}

.header-nav-link:hover {
    color: #D4AF37;
    transform: translateY(-1px);
}

.header-nav-link:hover::after,
.header-nav-link:focus-visible::after {
    width: 100%;
}

.header-nav-link:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 4px;
}

.hero-section {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    padding: 48px 16px 32px;
    min-height: 480px;
    background: radial-gradient(circle at 10% 0%, rgba(212,175,55,0.15) 0%, transparent 55%),
                radial-gradient(circle at 90% 100%, rgba(14,128,104,0.18) 0%, transparent 60%);
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1;
}

.hero-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 40px;
    line-height: 1.15;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #F5E9DB;
    text-shadow: 0 0 32px rgba(0,0,0,0.9);
    margin: 0;
}

.hero-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: #F5E9DB;
    max-width: 520px;
    opacity: 0.9;
    margin: 0;
}

.hero-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    align-items: center;
}

.hero-meta-item {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(212,175,55,0.55);
    background: rgba(10,11,13,0.85);
    backdrop-filter: blur(10px);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #DFCB9B;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.hero-physics-wrapper {
    position: relative;
    min-height: 320px;
    border-radius: 24px;
    background: radial-gradient(circle at 30% 0%, rgba(212,175,55,0.18) 0%, transparent 55%),
                radial-gradient(circle at 70% 100%, rgba(90,58,33,0.85) 0%, rgba(5,6,9,1) 60%);
    box-shadow: 0 30px 80px rgba(0,0,0,0.9);
    overflow: hidden;
    border: 1px solid rgba(212,175,55,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-physics-canvas {
    width: 100%;
    height: 100%;
    min-height: 320px;
    display: block;
    touch-action: none;
    cursor: grab;
}

.hero-gear-bg {
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 260px;
    height: auto;
    opacity: 0.7;
    pointer-events: none;
}

.physics-draggable {
    position: absolute;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5,6,9,0.9);
    border: 1px solid rgba(212,175,55,0.7);
    box-shadow: 0 16px 40px rgba(0,0,0,0.85);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: grab;
    padding: 0;
}

.physics-draggable:hover {
    transform: translate3d(0, -4px, 0) scale(1.03);
    box-shadow: 0 24px 60px rgba(0,0,0,0.95);
}

.physics-draggable:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.physics-draggable-img {
    width: 60px;
    height: auto;
    pointer-events: none;
}

.clock-hand {
    background: radial-gradient(circle at 50% 0%, rgba(212,175,55,0.4) 0%, rgba(5,6,9,0.95) 55%);
}

.clock-hand-shape {
    display: block;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #D4AF37, #9C7851);
    position: relative;
}

.clock-hand-short {
    height: 40px;
}

.clock-hand-long {
    height: 56px;
}

.clock-hand-shape::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #D4AF37;
}

.btn-primary {
    padding: 14px 32px;
    min-height: 48px;
    border-radius: 999px;
    background: radial-gradient(circle at 20% 0%, #F5E9DB 0%, #D4AF37 40%, #9C7851 100%);
    color: #140C18;
    border: 1px solid rgba(5,6,9,0.9);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 18px 45px rgba(0,0,0,0.9);
    transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.25s ease, filter 0.25s ease, background-position 0.4s ease;
    background-size: 160% 160%;
    background-position: 0% 50%;
    text-decoration: none;
    outline: none;
    animation: bookRepairGlow 2.4s ease-in-out infinite alternate;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 26px 70px rgba(0,0,0,0.95);
    background-position: 100% 50%;
    filter: brightness(1.05);
}

.btn-primary:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 14px 32px rgba(0,0,0,0.9);
}

.btn-primary:focus-visible {
    outline: 2px solid #F5E9DB;
    outline-offset: 4px;
}

.btn-primary[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-ghost {
    padding: 12px 24px;
    min-height: 44px;
    border-radius: 999px;
    background: transparent;
    color: #F5E9DB;
    border: 1px solid rgba(245,233,219,0.35);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0,0,0,0.75);
    transition: all 0.2s ease;
    text-decoration: none;
    outline: none;
}

.btn-ghost:hover {
    background: rgba(245,233,219,0.06);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.9);
}

.btn-ghost:active {
    transform: translateY(0);
    box-shadow: 0 10px 24px rgba(0,0,0,0.8);
}

.btn-ghost:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 4px;
}

.btn-ghost[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.section-wrapper {
    padding: 24px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.section-eyebrow {
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #DFCB9B;
    opacity: 0.8;
}

.section-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 24px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #F5E9DB;
    margin: 0;
}

.section-description {
    font-size: 14px;
    line-height: 1.7;
    color: #F5E9DB;
    opacity: 0.85;
    max-width: 560px;
    margin: 0;
}

.services-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.services-gear-watermark {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.services-gear-img {
    width: 420px;
    height: auto;
    opacity: 0.18;
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 24px 22px;
    background: radial-gradient(circle at 0% 0%, rgba(212,175,55,0.12) 0%, rgba(5,6,9,0.98) 55%, rgba(5,6,9,1) 100%);
    border-radius: 20px;
    border: 1px solid rgba(212,175,55,0.3);
    box-shadow: 0 18px 45px rgba(0,0,0,0.9);
    overflow: hidden;
    cursor: default;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    z-index: 0;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 70px rgba(0,0,0,0.95);
    border-color: rgba(245,233,219,0.7);
}

.service-card:focus-within {
    border-color: #F5E9DB;
    box-shadow: 0 0 0 1px rgba(245,233,219,0.7), 0 26px 70px rgba(0,0,0,0.95);
}

.service-card-aura {
    content: '';
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 10% 0%, rgba(212,175,55,0.18) 0%, transparent 55%);
    opacity: 0.0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.service-card:hover .service-card-aura,
.service-card:focus-within .service-card-aura {
    opacity: 1;
}

.service-card-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 18px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #F5E9DB;
    margin: 0 0 8px;
}

.service-card-subtitle {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #DFCB9B;
    opacity: 0.85;
    margin: 0 0 12px;
}

.service-card-body {
    font-size: 14px;
    line-height: 1.7;
    color: #F5E9DB;
    opacity: 0.9;
    margin: 0;
}

.service-card-footer {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: #DFCB9B;
    opacity: 0.9;
}

.service-card-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-card-icon-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #D4AF37;
    box-shadow: 0 0 18px rgba(212,175,55,0.9);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.gallery-item {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    background: #050609;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(96,79,62,0.8);
    box-shadow: 0 16px 40px rgba(0,0,0,0.9);
    cursor: zoom-in;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    padding: 0;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.95);
    border-color: rgba(212,175,55,0.7);
}

.gallery-item:focus-visible {
    border-color: #D4AF37;
    box-shadow: 0 0 0 1px rgba(212,175,55,0.7), 0 24px 60px rgba(0,0,0,0.95);
}

.gallery-image {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.4s ease;
    will-change: transform;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.06);
}

.gallery-magnifier-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.gallery-magnifier-lens {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid rgba(245,233,219,0.9);
    box-shadow: 0 16px 40px rgba(0,0,0,0.9);
    background-repeat: no-repeat;
    background-size: 200% 200%;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.15s ease, transform 0.15s ease;
    backdrop-filter: blur(0px);
    z-index: 2;
}

.gallery-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.gallery-modal-backdrop:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
}

.gallery-modal {
    position: relative;
    max-width: 960px;
    width: 90%;
    max-height: 80vh;
    border-radius: 20px;
    overflow: hidden;
    background: #050609;
    border: 1px solid rgba(212,175,55,0.5);
    box-shadow: 0 32px 90px rgba(0,0,0,0.95);
    display: flex;
    flex-direction: column;
}

.gallery-modal-image {
    width: 100%;
    height: 100%;
    max-height: 80vh;
    object-fit: contain;
    background: #050609;
}

.gallery-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(245,233,219,0.6);
    background: rgba(5,6,9,0.85);
    color: #F5E9DB;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
    box-shadow: 0 10px 26px rgba(0,0,0,0.85);
}

.gallery-modal-close:hover {
    background: rgba(212,175,55,0.18);
    transform: translateY(-1px);
}

.gallery-modal-close:active {
    transform: translateY(0);
}

.gallery-modal-close:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 3px;
}

.input-field {
    width: 100%;
    padding: 10px 14px;
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(96,79,62,0.9);
    background: rgba(5,6,9,0.96);
    color: #F5E9DB;
    font-size: 14px;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 10px 26px rgba(0,0,0,0.85);
}

.input-field::placeholder {
    color: rgba(245,233,219,0.5);
}

.input-field:hover {
    border-color: rgba(212,175,55,0.7);
}

.input-field:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 0 1px rgba(212,175,55,0.7), 0 18px 40px rgba(0,0,0,0.9);
    background: rgba(5,6,9,0.98);
}

.input-field:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-area {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(96,79,62,0.9);
    background: rgba(5,6,9,0.96);
    color: #F5E9DB;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 10px 26px rgba(0,0,0,0.85);
}

.text-area::placeholder {
    color: rgba(245,233,219,0.5);
}

.text-area:hover {
    border-color: rgba(212,175,55,0.7);
}

.text-area:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 0 1px rgba(212,175,55,0.7), 0 18px 40px rgba(0,0,0,0.9);
    background: rgba(5,6,9,0.98);
}

.text-area:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-label {
    font-size: 13px;
    color: #F5E9DB;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-helper {
    font-size: 12px;
    color: #DFCB9B;
    opacity: 0.85;
}

.form-error {
    font-size: 12px;
    color: #F97373;
    margin-top: 4px;
}

.cta-section-wrapper {
    margin-top: 32px;
    padding: 24px 20px;
    border-radius: 24px;
    background: radial-gradient(circle at 0% 0%, rgba(212,175,55,0.16) 0%, rgba(5,6,9,0.98) 55%, rgba(5,6,9,1) 100%);
    border: 1px solid rgba(212,175,55,0.4);
    box-shadow: 0 22px 60px rgba(0,0,0,0.95);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cta-text-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 520px;
}

.cta-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 20px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #F5E9DB;
    margin: 0;
}

.cta-subtitle {
    font-size: 14px;
    line-height: 1.6;
    color: #DFCB9B;
    opacity: 0.9;
    margin: 0;
}

.footer {
    margin-top: 40px;
    padding: 20px 16px 32px;
    border-top: 1px solid rgba(45,35,29,0.9);
    background: radial-gradient(circle at 50% -20%, rgba(212,175,55,0.12) 0%, rgba(5,6,9,1) 65%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 12px;
    color: #DFCB9B;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-right {
    text-align: right;
}

.footer-created-by {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #F5E9DB;
    opacity: 0.9;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.physics-floating {
    animation: floatSoft 8s ease-in-out infinite;
    will-change: transform;
}

@keyframes bookRepairGlow {
    0% {
        box-shadow: 0 18px 45px rgba(0,0,0,0.9), 0 0 0 rgba(212,175,55,0.0);
        transform: translateY(0) scale(1);
    }
    50% {
        box-shadow: 0 22px 60px rgba(0,0,0,0.95), 0 0 24px rgba(212,175,55,0.6);
        transform: translateY(-1px) scale(1.01);
    }
    100% {
        box-shadow: 0 18px 45px rgba(0,0,0,0.9), 0 0 0 rgba(212,175,55,0.0);
        transform: translateY(0) scale(1);
    }
}

@keyframes floatSoft {
    0% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(0px, -6px, 0); }
    50% { transform: translate3d(4px, -2px, 0); }
    75% { transform: translate3d(-2px, 4px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translate3d(0, 18px, 0); }
    100% { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: minmax(0, 1fr);
    }
    .hero-physics-wrapper {
        order: -1;
        margin-bottom: 24px;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 14px;
    }
    .header-bar {
        padding: 10px 14px;
    }
    .header-title-text {
        font-size: 18px;
        letter-spacing: 0.14em;
    }
    .hero-title {
        font-size: 28px;
    }
    .cta-section-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    .gallery-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .services-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #050609;
    color: #F5E9DB;
    border: 1px solid rgba(245,233,219,0.7);
    font-size: 13px;
    z-index: 2100;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}

.skip-link:hover {
    background: #D4AF37;
    color: #140C18;
}

.skip-link:focus {
    transform: translateY(0);
}

.modal[hidden] {
    display: none;
}
