/* ============================================================
   lotus.dev — japanese zen portfolio + botanical illustration
   Palette:
     #0a2e2e  deep lotus pond (hero, footer)
     #f7f4ee  rice paper (content background)
     #f0ece4  warm white (lotus petals, text on dark)
     #2a2820  ink stone (body text on light)
     #d4726a  lotus pink (accent, links)
     #4a7a5a  stem green (secondary accent)
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Karla", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.9;
    color: #2a2820;
    background: #f7f4ee;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================================
   HERO — THE POND
   ============================================================ */
.pond {
    position: relative;
    min-height: 100vh;
    background: #0a2e2e;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pond::before {
    /* very subtle vignette to suggest depth of water */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center,
                rgba(10, 46, 46, 0) 0%,
                rgba(10, 46, 46, 0) 55%,
                rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
}

.pond-inner {
    position: relative;
    text-align: center;
    padding: 4rem 2rem;
    z-index: 2;
}

/* Concentric ripples */
.ripples {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 60px));
    width: 600px;
    height: 600px;
    max-width: 90vw;
    max-height: 90vw;
    pointer-events: none;
    z-index: 1;
}

.ripple {
    fill: none;
    stroke: #f0ece4;
    stroke-width: 0.5;
    transform-origin: 0 0;
    animation: ripple 6s ease-out infinite;
    opacity: 0;
}

.ripple-1 { animation-delay: 0s;   stroke-opacity: 0.05; }
.ripple-2 { animation-delay: 1.2s; stroke-opacity: 0.04; }
.ripple-3 { animation-delay: 2.4s; stroke-opacity: 0.03; }
.ripple-4 { animation-delay: 3.6s; stroke-opacity: 0.025; }
.ripple-5 { animation-delay: 4.8s; stroke-opacity: 0.02; }

@keyframes ripple {
    0%   { r: 18;  opacity: 1;   stroke-width: 1.2; }
    80%  {                opacity: 0.4; }
    100% { r: 140; opacity: 0;   stroke-width: 0.2; }
}

/* The CSS Lotus */
.lotus {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 3rem;
    z-index: 3;
}

.lotus .petal {
    position: absolute;
    width: 30px;
    height: 60px;
    border-radius: 50%;
    background: rgba(240, 236, 228, 0.7);
    bottom: 50%;
    left: 50%;
    margin-left: -15px;
    transform-origin: center bottom;
    box-shadow: 0 0 12px rgba(240, 236, 228, 0.18);
    animation: lotus-breathe 7s ease-in-out infinite;
}

.lotus .petal:nth-child(1) { transform: rotate(0deg);   }
.lotus .petal:nth-child(2) { transform: rotate(72deg);  }
.lotus .petal:nth-child(3) { transform: rotate(144deg); }
.lotus .petal:nth-child(4) { transform: rotate(216deg); }
.lotus .petal:nth-child(5) { transform: rotate(288deg); }

/* inner row — smaller, brighter petals offset by 36deg */
.lotus .petal-inner {
    position: absolute;
    width: 18px;
    height: 38px;
    border-radius: 50%;
    background: rgba(240, 236, 228, 0.92);
    bottom: 50%;
    left: 50%;
    margin-left: -9px;
    transform-origin: center bottom;
    animation: lotus-breathe 7s ease-in-out infinite;
    animation-delay: 0.6s;
}

.lotus .petal-inner:nth-of-type(1) { transform: rotate(36deg);  }
.lotus .petal-inner:nth-of-type(2) { transform: rotate(108deg); }
.lotus .petal-inner:nth-of-type(3) { transform: rotate(180deg); }
.lotus .petal-inner:nth-of-type(4) { transform: rotate(252deg); }
.lotus .petal-inner:nth-of-type(5) { transform: rotate(324deg); }

.lotus-core {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d4726a;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 16px rgba(212, 114, 106, 0.55);
    animation: core-pulse 4s ease-in-out infinite;
}

@keyframes lotus-breathe {
    0%, 100% { transform: rotate(var(--r, 0deg)) scaleY(1);    opacity: 0.85; }
    50%      { transform: rotate(var(--r, 0deg)) scaleY(1.06); opacity: 1;    }
}

