/* ============================================
   hanun.ai — Styles
   Watercolor + Holographic Dual-Texture System
   ============================================ */

/* --- Design Palette (from DESIGN.md) --- */
:root {
    --earth-ochre: #D4A574;
    --earth-umber: #8A6A4A;
    --earth-dark: #3A2A1A;
    --terracotta: #C07A5A;
    --holo-base: #E0E8F0;
    --holo-pink: #F0C0D0;
    --holo-teal: #C0E0E0;
    --holo-gold: #E0D0A0;
    --star-white: #F8F4F0;
    --watercolor-mid: #E8C9A0;
    --watercolor-deep: #C09060;
    --skeleton-base: #E0D8D0;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.85;
    color: #3A2A1A;
    background: #F8F4F0;
    overflow-x: hidden;
}

/* --- Typography --- */
.logotype-svg {
    width: clamp(240px, 40vw, 400px);
    height: auto;
}

.logotype-text-stroke {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 72px;
    fill: none;
    stroke: #3A2A1A;
    stroke-width: 1.5;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: drawLogotype 2000ms ease-in-out forwards;
}

.logotype-text-fill {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 72px;
    fill: #3A2A1A;
    opacity: 0;
    animation: fillLogotype 400ms ease forwards 1800ms;
}

@keyframes drawLogotype {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fillLogotype {
    to {
        opacity: 1;
    }
}

h2.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(24px, 3.5vw, 48px);
    color: #3A2A1A;
    margin-bottom: 12px;
}

h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(18px, 2vw, 26px);
    color: #3A2A1A;
    margin-bottom: 10px;
}

.hero-tagline {
    font-family: 'Caveat', cursive;
    font-weight: 600;
    font-size: clamp(18px, 2.5vw, 28px);
    color: #8A6A4A;
    margin-top: 16px;
    opacity: 0;
    animation: fadeInUp 600ms ease forwards 2200ms;
}

.hero-right-tagline {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(20px, 2.5vw, 36px);
    color: #3A2A1A;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 600ms ease forwards 1600ms;
}

.hero-right-tagline em {
    font-style: italic;
    color: #C07A5A;
}

