/* ================================================
   HOMIE — Custom Styles
   Only for styles that Tailwind cannot handle
   ================================================ */

/* ── Typography ── */
.font-heading {
    font-family: 'Fraunces', serif;
}

body {
    font-family: 'Nunito', sans-serif;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Section utilities ── */
.section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-color);
    background: var(--sage-pale);
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-title em {
    font-style: italic;
    color: var(--accent-color);
}

.section-sub {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 560px;
}

/* ── Reveal animations ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered children */
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }
.reveal:nth-child(7) { transition-delay: 0.48s; }
.reveal:nth-child(8) { transition-delay: 0.56s; }

/* ── Floating animations ── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 3s ease-in-out 1.5s infinite;
}

/* ── Ticker animation ── */
.ticker-track {
    display: flex;
    gap: 0;
    width: max-content;
    animation: ticker 30s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── FAQ answer slide ── */
.faq-answer-open {
    animation: faqSlideDown 0.3s ease forwards;
}

@keyframes faqSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── FAQ body scrollbar ── */
.faq-body::-webkit-scrollbar {
    width: 4px;
}

.faq-body::-webkit-scrollbar-track {
    background: transparent;
}

.faq-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* ── Border width utility ── */
.border-3 {
    border-width: 3px;
}

.border-l-3 {
    border-left-width: 3px;
}

/* ── Line clamp ── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Alpine.js cloak ── */
[x-cloak] {
    display: none !important;
}

/* ── Selection color ── */
::selection {
    background: var(--color-main-color);
    color: white;
}

/* ── Focus outline for accessibility ── */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ── Buttons — Premium Press-Down Style ── */
.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-color);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.2px;
    border: 2px solid var(--accent-color-dark);
    box-shadow: 0 4px 0 var(--accent-color-dark),
                0 6px 16px rgba(152, 29, 38, 0.25);
    transition: box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
    cursor: pointer;
}

.btn-main:hover {
    background: #b02030;
    box-shadow: 0 2px 0 var(--accent-color-dark),
                0 4px 12px rgba(152, 29, 38, 0.3);
    transform: translateY(2px);
    color: #ffffff;
}

.btn-main:active {
    box-shadow: 0 0 0 var(--accent-color-dark);
    transform: translateY(4px);
}

.btn-main--light {
    background: #ffffff !important;
    color: var(--accent-color) !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15),
                0 6px 16px rgba(0, 0, 0, 0.1) !important;
}

.btn-main--light:hover {
    background: #f8f4f4 !important;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15),
                0 4px 12px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(2px) !important;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--text-dark);
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--cream-darker);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    letter-spacing: 0.2px;
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
    transform: translateY(2px);
}

.btn-outline:active {
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.04);
    transform: translateY(4px);
}

/* ── Hero typewriter ── */
.hero-highlight-phrase {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    font-family: 'Fraunces', serif;
    font-size: 18px;
    font-weight: 700;
    font-style: italic;
    padding: 10px 20px;
    border-radius: 10px;
    line-height: 1.4;
    transform: rotate(-1.2deg);
    box-shadow: 0 4px 0 var(--accent-color-dark);
}

.hero-highlight-phrase .tw-cursor {
    display: inline-block;
    width: 2px;
    height: 18px;
    background: rgba(255, 255, 255, 0.85);
    vertical-align: middle;
    margin-left: 3px;
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ── Wave separator ── */
.sep-wave {
    display: block;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    margin: 0;
}

.sep-wave svg {
    display: block;
    width: 100%;
}

/* ── Responsive adjustments ── */
@media (max-width: 768px) {
    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
    }

    .section-sub {
        font-size: 15px;
    }

    .btn-main,
    .btn-outline {
        padding: 13px 24px;
        font-size: 14px;
    }
}
