/* ===================================
   iggi.dev - Forest Nature Organic Brand
   =================================== */

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

/* Color Palette
   Canopy Light:   #FAFFF5
   Leaf Green:     #2D5A27
   Bright Moss:    #7CB342
   Bark Brown:     #5D4037
   Soil Dark:      #3E2723
   Text Primary:   #1A1A1A
   Text Secondary: #6B6B6B
   Card White:     #FFFFFF
*/

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #1A1A1A;
    background-color: #FAFFF5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    color: #1A1A1A;
}

h2.section-header {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: #1A1A1A;
    margin-bottom: 0.5rem;
}

code, .card-code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
}

/* ===================================
   CANOPY (Hero)
   =================================== */
.canopy {
    position: relative;
    height: 90vh;
    min-height: 500px;
    background-color: #FAFFF5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fractal-tree {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    max-width: 600px;
    height: 80%;
    z-index: 1;
    pointer-events: none;
}

.fractal-tree path,
.fractal-tree line {
    fill: none;
    stroke: #2D5A27;
    stroke-linecap: round;
}

.canopy-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 600px;
    padding: 0 2rem;
}

.canopy-title {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.canopy-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.canopy-tagline {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: #6B6B6B;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.canopy-tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   SECTION CONTAINERS
   =================================== */
.section-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-subtext {
    color: #6B6B6B;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ===================================
   GROWTH GRID (Section 2)
   =================================== */
.growth-grid {
    padding: 5rem 0;
    background-color: #FAFFF5;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 2rem;
}

.card {
    position: relative;
    background: #FFFFFF;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card:hover .card-border {
    background-color: #7CB342;
}

.card-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background-color: #2D5A27;
    transition: background-color 0.2s ease, height 0.2s ease;
}

.card-border.drawn {
    height: 100%;
}

.card-content {
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
}

.card-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0.75rem;
    display: block;
}

.card-icon path,
.card-icon circle,
.card-icon ellipse {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 0.3s ease;
}

.card-icon.drawn path,
.card-icon.drawn circle,
.card-icon.drawn ellipse {
    stroke-dashoffset: 0;
}

.card-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: #1A1A1A;
    margin-bottom: 0.5rem;
}

.card-text {
    color: #6B6B6B;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.card-code {
    display: inline-block;
    background-color: #FAFFF5;
    color: #2D5A27;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    border: 1px solid rgba(45, 90, 39, 0.15);
}

/* ===================================
   ROOT SYSTEM (Section 3)
   =================================== */
.root-system {
    padding: 5rem 0;
    background-color: #FAFFF5;
}

.root-diagram-wrapper {
    margin-top: 2rem;
    overflow: hidden;
    border-radius: 6px;
    background: #FAFFF5;
    border: 1px solid rgba(93, 64, 55, 0.1);
}

.root-diagram {
    width: 100%;
    height: auto;
    display: block;
}

.root-node {
    fill: #FAFFF5;
    stroke: #5D4037;
    stroke-width: 2;
    transform-origin: center;
}

.root-node-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    fill: #5D4037;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
}

.root-connection {
    fill: none;
    stroke: #5D4037;
    stroke-width: 1.5;
    stroke-linecap: round;
}

/* ===================================
   GROWTH LOG (Section 4)
   =================================== */
.growth-log {
    padding: 5rem 0;
    background-color: #FAFFF5;
}

.growth-rings {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.ring {
    border: 1px solid #2D5A27;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ring-outer {
    width: 520px;
    height: 520px;
    padding: 40px;
}

.ring-mid {
    width: 100%;
    height: 100%;
    padding: 40px;
}

.ring-inner {
    width: 100%;
    height: 100%;
    padding: 40px;
}

.ring-core {
    width: 100%;
    height: 100%;
    background-color: rgba(45, 90, 39, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring-core-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #2D5A27;
    font-weight: 400;
}

.ring-label {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FAFFF5;
    padding: 0 0.75rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ring-version {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #2D5A27;
    font-weight: 400;
}

.ring-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #6B6B6B;
}

.ring-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #6B6B6B;
    display: none;
}

/* Show description on wider screens */
@media (min-width: 640px) {
    .ring-desc {
        display: inline;
    }
}

/* ===================================
   SOIL FOOTER
   =================================== */
.soil-footer {
    background-color: #3E2723;
    color: #7CB342;
    padding: 3rem 0 2rem;
}

.footer-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-brand {
    margin-bottom: 2rem;
}

.footer-logo {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.3rem;
    color: #7CB342;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(124, 179, 66, 0.7);
    margin-top: 0.4rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: rgba(124, 179, 66, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.footer-link {
    font-size: 0.9rem;
    color: #7CB342;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #FAFFF5;
}

.footer-bottom {
    border-top: 1px solid rgba(124, 179, 66, 0.15);
    padding-top: 1.5rem;
}

.footer-credit {
    font-size: 0.8rem;
    color: rgba(124, 179, 66, 0.5);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ring-outer {
        width: 320px;
        height: 320px;
        padding: 24px;
    }

    .ring-mid {
        padding: 24px;
    }

    .ring-inner {
        padding: 24px;
    }

    .fractal-tree {
        width: 80%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