/* --- Section 1: Hero Split-Screen --- */
.hero-section {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-left {
    position: relative;
    width: 48%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-right {
    position: relative;
    width: 52%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Watercolor Wash Layers */
.watercolor-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.wc-layer-1 {
    background:
        radial-gradient(ellipse 80% 70% at 30% 40%, rgba(212, 165, 116, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 60% 80% at 70% 60%, rgba(232, 201, 160, 0.4) 0%, transparent 65%),
        radial-gradient(ellipse 45% 55% at 50% 50%, rgba(232, 201, 160, 0.15) 0%, transparent 50%); /* #E8C9A0 */
    animation: watercolorFade1 600ms ease forwards 200ms;
}

.wc-layer-2 {
    background:
        radial-gradient(ellipse 70% 60% at 55% 30%, rgba(192, 144, 96, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 50% 90% at 25% 70%, rgba(212, 165, 116, 0.3) 0%, transparent 55%);
    animation: watercolorFade2 400ms ease forwards 800ms;
}

.wc-layer-3 {
    background:
        radial-gradient(ellipse 90% 50% at 60% 55%, rgba(232, 201, 160, 0.25) 0%, transparent 65%),
        radial-gradient(ellipse 40% 70% at 15% 45%, rgba(192, 144, 96, 0.2) 0%, transparent 50%);
    animation: watercolorFade3 300ms ease forwards 1200ms;
}

@keyframes watercolorFade1 {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes watercolorFade2 {
    from { opacity: 0; transform: scale(0.9) translateX(-10px); }
    to { opacity: 1; transform: scale(1) translateX(0); }
}

@keyframes watercolorFade3 {
    from { opacity: 0; transform: scale(0.92) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.hero-left-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Holographic Background */
.holographic-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        conic-gradient(
            from 0deg at 50% 50%,
            rgba(240, 192, 208, 0.2),
            rgba(192, 224, 224, 0.2),
            rgba(224, 208, 160, 0.2),
            rgba(240, 192, 208, 0.2)
        ),
        linear-gradient(135deg, #E0E8F0 0%, #F0F4F8 50%, #E8ECF0 100%);
    animation: holoShift 20s linear infinite;
}

@keyframes holoShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.hero-right-content {
    position: relative;
    z-index: 2;
    padding: 0 40px;
}

/* Star Constellation */
.star-constellation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    z-index: 1;
    animation: constellationRotate 45s linear infinite;
}

@keyframes constellationRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

#constellation-svg {
    width: 100%;
    height: auto;
}

.constellation-lines line {
    stroke: rgba(138, 106, 74, 0.3);
    stroke-width: 1;
}

.constellation-stars polygon {
    fill: #F8F4F0;
    opacity: 0;
    animation: starPulse 3s ease-in-out infinite alternate;
}

.star-node {
    cursor: pointer;
}

.star-node:nth-child(1) polygon { animation-delay: 0ms; }
.star-node:nth-child(2) polygon { animation-delay: 30ms; }
.star-node:nth-child(3) polygon { animation-delay: 60ms; }
.star-node:nth-child(4) polygon { animation-delay: 90ms; }
.star-node:nth-child(5) polygon { animation-delay: 120ms; }
.star-node:nth-child(6) polygon { animation-delay: 150ms; }
.star-node:nth-child(7) polygon { animation-delay: 180ms; }
.star-node:nth-child(8) polygon { animation-delay: 210ms; }
.star-node:nth-child(9) polygon { animation-delay: 240ms; }

@keyframes starPulse {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

.star-label {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 11px;
    fill: #8A6A4A;
    text-anchor: middle;
    opacity: 0;
    transition: opacity 200ms ease;
    pointer-events: none;
}

.star-node:hover polygon,
.star-node.active polygon {
    fill: #E0D0A0;
    transform-origin: center;
    transform: scale(1.3);
    transition: transform 200ms ease, fill 200ms ease;
}

.star-node:hover .star-label,
.star-node.active .star-label {
    opacity: 1;
}

/* Staggered star fade-in */
.constellation-stars .star-node {
    opacity: 0;
}

.constellation-stars .star-node.visible {
    animation: starAppear 200ms ease forwards;
}

.star-node:nth-child(1).visible { animation-delay: 800ms; }
.star-node:nth-child(2).visible { animation-delay: 830ms; }
.star-node:nth-child(3).visible { animation-delay: 860ms; }
.star-node:nth-child(4).visible { animation-delay: 890ms; }
.star-node:nth-child(5).visible { animation-delay: 920ms; }
.star-node:nth-child(6).visible { animation-delay: 950ms; }
.star-node:nth-child(7).visible { animation-delay: 980ms; }
.star-node:nth-child(8).visible { animation-delay: 1010ms; }
.star-node:nth-child(9).visible { animation-delay: 1040ms; }

@keyframes starAppear {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Brush Stroke Divider --- */
.brush-stroke-divider {
    width: clamp(100px, 15vw, 200px);
    height: auto;
    margin-bottom: 40px;
}

.brush-stroke-divider.light path {
    stroke: #C09060;
}

/* --- Section 2: Capabilities --- */
.capabilities-section {
    position: relative;
    padding: 100px 0 120px;
    overflow: hidden;
}

.section-merge-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(212, 165, 116, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 80% 70%, rgba(192, 144, 96, 0.15) 0%, transparent 55%),
        conic-gradient(
            from 180deg at 60% 40%,
            rgba(240, 192, 208, 0.08),
            rgba(192, 224, 224, 0.08),
            rgba(224, 208, 160, 0.08),
            rgba(240, 192, 208, 0.08)
        ),
        linear-gradient(180deg, #F8F4F0 0%, #F0EDE8 100%);
    animation: holoShift 25s linear infinite;
    z-index: 0;
}

.capabilities-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Capability Cards */
.capability-card {
    position: relative;
    background: rgba(248, 244, 240, 0.85);
    border: 1px solid rgba(138, 106, 74, 0.15);
    border-radius: 12px;
    padding: 36px 30px;
    text-align: left;
    overflow: hidden;
    min-height: 180px;
}

.capability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #D4A574, #C07A5A, #E0D0A0);
    opacity: 0;
    transition: opacity 300ms ease;
}

.capability-card:hover::before {
    opacity: 1;
}

/* Skeleton Loading */
.skeleton-placeholder {
    position: absolute;
    top: 36px;
    left: 30px;
    right: 30px;
    bottom: 36px;
    z-index: 2;
    transition: opacity 300ms ease;
}

.skeleton-placeholder.hidden {
    opacity: 0;
    pointer-events: none;
}

.skeleton-line {
    border-radius: 6px;
    background: #E0D8D0;
    position: relative;
    overflow: hidden;
}

.skeleton-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(224, 232, 240, 0.6), transparent);
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

@keyframes skeletonShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.skeleton-title {
    width: 60%;
    height: 22px;
    margin-bottom: 16px;
}

.skeleton-body {
    width: 100%;
    height: 14px;
    margin-bottom: 10px;
}

.skeleton-body.short {
    width: 75%;
}

/* Card Content (hidden initially) */
.card-content {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 400ms ease, transform 400ms ease;
}

.card-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Section 3: Approach (Dark Band) --- */
.approach-section {
    background: #3A2A1A;
    padding: 100px 0 120px;
    position: relative;
    overflow: hidden;
}

.approach-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 40% 30% at 80% 20%, rgba(192, 144, 96, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 20% 80%, rgba(212, 165, 116, 0.06) 0%, transparent 55%);
}

.approach-inner {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
}

.approach-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(24px, 3.5vw, 48px);
    color: #F8F4F0;
    margin-bottom: 12px;
}

.holographic-text {
    background: linear-gradient(90deg, #F0C0D0, #C0E0E0, #E0D0A0, #F0C0D0);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holoText 4s linear infinite;
}

@keyframes holoText {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.approach-content {
    margin-top: 40px;
}

.approach-block {
    position: relative;
    padding-left: 24px;
    margin-bottom: 32px;
    color: #E0D8D0;
}

.approach-block em {
    color: #E0D0A0;
    font-style: italic;
}

.brush-accent {
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 30px;
    background: linear-gradient(180deg, #D4A574, #C09060);
    border-radius: 2px;
    opacity: 0.7;
}

/* --- Section 4: Testimonials --- */
.testimonials-section {
    padding: 100px 0 120px;
    background:
        radial-gradient(ellipse 50% 40% at 30% 50%, rgba(212, 165, 116, 0.1) 0%, transparent 60%),
        linear-gradient(180deg, #F8F4F0 0%, #F0ECE6 100%);
}

.testimonials-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.testimonials-left {
    flex: 0 0 40%;
}

.testimonials-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Mini Constellation */
.mini-constellation {
    margin-top: 30px;
    width: 100%;
    max-width: 280px;
}

.mini-constellation svg {
    width: 100%;
    height: auto;
}

.mini-constellation-lines line {
    stroke: rgba(138, 106, 74, 0.25);
    stroke-width: 1;
}

.mini-constellation-stars polygon {
    fill: #D4A574;
    animation: starPulse 3s ease-in-out infinite alternate;
}

.mini-constellation-stars polygon:nth-child(2) { animation-delay: 400ms; }
.mini-constellation-stars polygon:nth-child(3) { animation-delay: 800ms; }
.mini-constellation-stars polygon:nth-child(4) { animation-delay: 1200ms; }
.mini-constellation-stars polygon:nth-child(5) { animation-delay: 1600ms; }
.mini-constellation-stars polygon:nth-child(6) { animation-delay: 2000ms; }

/* Testimonial Cards */
.testimonial-card {
    background:
        radial-gradient(ellipse 80% 80% at 60% 40%, rgba(212, 165, 116, 0.08) 0%, transparent 60%),
        rgba(248, 244, 240, 0.7);
    border: 1px solid rgba(138, 106, 74, 0.12);
    border-radius: 12px;
    padding: 32px 28px;
    position: relative;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(192, 224, 224, 0.4), rgba(224, 208, 160, 0.4), transparent);
}

.testimonial-quote {
    font-family: 'Caveat', cursive;
    font-weight: 600;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.5;
    color: #3A2A1A;
    margin-bottom: 14px;
}

.testimonial-author {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 14px;
    color: #8A6A4A;
}

/* --- Footer --- */
.site-footer {
    background: linear-gradient(180deg, #D4A574, #C09060);
    padding: 50px 0 40px;
    position: relative;
}

.footer-holographic-rule {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #F0C0D0, #C0E0E0, #E0D0A0, #F0C0D0);
    background-size: 200% 100%;
    animation: holoText 3s linear infinite;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.footer-logo {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 32px;
    color: #3A2A1A;
    display: block;
    margin-bottom: 16px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
}

.footer-nav a {
    font-family: 'Caveat', cursive;
    font-weight: 600;
    font-size: 18px;
    color: #3A2A1A;
    text-decoration: none;
    position: relative;
    transition: color 200ms ease;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3A2A1A;
    transition: width 300ms ease;
}

.footer-nav a:hover {
    color: #F8F4F0;
}

.footer-nav a:hover::after {
    width: 100%;
    background: #F8F4F0;
}

.footer-tagline {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 14px;
    color: rgba(58, 42, 26, 0.7);
}

/* --- Utility Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll-triggered fade-in --- */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero-section {
        flex-direction: column;
        height: auto;
    }

    .hero-left,
    .hero-right {
        width: 100%;
        height: 50vh;
        min-height: 360px;
    }

    .star-constellation {
        width: 70%;
        max-width: 350px;
    }

    .testimonials-inner {
        flex-direction: column;
    }

    .testimonials-left {
        flex: none;
        width: 100%;
    }

    .mini-constellation {
        max-width: 200px;
    }

    .capabilities-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-left,
    .hero-right {
        min-height: 300px;
    }

    .capabilities-inner,
    .approach-inner,
    .testimonials-inner,
    .footer-inner {
        padding: 0 20px;
    }

    .capabilities-section,
    .approach-section,
    .testimonials-section {
        padding: 60px 0 80px;
    }
}