/* explicit per-petal --r so animation can compose with rotation */
.lotus .petal:nth-child(1) { --r: 0deg;   }
.lotus .petal:nth-child(2) { --r: 72deg;  }
.lotus .petal:nth-child(3) { --r: 144deg; }
.lotus .petal:nth-child(4) { --r: 216deg; }
.lotus .petal:nth-child(5) { --r: 288deg; }
.lotus .petal-inner:nth-of-type(1) { --r: 36deg;  }
.lotus .petal-inner:nth-of-type(2) { --r: 108deg; }
.lotus .petal-inner:nth-of-type(3) { --r: 180deg; }
.lotus .petal-inner:nth-of-type(4) { --r: 252deg; }
.lotus .petal-inner:nth-of-type(5) { --r: 324deg; }

@keyframes core-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.9; }
    50%      { transform: translate(-50%, -50%) scale(1.25); opacity: 1;   }
}

/* Domain title */
.domain-name {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-weight: 300;
    font-size: clamp(2rem, 6vw, 4rem);
    color: #f0ece4;
    letter-spacing: 0.18em;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.tagline {
    font-family: "Karla", sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    color: rgba(240, 236, 228, 0.65);
    text-transform: lowercase;
    max-width: 32rem;
    margin: 0 auto;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    opacity: 0.6;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(240,236,228,0) 0%, rgba(240,236,228,0.8) 100%);
    animation: drip 3.5s ease-in-out infinite;
}

@keyframes drip {
    0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.3; }
    50%      { transform: scaleY(1);   transform-origin: top; opacity: 0.9; }
}

.scroll-label {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: rgba(240, 236, 228, 0.6);
    text-transform: uppercase;
}

/* ============================================================
   GARDEN PATH — content sections
   ============================================================ */
.garden {
    background: #f7f4ee;
    padding: 8rem 1.5rem 6rem;
    position: relative;
}

.path-block {
    max-width: 640px;
    margin-top: 0;
    margin-bottom: 6rem;
    position: relative;
    padding-left: 1.25rem;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1.4s ease, transform 1.4s ease;
}

.path-block.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* meandering alignment */
.path-block.left  { margin-left: 5%;   margin-right: auto; }
.path-block.right { margin-left: auto; margin-right: 5%;   }

@media (max-width: 720px) {
    .path-block.left,
    .path-block.right {
        margin-left: auto;
        margin-right: auto;
    }
}

/* petal bullet — single rotated ellipse */
.petal-bullet {
    display: block;
    width: 14px;
    height: 22px;
    border-radius: 50%;
    background: #d4726a;
    transform: rotate(45deg);
    margin-bottom: 1.6rem;
    margin-left: -0.25rem;
    opacity: 0.85;
}

.section-title {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    line-height: 1.3;
    color: #2a2820;
    letter-spacing: 0.04em;
    margin-bottom: 1.6rem;
}

.lede {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.15rem;
    line-height: 1.7;
    color: #2a2820;
    margin-bottom: 1.4rem;
}

.path-block p {
    margin-bottom: 1.2rem;
    color: #2a2820;
}

.caption {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 0.95rem;
    color: rgba(42, 40, 32, 0.65);
    margin-top: 0.6rem;
}

.inline-link {
    color: #d4726a;
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 114, 106, 0.35);
    padding-bottom: 1px;
    transition: color 0.4s ease, border-color 0.4s ease;
}

.inline-link:hover {
    color: #4a7a5a;
    border-bottom-color: #4a7a5a;
}

/* Principle list */
.principle-list {
    list-style: none;
    margin-top: 1.4rem;
    padding-left: 0;
}

.principle-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 1.4rem;
    line-height: 1.8;
}

.principle-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 14px;
    border-radius: 50%;
    background: #4a7a5a;
    transform: rotate(45deg);
    opacity: 0.85;
}

.principle-name {
    display: inline-block;
    font-family: "Cormorant Garamond", serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: #0a2e2e;
    margin-right: 0.5rem;
    letter-spacing: 0.04em;
}

.principle-desc {
    color: #2a2820;
}

/* Code blocks */
.code-block {
    font-family: "Inconsolata", "SFMono-Regular", Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    color: #f0ece4;
    background: #0a2e2e;
    padding: 1.6rem 1.8rem;
    border-radius: 2px;
    margin: 1.6rem 0;
    overflow-x: auto;
    box-shadow: 0 1px 0 rgba(10, 46, 46, 0.15),
                0 14px 40px -20px rgba(10, 46, 46, 0.35);
    white-space: pre;
    position: relative;
}

