/* ===================================
   rinji.dev -- Ethereal Candlelit Workspace
   ===================================
   Fonts: Lato" (Google Fonts -- friendly humanist
   Display: Work Sans" (Google Fonts -- commanding oversized headings.
   =================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.8;
    color: #4A6A9A;
    background-color: #F0F4FA;
    overflow-x: hidden;
    position: relative;
}

/* --- Container --- */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

/* --- Candle Glow Ambient Layers --- */
.candle-glow {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
}

.candle-glow--top {
    width: 800px;
    height: 800px;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle at center, rgba(212, 168, 67, 0.08), transparent 70%);
    animation: candlePulse 6s ease-in-out infinite;
}

.candle-glow--mid {
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, rgba(74, 144, 217, 0.06), transparent 70%);
    animation: candlePulse 8s ease-in-out infinite 2s;
}

@keyframes candlePulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

.candle-glow--mid {
    animation-name: candlePulseMid;
}

@keyframes candlePulseMid {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.08); }
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Work Sans', sans-serif;
    color: #1A2A4A;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* --- Sections --- */
.section {
    padding: 10vh 0;
    position: relative;
    z-index: 1;
}

/* Alternating ambient glow behind sections */
.section--services {
    background: radial-gradient(circle at 50% 30%, rgba(74, 144, 217, 0.06), transparent 60%);
}

.section--contact {
    background: radial-gradient(circle at 50% 50%, rgba(212, 168, 67, 0.06), transparent 60%);
}

/* --- Icon Circles --- */
.icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-circle--alert {
    border: 2.5px solid #D4A843;
}

.icon-circle--info {
    border: 2.5px solid #5B9BD5;
}

.icon-circle--check {
    border: 2.5px solid #5B9BD5;
}

.icon-triangle {
    display: block;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 16px solid #D4A843;
    transform: translateY(-1px);
}

.icon-info {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: #5B9BD5;
    font-style: italic;
    line-height: 1;
}

.icon-checkmark {
    display: block;
    width: 16px;
    height: 9px;
    border-left: 2.5px solid #5B9BD5;
    border-bottom: 2.5px solid #5B9BD5;
    transform: rotate(-45deg) translateY(-2px);
}

.icon-checkmark--small {
    width: 12px;
    height: 7px;
    border-left: 2px solid #5B9BD5;
    border-bottom: 2px solid #5B9BD5;
    transform: rotate(-45deg);
}

/* --- Hero --- */
.hero {
    padding: 15vh 0 10vh;
    position: relative;
    z-index: 1;
    background: radial-gradient(circle at 50% 30%, rgba(212, 168, 67, 0.1), transparent 60%);
}

.hero__icon {
    margin-bottom: 1rem;
}

.hero__title {
    font-family: 'Work Sans', sans-serif;
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 800;
    color: #1A2A4A;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

/* Typewriter effect */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #D4A843;
    width: 0;
    animation: typewriterReveal 1.8s steps(9, end) 0.5s forwards,
               blinkCaret 0.7s step-end infinite;
}

@keyframes typewriterReveal {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkCaret {
    0%, 100% { border-color: #D4A843; }
    50% { border-color: transparent; }
}

.hero__subtitle {
    font-family: 'Work Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: #4A6A9A;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 0.8s ease 2.5s forwards;
}

.hero__line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #D4A843, #5B9BD5);
    margin: 2rem auto 0;
    border-radius: 2px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 2.8s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Section Icon & Heading --- */
.section__icon {
    margin-bottom: 0;
}

.section__heading {
    margin-bottom: 1.5rem;
}

.section__text {
    max-width: 600px;
    margin: 0 auto;
    color: #4A6A9A;
    line-height: 1.8;
}

/* --- Cards --- */
.cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background-color: #E0EAF5;
    border-radius: 12px;
    padding: 2rem 2rem 2rem 2.5rem;
    text-align: left;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(26, 42, 74, 0.08);
}

.card__marker {
    position: absolute;
    top: 2rem;
    left: 2.5rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card__title {
    padding-left: 1.75rem;
    color: #1A2A4A;
}

.card__text {
    padding-left: 1.75rem;
    color: #4A6A9A;
    line-height: 1.8;
}

/* --- Process Steps --- */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
}

.process-step {
    position: relative;
    text-align: center;
}

.process-step__number {
    font-family: 'Work Sans', sans-serif;
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    color: #E0EAF5;
    line-height: 1;
    margin-bottom: 0.25rem;
    user-select: none;
}

.process-step__title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #1A2A4A;
}

.process-step__text {
    max-width: 520px;
    margin: 0 auto;
    color: #4A6A9A;
    line-height: 1.8;
}

/* --- CTA Button --- */
.cta-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.9rem 2.5rem;
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #F0F4FA;
    background-color: #5B9BD5;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    letter-spacing: 0.03em;
}

.cta-button:hover {
    background-color: #4A6A9A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 155, 213, 0.3);
}

/* --- Footer --- */
.footer {
    padding: 4rem 0 3rem;
    position: relative;
    z-index: 1;
}

.footer__text {
    font-size: 0.875rem;
    color: #4A6A9A;
    opacity: 0.7;
}

/* --- Scroll Fade-In (applied via JS) --- */
.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* --- Responsive --- */
@media (max-width: 600px) {
    .container {
        padding: 0 1.25rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card__marker {
        top: 1.5rem;
        left: 1.5rem;
    }

    .card__title,
    .card__text {
        padding-left: 1.5rem;
    }

    .hero {
        padding: 10vh 0 8vh;
    }
}
