/* Ujjawal Softwares — one stylesheet, no build step, no third-party requests.
   System font stacks only: a coming-soon page should load from one host and nothing else. */

:root {
    --paper: #f5f3f0;
    --paper-raised: #fffefc;
    --ink: #1c1d22;
    --ink-soft: #545660;
    --rule: #e0dcd6;
    --accent: #b5532c;
    --accent-soft: #f6e0d5;
    --calm: #3a67a0;
    --calm-soft: #dfe7f3;
    --shadow: 0 1px 2px rgb(29 27 24 / 6%), 0 8px 24px rgb(29 27 24 / 6%);
    --radius: 14px;
    --measure: 68ch;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono",
        monospace;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #111215;
        --paper-raised: #1a1b1f;
        --ink: #eceae6;
        --ink-soft: #a9abb3;
        --rule: #2b2c31;
        --accent: #ee8a5e;
        --accent-soft: #3a2219;
        --calm: #8db4e6;
        --calm-soft: #1a2636;
        --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 30%);
        color-scheme: dark;
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding-inline: var(--gutter);
    background: var(--paper);
    color: var(--ink);
    font: 400 1.0625rem/1.6 var(--sans);
}

h1,
h2,
h3 {
    line-height: 1.15;
    letter-spacing: -0.01em;
}

a {
    color: var(--accent);
}

b {
    font-weight: 650;
}

.skip {
    position: absolute;
    left: -999px;
}

.skip:focus {
    left: var(--gutter);
    top: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--ink);
    color: var(--paper);
    border-radius: 6px;
}

/* Header */

.top {
    max-width: 72rem;
    margin: 0 auto;
    padding-block: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink);
    text-decoration: none;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.badge {
    font: 600 0.75rem/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 999px;
}

main {
    max-width: 72rem;
    margin: 0 auto;
}

/* Hero */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
    padding-block: clamp(1.25rem, 3.5vw, 2.75rem) clamp(2rem, 5vw, 4rem);
}

.eyebrow,
.card-kicker {
    font: 600 0.8rem/1.2 var(--mono);
    color: var(--calm);
    letter-spacing: 0.04em;
    margin: 0 0 1rem;
}

h1 {
    font-size: clamp(2.1rem, 5.2vw, 3.6rem);
    margin: 0 0 1.25rem;
}

.lede {
    font-size: 1.15rem;
    color: var(--ink-soft);
    max-width: var(--measure);
    margin: 0 0 1.75rem;
}

.hero-facts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hero-facts li {
    font-size: 0.9rem;
    padding: 0.45rem 0.8rem;
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--ink-soft);
}

.hero-facts b {
    color: var(--ink);
    margin-right: 0.3rem;
}

/* The session tree illustration */