.code-block::before {
    /* subtle ripple notch on top edge */
    content: "";
    position: absolute;
    top: 10px;
    right: 14px;
    width: 6px;
    height: 10px;
    border-radius: 50%;
    background: rgba(212, 114, 106, 0.6);
    transform: rotate(45deg);
}

.code-block.install {
    background: #2a2820;
}

.code-block code {
    font-family: inherit;
    color: inherit;
    background: none;
}

.c-key    { color: #d4726a; }
.c-str    { color: #4a7a5a; }
.c-com    { color: rgba(240, 236, 228, 0.45); font-style: italic; }
.c-prompt { color: rgba(240, 236, 228, 0.45); user-select: none; }

.inline-code {
    font-family: "Inconsolata", monospace;
    font-size: 0.85em;
    color: #d4726a;
    background: rgba(212, 114, 106, 0.08);
    padding: 0.05em 0.35em;
    border-radius: 2px;
}

/* Modules grid (still meandering, never a hard grid) */
.modules {
    margin-top: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.module {
    display: grid;
    grid-template-columns: 28px 6.5rem 1fr;
    align-items: baseline;
    gap: 0.9rem;
    padding-left: 0.25rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(42, 40, 32, 0.08);
}

.module:last-child {
    border-bottom: none;
}

.mod-petal {
    display: inline-block;
    width: 10px;
    height: 18px;
    border-radius: 50%;
    background: #d4726a;
    transform: rotate(45deg);
    opacity: 0.8;
    transition: transform 0.6s ease, opacity 0.6s ease, background 0.6s ease;
}

.module:hover .mod-petal {
    transform: rotate(135deg);
    background: #4a7a5a;
    opacity: 1;
}

.mod-name {
    font-family: "Inconsolata", monospace;
    font-size: 0.95rem;
    color: #0a2e2e;
    letter-spacing: 0.05em;
}

.mod-desc {
    color: rgba(42, 40, 32, 0.78);
    font-size: 0.92rem;
    line-height: 1.7;
}

@media (max-width: 560px) {
    .module {
        grid-template-columns: 22px 1fr;
    }
    .module .mod-desc {
        grid-column: 2 / -1;
        margin-top: 0.2rem;
    }
}

/* ============================================================
   INK WASH transitions
   ============================================================ */
.ink-wash {
    height: 1px;
    margin: 5rem auto;
    max-width: 720px;
    background: linear-gradient(to right,
        rgba(240, 236, 228, 0) 0%,
        rgba(42, 40, 32, 0.18) 50%,
        rgba(240, 236, 228, 0) 100%);
    position: relative;
}

.ink-wash::before {
    content: "";
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 6px;
    height: 10px;
    border-radius: 50%;
    background: #d4726a;
    opacity: 0.5;
}

.pond + .ink-wash {
    margin: 0 auto;
    background: linear-gradient(to bottom,
        #0a2e2e 0%,
        #0a2e2e 30%,
        #f7f4ee 70%,
        #f7f4ee 100%);
    height: 4rem;
    max-width: none;
}

.pond + .ink-wash::before { display: none; }

/* ============================================================
   FOOTER — STILL WATER
   ============================================================ */
.still-water {
    background: #0a2e2e;
    padding: 7rem 2rem 5rem;
    text-align: center;
    color: #f0ece4;
    position: relative;
    overflow: hidden;
}

.still-water::before {
    /* faint horizon highlight */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom,
        rgba(240, 236, 228, 0.04) 0%,
        rgba(240, 236, 228, 0) 100%);
    pointer-events: none;
}

.still-line {
    width: min(360px, 60%);
    height: 1px;
    background: rgba(240, 236, 228, 0.2);
    margin: 0 auto 2.5rem;
}

.still-text {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-style: italic;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    color: rgba(240, 236, 228, 0.85);
    margin-bottom: 0.8rem;
}

.still-meta {
    font-family: "Karla", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(240, 236, 228, 0.4);
}

/* ============================================================
   Reduced motion — keep it still
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .ripple,
    .lotus .petal,
    .lotus .petal-inner,
    .lotus-core,
    .scroll-line {
        animation: none !important;
    }
    .path-block {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
