/* =========================================
   DETAP — Soft Indigo + Coral Palette
   Self-contained styles for the DETAP page
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* DETAP Palette */
    --indigo: #2D3561;
    --indigo-dark: #1E2340;
    --indigo-light: #3E4A7A;
    --coral: #E8836B;
    --coral-hover: #D46B53;
    --coral-light: #F2A896;
    --bg-main: #F8F6FB;
    --bg-light: #F0EDF5;
    --white: #FFFFFF;
    --dark-text: #1a1a2e;
    --body-text: #3a3a4a;
    --border-light: rgba(232, 131, 107, 0.2);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-card: 0 8px 32px rgba(45, 53, 97, 0.08);
    --shadow-hover: 0 12px 48px rgba(45, 53, 97, 0.14);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    font-family: var(--font-main);
    color: var(--dark-text);
    line-height: 1.7;
    background: var(--bg-main);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5 {
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }

p {
    color: var(--body-text);
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 0.75rem;
}

.section-title {
    margin-bottom: 1.25rem;
    color: var(--indigo);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--body-text);
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section--dark {
    background: var(--indigo);
    color: var(--white);
}

.section--dark .section-title {
    color: var(--white);
}

.section--dark p {
    color: rgba(255, 255, 255, 0.85);
}

.section--dark .section-label {
    color: var(--coral-light);
}

.section--light {
    background: var(--bg-light);
}

.section--white {
    background: var(--white);
}

.text-center {
    text-align: center;
}

/* NAV */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(45, 53, 97, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav__logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav__logo-accent {
    color: var(--coral);
}

.nav__links {
    display: flex;
    gap: 1.1rem;
    align-items: center;
}

.nav__links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.77rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav__links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--coral);
    transition: var(--transition);
}

.nav__links a:hover {
    color: var(--white);
}

.nav__links a:hover::after {
    width: 100%;
}

.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.nav__hamburger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
    border-radius: 2px;
}

/* HERO */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    overflow: hidden;
    padding-top: 72px;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(232, 131, 107, 0.08) 0%, transparent 60%), 
                radial-gradient(circle at 80% 70%, rgba(45, 53, 97, 0.1) 0%, transparent 60%);
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
}

.hero__title {
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--indigo);
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    animation: fade-in-up 1s ease-out;
}

.hero__subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--indigo-light);
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fade-in-up 1s ease-out 0.2s both;
}

.hero__tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--body-text);
    font-weight: 400;
    margin-bottom: 2.5rem;
    animation: fade-in-up 1s ease-out 0.4s both;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--coral);
    color: var(--white);
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-size: 1rem;
    transition: var(--transition);
    animation: fade-in-up 1s ease-out 0.6s both;
}

.hero__cta:hover {
    background: var(--coral-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232, 131, 107, 0.35);
}

.hero__scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--indigo-light);
    font-size: 1.5rem;
    opacity: 0.5;
}

/* CARDS */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(45, 53, 97, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--coral);
    transform: scaleY(0);
    transition: var(--transition);
    transform-origin: top;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.info-card:hover::before {
    transform: scaleY(1);
}

.info-card__icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(232, 131, 107, 0.15), rgba(232, 131, 107, 0.05));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--coral);
    transition: var(--transition);
}

.info-card:hover .info-card__icon {
    background: var(--coral);
    color: var(--white);
}

.info-card h3 {
    margin-bottom: 0.75rem;
    color: var(--indigo);
}

.info-card p {
    font-size: 0.95rem;
}

/* NEW FRAMEWORK DIAGRAM */
.card-grid--2x2 {
    grid-template-columns: repeat(2, 1fr);
}

.framework-diagram {
    background: var(--white);
    border: 2px solid var(--indigo-dark);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 3rem auto 2rem;
    max-width: 900px;
    box-shadow: var(--shadow-card);
}

.framework-title {
    background: var(--indigo-dark);
    color: var(--white);
    padding: 1rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.framework-columns {
    display: flex;
    align-items: stretch;
    position: relative;
    padding: 2rem;
    gap: 2rem;
}

.framework-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.framework-header {
    color: var(--indigo-dark);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--indigo-dark);
    padding-bottom: 0.5rem;
}

.framework-box {
    background: #E6007E;
    color: var(--white);
    padding: 1rem;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
}

.framework-box strong {
    font-size: 1.1rem;
}

.framework-box span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.framework-footer-text {
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--indigo-dark);
    font-style: italic;
    text-align: center;
    padding-top: 1rem;
}

.framework-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--indigo-dark);
}

.framework-bottom-note {
    text-align: center;
    color: #E6007E;
    font-style: italic;
    font-weight: 600;
    padding: 1rem;
    border-top: 1px solid rgba(30, 35, 64, 0.1);
}

.stage-explanations {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.stage-domain {
    background: var(--white);
    border: 1px solid rgba(30, 35, 64, 0.1);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-card);
}

.domain-title {
    color: var(--indigo-dark);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 2px solid #E6007E;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.stage-item-new {
    margin-bottom: 1.5rem;
}

.stage-item-new:last-child {
    margin-bottom: 0;
}

.stage-item-new h4 {
    color: #E6007E;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.stage-item-new p {
    font-size: 0.95rem;
    color: var(--body-text);
}

/* CONNECTION SECTION */
.connection-box {
    background: linear-gradient(135deg, var(--indigo), var(--indigo-light));
    border-radius: var(--radius-lg);
    padding: 3rem;
    color: var(--white);
    margin: 3rem 0;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.connection-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(232, 131, 107, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.connection-box h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.connection-box p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--coral);
    color: var(--white);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.btn:hover {
    background: var(--white);
    color: var(--indigo);
}

/* ANIMATIONS */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px) }
    to { opacity: 1; transform: translateY(0) }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0) }
    50% { transform: translateX(-50%) translateY(10px) }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* FOOTER */
.footer {
    background: var(--indigo-dark);
    padding: 3rem 0 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer__brand {
    font-weight: 700;
    font-size: 1rem;
    color: var(--white);
}

.footer__brand span {
    color: var(--coral);
}

.footer__info {
    font-size: 0.8rem;
}

.footer__links {
    display: flex;
    gap: 1.5rem;
}

.footer__links a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.footer__links a:hover {
    color: var(--coral);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .card-grid--2x2 {
        grid-template-columns: 1fr;
    }
    
    .framework-columns {
        flex-direction: column;
        gap: 1rem;
    }
    
    .framework-arrow {
        transform: rotate(90deg);
        padding: 1rem 0;
    }
    
    .nav__links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--indigo);
        flex-direction: column;
        padding: 2rem;
        gap: 1.25rem;
    }

    .nav__links.active {
        display: flex;
    }

    .nav__hamburger {
        display: flex;
    }
    
    .connection-box {
        padding: 2rem;
    }
}