.tree {
    margin: 0;
    padding: 1.25rem;
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tree svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

.tree text {
    font: 600 13px var(--mono);
    text-anchor: middle;
    fill: var(--ink);
}

/* The page's divider colour is too faint for lines that carry meaning, so the
   edges take the softer text colour instead, at a reduced opacity. */
.edges path {
    fill: none;
    stroke: var(--ink-soft);
    stroke-opacity: 0.55;
    stroke-width: 2;
}

/* One 8-second story, looped: the rule flows down level by level, a helper's
   question travels up to you, your answer travels back down, and the helper
   carries on. Every motion shares the cycle so the steps stay in order. */
.pulse {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 14 400;
    stroke-dashoffset: 14;
    opacity: 0;
    animation-duration: 8s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.pulse.down {
    stroke: var(--accent);
    animation-name: rule-down;
}

.pulse.down.deep {
    animation-name: rule-down-deep;
}

.pulse.up {
    stroke: var(--calm);
    animation-name: question-up;
}

.pulse.answer {
    stroke: var(--calm);
    animation-name: answer-down;
}

@keyframes rule-down {
    0% { stroke-dashoffset: 14; opacity: 0; }
    3% { opacity: 1; }
    16% { stroke-dashoffset: -160; opacity: 1; }
    18%, 100% { stroke-dashoffset: -160; opacity: 0; }
}

@keyframes rule-down-deep {
    0%, 15% { stroke-dashoffset: 14; opacity: 0; }
    18% { opacity: 1; }
    30% { stroke-dashoffset: -100; opacity: 1; }
    32%, 100% { stroke-dashoffset: -100; opacity: 0; }
}

@keyframes question-up {
    0%, 38% { stroke-dashoffset: 14; opacity: 0; }
    40% { opacity: 1; }
    56% { stroke-dashoffset: -200; opacity: 1; }
    58%, 100% { stroke-dashoffset: -200; opacity: 0; }
}

@keyframes answer-down {
    0%, 62% { stroke-dashoffset: 14; opacity: 0; }
    64% { opacity: 1; }
    78% { stroke-dashoffset: -200; opacity: 1; }
    80%, 100% { stroke-dashoffset: -200; opacity: 0; }
}

.node.small text {
    font-size: 12px;
}

.node.working text {
    animation: shimmer 2.4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.node.asker rect {
    animation: asker-box 8s infinite;
}

.node.asker .busy {
    animation: show-before-question 8s infinite;
}

.node.asker .ask {
    fill: var(--calm);
    animation: show-until-answer 8s infinite;
}

@keyframes show-before-question {
    0%, 30% { opacity: 1; }
    33%, 100% { opacity: 0; }
}

.node.asker .allowed {
    fill: var(--calm);
    animation: show-after-answer 8s infinite;
}

@keyframes asker-box {
    0%, 30% { fill: var(--paper); stroke: var(--ink-soft); }
    34%, 78% { fill: var(--calm-soft); stroke: var(--calm); }
    82%, 100% { fill: var(--paper); stroke: var(--calm); }
}

@keyframes show-until-answer {
    0%, 30% { opacity: 0; }
    34%, 78% { opacity: 1; }
    80%, 100% { opacity: 0; }
}

@keyframes show-after-answer {
    0%, 78% { opacity: 0; }
    82%, 96% { opacity: 1; }
    100% { opacity: 0; }
}

.node rect {
    fill: var(--paper);
    stroke: var(--ink-soft);
    stroke-width: 1.5;
}

.node.root rect {
    fill: var(--ink);
    stroke: var(--ink);
}

.node.root text {
    fill: var(--paper);
}

.node.waiting rect {
    fill: var(--calm-soft);
    stroke: var(--calm);
}

.node.working text {
    fill: var(--ink-soft);
}

.node.done rect {
    stroke: var(--calm);
    stroke-dasharray: 4 3;
}

.node.done text {
    fill: var(--calm);
}

.pill rect {
    fill: var(--accent-soft);
    stroke: var(--accent);
}

.pill text {
    font-size: 11px;
    fill: var(--accent);
}

.tree figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* The two pillars */

.pillars {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.card {
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    margin: 0 0 0.9rem;
}

.card > p {
    color: var(--ink-soft);
    margin: 0 0 1.25rem;
}

.ticks {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.8rem;
}

.ticks li {
    position: relative;
    padding-left: 1.6rem;
    font-size: 0.97rem;
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 2px;
    background: var(--accent);
    transform: rotate(45deg);
}

/* Principles */

.principles {
    padding-block: clamp(2rem, 5vw, 3.5rem);
    border-top: 1px solid var(--rule);
}

.principles > h2,
.status > h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin: 0 0 1.5rem;
}

.principle-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.principle-list h3 {
    font-size: 1.05rem;
    margin: 0.6rem 0 0.4rem;
}

.principle-list p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.num {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font: 700 0.9rem/1 var(--mono);
    color: var(--calm);
    background: var(--calm-soft);
}

/* Status */

.status {
    padding-block: clamp(2rem, 5vw, 3.5rem);
    border-top: 1px solid var(--rule);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.status-grid > div {
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

.status-grid h3 {
    font: 600 0.85rem/1.2 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.75rem;
}

.status-grid ul {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.4rem;
    font-size: 0.97rem;
}

.done {
    color: var(--calm);
}

.next {
    color: var(--accent);
}

/* Footer */

.foot {
    max-width: 72rem;
    margin: 0 auto;
    padding-block: 2rem 3rem;
    border-top: 1px solid var(--rule);
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.foot p {
    margin: 0 0 0.35rem;
}

.small {
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

/* Narrow screens: stack every grid. */

@media (max-width: 860px) {
    .hero,
    .pillars,
    .status-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .principle-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .principle-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Without motion the tree holds one still frame: the helper is shown asking. */
@media (prefers-reduced-motion: reduce) {
    .pulse,
    .node.working text,
    .node.asker rect,
    .node.asker text {
        animation: none;
    }

    .pulse {
        opacity: 0;
    }

    .node.asker rect {
        fill: var(--calm-soft);
        stroke: var(--calm);
    }

    .node.asker .busy,
    .node.asker .allowed {
        opacity: 0;
    }
}
