/* === Mobile hardening: kill any chance of horizontal scroll === */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}
img, video {
    max-width: 100%;
    height: auto;
}

/* Custom Styles */
.hero-pattern {
    background-color: #111;
    /* HERO IMAGE: Change the url() below to 'hero-bg.jpg' if uploaded to root */
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1620331313174-d84713c983d9?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
/* iOS Safari does not implement background-attachment: fixed cleanly,
   and the workaround can render the image at its natural width and
   cause horizontal page scroll. Switch to scroll on mobile. */
@media (max-width: 767px) {
    .hero-pattern { background-attachment: scroll; }
}

.gold-gradient {
    background: linear-gradient(135deg, #C5A059 0%, #E5C585 100%);
}

/* Form Focus Ring */
.form-input:focus {
    outline: none;
    border-color: #C5A059;
    box-shadow: 0 0 0 1px #C5A059;
}

/* Prevent iOS Safari from auto-zooming when focusing inputs (<16px triggers zoom) */
@media (max-width: 767px) {
    .form-input,
    .form-input::placeholder { font-size: 16px; }
}

/* Mobile Bottom Bar spacer — accounts for iPhone home indicator */
body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) {
    body { padding-bottom: 0; }
}

/* iPhone home-indicator clearance for the sticky mobile bottom bar */
.safe-area-pb {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

/* === Subtle Luxury Motion === */
/* Scroll-in reveal */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 90ms; }
.reveal-d2 { transition-delay: 180ms; }
.reveal-d3 { transition-delay: 270ms; }
.reveal-d4 { transition-delay: 360ms; }

/* Hero on-load entrance */
.hero-anim {
    opacity: 0;
    transform: translateY(12px);
    animation: heroIn 1000ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-anim-d1 { animation-delay: 120ms; }
.hero-anim-d2 { animation-delay: 240ms; }
.hero-anim-d3 { animation-delay: 360ms; }
.hero-anim-d4 { animation-delay: 480ms; }
.hero-anim-form { animation-delay: 200ms; }
@keyframes heroIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Animated gold underline for nav links */
.nav-link { position: relative; }
.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 18px;
    height: 1px;
    background: #C5A059;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after { transform: translateX(-50%) scaleX(1); }

/* Slow breathing pulse on brand gold dot */
.pulse-gold {
    display: inline-block;
    animation: pulseGold 3.2s ease-in-out infinite;
}
@keyframes pulseGold {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* Portfolio image: gentle Ken-Burns on hover (replaces abrupt scale) */
.portfolio-img {
    transition: transform 1400ms cubic-bezier(0.16, 1, 0.3, 1),
                filter 700ms ease;
    filter: saturate(0.95);
}
.group:hover .portfolio-img {
    transform: scale(1.06);
    filter: saturate(1.05);
}

/* Service row: subtle gold accent on hover */
.service-row {
    transition: border-color 400ms ease, transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.service-row:hover {
    border-color: #C5A059 !important;
    transform: translateX(2px);
}

/* Submit button: soft gold glow on hover */
.btn-luxury {
    transition: opacity 300ms ease, transform 300ms ease, box-shadow 500ms ease;
}
.btn-luxury:hover {
    box-shadow: 0 8px 24px -8px rgba(197, 160, 89, 0.55);
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .hero-anim { opacity: 1; transform: none; animation: none; transition: none; }
    .pulse-gold { animation: none; }
    .portfolio-img, .service-row, .btn-luxury, .nav-link::after { transition: none; }
}

/* === Consult option cards (used in step 2 of the consult flow) === */
.consult-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.consult-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.consult-option {
    display: block;
    cursor: pointer;
    position: relative;
    user-select: none;
}
.consult-option input[type="radio"],
.consult-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.consult-option > span {
    display: block;
    padding: 0.75rem 0.5rem;
    border: 1px solid #e4e4e7;
    background: #ffffff;
    text-align: center;
    font-size: 0.8125rem;
    line-height: 1.25;
    color: #3f3f46;
    border-radius: 2px;
    transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}
@media (hover: hover) {
    .consult-option:hover > span {
        border-color: #C5A059;
    }
}
.consult-option.selected > span {
    border-color: #C5A059;
    background: #FAF6EE;
    color: #1A1A1A;
    font-weight: 600;
}
.consult-option input[type="radio"]:focus-visible + span,
.consult-option input[type="checkbox"]:focus-visible + span {
    outline: 2px solid #C5A059;
    outline-offset: 2px;
}

/* Back link in step 2 */
.consult-back {
    background: none;
    border: 0;
    padding: 0;
    color: #71717a;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-transform: uppercase;
}
.consult-back:hover {
    color: #C5A059;
}
