/* yeSync landing page. Colors come straight from the logo: mustard field, brown ink. */

:root {
    --mustard: #F8AE2F;
    --mustard-soft: #FBD48A;
    --ink: #382D2A;
    --ink-soft: #6E5D57;
    --line: rgba(56, 45, 42, 0.16);
    --paper: #FFFFFF;
    --stone: #F6F3F1;

    --gutter: clamp(16px, 4vw, 6rem);
    --wrap: 75rem;
    --font: "Archivo", ui-sans-serif, system-ui, sans-serif;
}

/* Everything is sized in rem, so on large monitors the whole page grows with the viewport
   instead of leaving the hero's panels small at the edges of a wide screen. */
html:has(body.landing) { font-size: clamp(100%, 0.45vw + 9.5px, 137.5%); }

.landing {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

:where(.landing) a { color: inherit; }

.landing :focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

.wrap {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* ---------- buttons ---------- */

.y-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.35rem;
    border: 0;
    border-radius: 6px;
    font: 600 1rem/1 var(--font);
    font-stretch: 110%;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}
.y-btn:active { transform: translateY(1px); }
.y-btn:disabled { opacity: 0.6; cursor: wait; }

.y-btn--ink { background: var(--ink); color: var(--mustard); }
.y-btn--ink:hover { background: #4A3D39; }

.y-btn--mustard { background: var(--mustard); color: var(--ink); }
.y-btn--mustard:hover { background: var(--mustard-soft); }

.y-btn--quiet { background: transparent; color: var(--ink); padding-inline: 0.6rem; }
.y-btn--quiet:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- stage ---------- */

/* founding member offer, shown until the campaign ends */
.offer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.5rem;
    padding: 0.6rem var(--gutter);
    padding-right: calc(var(--gutter) + 2rem);
    position: relative;
    background: var(--ink);
    color: #F4EADC;
    font-size: 0.95rem;
}
.offer p { margin: 0; }
.offer__text strong { color: var(--mustard); font-weight: 700; font-stretch: 105%; }
.offer__code {
    margin-inline: 0.15rem;
    padding: 0.1rem 0.5rem;
    border: 1.5px dashed var(--mustard);
    border-radius: 4px;
    background: none;
    color: var(--mustard);
    font: 700 0.95rem/1.3 var(--font);
    font-stretch: 110%;
    letter-spacing: 0.04em;
    cursor: copy;
}
.offer__code:hover { background: rgba(248, 174, 47, 0.12); }
.offer__terms { margin-left: 0.35rem; color: #CFC1B4; font-size: 0.85em; text-decoration: underline; text-underline-offset: 2px; }
.offer__terms:hover { color: #F4EADC; }
.offer__time {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
    color: #CFC1B4;
}
.offer__ends {
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    background: var(--mustard);
    color: var(--ink);
    font-weight: 800;
    font-stretch: 112%;
    white-space: nowrap;
    animation: offer-blink 1.1s steps(1, end) infinite;
}
@keyframes offer-blink {
    50% { background: transparent; color: var(--mustard); box-shadow: inset 0 0 0 1.5px var(--mustard); }
}
.offer__close {
    position: absolute;
    top: 50%;
    right: calc(var(--gutter) - 0.5rem);
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    border: 0;
    background: none;
    color: #CFC1B4;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.offer__close:hover { color: #F4EADC; }
.offer.is-hidden, .offer-note.is-hidden { display: none; }

@media (max-width: 640px) {
    .offer { font-size: 0.85rem; }
    .offer__time { margin-left: 0; }
}

.stage {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--mustard);
    overflow: hidden;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem var(--gutter);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    font-weight: 800;
    font-stretch: 115%;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}
.brand img { width: 2.4rem; height: 2.4rem; border-radius: 0.5rem; }

.topnav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.topnav__links { display: none; }
.topnav__links a {
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    font-weight: 500;
}
.topnav__links a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 900px) {
    .topnav__links { display: flex; margin-right: 1rem; }
}

.stage__copy {
    display: grid;
    gap: 1.25rem 3rem;
    padding: clamp(16px, 4vh, 72px) var(--gutter) clamp(16px, 3vh, 56px);
    align-items: end;
}

.stage__title {
    margin: 0;
    font-size: clamp(2.6rem, min(6.6vw, 10.5vh), 9rem);
    font-weight: 800;
    font-stretch: 125%;
    line-height: 0.92;
    letter-spacing: -0.035em;
}
.stage__title span { display: block; }

.stage__lede {
    max-width: 34ch;
    margin: 0 0 1.25rem;
    font-size: 1.125rem;
}

.stage__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media (min-width: 1000px) {
    .stage__copy { grid-template-columns: minmax(0, 1fr) 22rem; }
    .stage__aside { padding-bottom: 0.6rem; }
}

/* ---------- the yard: a source on the left, stores stacked on the right ---------- */

.yard {
    --sheet-w: clamp(130px, 28vw, 40rem);
    --shop-w: clamp(150px, 31vw, 44rem);
    --row-h: clamp(26px, 3.6vh, 3rem);

    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: var(--sheet-w) 1fr var(--shop-w);
    align-items: center;
    padding-bottom: clamp(16px, 3vh, 40px);
    font-size: clamp(0.75rem, calc(var(--row-h) * 0.55), 1.5rem);
}

.yard__source { grid-column: 1; position: relative; z-index: 1; }
.yard__stores {
    grid-column: 3;
    display: grid;
    gap: clamp(12px, 2vh, 24px);
    position: relative;
    z-index: 1;
}

/* lanes are drawn by landing.js from the row positions */
.yard__lanes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}
.yard__lanes path {
    fill: none;
    stroke: var(--ink);
    stroke-width: 1.5;
}
.yard__lanes .lane { opacity: 0.22; }
.yard__lanes .trail { opacity: 0; stroke-width: 2; transition: opacity 0.7s ease; }
.yard__lanes .trail.is-on { opacity: 0.7; transition: none; }

.yard__status {
    position: absolute;
    top: 0;
    left: var(--sheet-w);
    right: var(--shop-w);
    text-align: center;
    font-weight: 600;
    font-stretch: 105%;
    white-space: nowrap;
}

.sheet, .shop {
    display: grid;
    align-items: stretch;
    height: var(--row-h);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.sheet { grid-template-columns: 2.2em 1fr 4.2em; }
.shop  { grid-template-columns: calc(var(--row-h) * 0.62 + 1.2em) 1fr 5.5em; }

.sheet > *, .shop > * {
    display: flex;
    align-items: center;
    min-width: 0;
    padding-inline: 0.7em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sheet > * + * { border-left: 1px solid var(--line); }

.sheet__n {
    justify-content: center;
    padding-inline: 0;
    background: var(--stone);
    color: var(--ink-soft);
    font-size: 0.85em;
}

.sheet__sku {
    font-stretch: 80%;
    letter-spacing: 0.01em;
}
.sheet__sku span { overflow: hidden; text-overflow: ellipsis; }

.sheet__qty, .shop__avail {
    justify-content: flex-end;
    font-stretch: 75%;
    font-weight: 600;
    font-size: 1.15em;
    font-variant-numeric: tabular-nums;
}

.sheet__qty { position: relative; }
.sheet__qty.is-editing {
    outline: 2px solid var(--ink);
    outline-offset: -2px;
    background: #FFF7E6;
}
.sheet__qty.is-editing::after {
    content: "";
    width: 1.5px;
    height: 1.1em;
    margin-left: 1px;
    background: var(--ink);
    animation: caret 0.8s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.shop__name { font-weight: 500; }

.shop__avail.is-out { color: var(--ink-soft); font-weight: 500; font-stretch: 85%; font-size: 0.95em; }
.shop__avail.is-fresh { animation: fresh 1.6s ease-out; }
@keyframes fresh {
    0%   { background: var(--mustard); }
    100% { background: transparent; }
}

.sheet__end { display: none !important; }

/* header rows */
.sheet--head, .shop--head {
    height: calc(var(--row-h) * 0.85);
    font-weight: 700;
    border-bottom: 1.5px solid var(--ink);
}
.sheet--head > *:not(.sheet__n) { font-stretch: 100%; letter-spacing: 0; }
.sheet--head .sheet__qty, .shop--head .shop__avail { font-size: 1em; font-stretch: 100%; font-weight: 700; }

.yard__tab {
    display: inline-block;
    padding: 0.45em 0.9em;
    border-radius: 6px 6px 0 0;
    background: var(--ink);
    color: var(--mustard);
    font-weight: 600;
    font-stretch: 105%;
    white-space: nowrap;
    transition: opacity 0.25s ease;
}
.yard__source .yard__tab { border-top-left-radius: 0; }
.yard__tab small { font-weight: 400; opacity: 0.75; margin-left: 0.4em; }

/* the same source, rendered as a JSONL stream */
.sheet { transition: opacity 0.25s ease; }
.yard.is-swapping .sheet, .yard.is-swapping [data-source-label] { opacity: 0; }

.yard.is-jsonl .sheet {
    grid-template-columns: 2.2em auto auto 1fr;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.86em;
}
.yard.is-jsonl .sheet > * + * { border-left: 0; }
.yard.is-jsonl .sheet > *:not(.sheet__n) { padding-inline: 0; }
.yard.is-jsonl .sheet__n { margin-right: 0.8em; }
.yard.is-jsonl .sheet__sku { font-stretch: 100%; letter-spacing: 0; }
.yard.is-jsonl .sheet__sku::before { content: '{"sku":"'; color: var(--ink-soft); }
.yard.is-jsonl .sheet__sku::after  { content: '",'; color: var(--ink-soft); }
.yard.is-jsonl .sheet__qty {
    justify-content: flex-start;
    font-size: 1em;
    font-stretch: 100%;
    font-weight: 700;
    outline-offset: 1px;
}
.yard.is-jsonl .sheet__qty::before { content: '"qty":'; color: var(--ink-soft); font-weight: 400; }
.yard.is-jsonl .sheet__qty.is-editing { background: transparent; }
.yard.is-jsonl .sheet__end { display: flex !important; color: var(--ink-soft); }
.yard.is-jsonl .sheet--head > * { visibility: hidden; }

/* the same source, rendered as an ERP export */
.yard.is-erp .sheet { grid-template-columns: 0 1fr 4.6em; }
.yard.is-erp .sheet__n { visibility: hidden; border: 0 !important; }
.yard.is-erp .sheet--head { background: var(--stone); }

/* product thumbnails: flat shapes, one per product */
.thumb {
    padding: 0 !important;
    justify-content: center;
}
.thumb i {
    display: block;
    width: calc(var(--row-h) * 0.62);
    height: calc(var(--row-h) * 0.62);
    border-radius: 4px;
    background: var(--stone);
    position: relative;
}
:where(.thumb i)::before {
    content: "";
    position: absolute;
    inset: 18%;
    background: var(--ink);
}
.t-dress::before  { clip-path: polygon(35% 0, 65% 0, 70% 30%, 100% 100%, 0 100%, 30% 30%); background: #B5533C; }
.t-boot::before   { clip-path: polygon(10% 0, 45% 0, 45% 55%, 100% 70%, 100% 100%, 10% 100%); }
.t-shirt::before  { clip-path: polygon(30% 0, 70% 0, 100% 25%, 85% 40%, 78% 32%, 78% 100%, 22% 100%, 22% 32%, 15% 40%, 0 25%); background: #D9C7A3; }
.t-tote::before   { clip-path: polygon(0 30%, 25% 30%, 25% 0, 75% 0, 75% 30%, 100% 30%, 100% 100%, 0 100%, 0 30%, 35% 30%, 35% 12%, 65% 12%, 65% 30%, 0 30%); background: #6F7A4A; }

/* a changed number riding its lane; landing.js sets --x and --y */
.token {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    padding: 0.28em 0.6em;
    border-radius: 999px;
    background: var(--ink);
    color: var(--mustard);
    font-weight: 700;
    font-stretch: 75%;
    font-size: 1.05em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    transform: translate(var(--x, 0), var(--y, 0)) translate(-50%, -50%);
    scale: 0.4;
    opacity: 0;
    transition: scale 0.25s cubic-bezier(.3, 1.6, .5, 1), opacity 0.15s ease;
    pointer-events: none;
}
.token.is-waiting { scale: 1; opacity: 1; }
.token.is-riding { transition: none; }

@media (max-width: 640px) {
    .sheet { grid-template-columns: 0 1fr 3em; }
    .sheet__n { visibility: hidden; border: 0; }
    .shop { grid-template-columns: 1fr; }
    .shop .thumb, .shop .shop__name { display: none; }
    .shop--head .shop__avail { font-size: 0.85em; }
    .yard__status { font-size: 0.8em; white-space: normal; line-height: 1.1; }
}

/* ---------- sections ---------- */

.section { padding-block: clamp(72px, 12vw, 140px); }
.section--stone { background: var(--stone); }

.section__title {
    max-width: 18ch;
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    font-weight: 800;
    font-stretch: 120%;
    line-height: 1;
    letter-spacing: -0.03em;
}
.section__lede { max-width: 52ch; margin: 0; color: var(--ink-soft); font-size: 1.125rem; }

/* how it works */
.setup {
    list-style: none;
    margin: clamp(48px, 7vw, 80px) 0 0;
    padding: 0;
    display: grid;
    gap: 2.5rem;
    counter-reset: step;
}
.setup__step { position: relative; padding-top: 3.25rem; counter-increment: step; }
.setup__step::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--mustard);
    font-weight: 800;
    font-stretch: 110%;
}
.setup__step h3 { margin: 0 0 0.4rem; font-size: 1.3rem; font-weight: 700; font-stretch: 108%; letter-spacing: -0.01em; }
.setup__step p  { margin: 0; max-width: 34ch; color: var(--ink-soft); }

@media (min-width: 800px) {
    .setup { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
    .setup__step::after {
        content: "";
        position: absolute;
        top: 1.125rem;
        left: 3rem;
        right: -2rem;
        height: 1.5px;
        background: var(--ink);
        opacity: 0.22;
    }
    .setup__step:last-child::after { display: none; }
}

.demo {
    margin-top: clamp(56px, 8vw, 96px);
    max-width: 960px;
}
.demo__frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: var(--ink);
}
.demo__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.demo figcaption { margin-top: 0.75rem; color: var(--ink-soft); font-size: 0.95rem; }

/* sources */
.section--ink { background: var(--ink); color: #F4EADC; }
.section--ink .section__title { color: var(--mustard); }
.section--ink .section__lede { color: #CFC1B4; }

.sources { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) {
    .sources { grid-template-columns: 5fr 7fr; gap: 4rem; }
}

.sources__map {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(40px, 0.8fr) minmax(0, 1fr);
}
/* equal rows without gaps, so lane ends land on each item's middle */
.sources__list {
    display: grid;
    grid-auto-rows: 1fr;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sources__list li { margin-block: 0.6rem; align-self: center; }
.source {
    display: grid;
    padding: 0.85rem 1rem;
    border: 1.5px dashed rgba(244, 234, 220, 0.35);
    border-radius: 8px;
}
.source strong { font-weight: 700; font-stretch: 108%; }
.source span { color: #B9AA9C; font-size: 0.9rem; }
.source.is-live { border: 1.5px solid var(--mustard); background: var(--mustard); color: var(--ink); }
.source.is-live span { color: var(--ink); }

.sources__lanes { width: 100%; height: 100%; overflow: visible; }
.sources__lanes path {
    fill: none;
    stroke: rgba(244, 234, 220, 0.35);
    stroke-width: 1.5;
    stroke-dasharray: 4 5;
    vector-effect: non-scaling-stroke;
}
.sources__lanes path.is-live { stroke: var(--mustard); stroke-width: 2.5; stroke-dasharray: none; }

.store {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
}
.store img { width: 26px; height: 26px; flex: none; }
.store strong { font-weight: 700; font-stretch: 108%; line-height: 1.2; }

/* pricing */
.plans {
    display: grid;
    gap: 1rem;
    margin-top: clamp(40px, 6vw, 64px);
}
@media (min-width: 900px) {
    .plans { grid-template-columns: repeat(3, 1fr); }
}
.offer-note {
    margin-top: clamp(32px, 5vw, 48px);
    padding: 1.1rem 1.4rem;
    border-radius: 8px;
    background: var(--ink);
    color: #F4EADC;
}
.offer-note strong { color: var(--mustard); font-weight: 700; font-stretch: 108%; }
.offer-note p { margin: 0.3rem 0 0; color: #CFC1B4; }
.offer-note b { color: #F4EADC; letter-spacing: 0.04em; }
.offer-note a { color: #CFC1B4; text-decoration: underline; text-underline-offset: 2px; }
.offer-note a:hover { color: #F4EADC; }
.offer-note + .plans { margin-top: 1rem; }

.plan {
    padding: 1.75rem 1.75rem 2rem;
    background: var(--paper);
    border-radius: 8px;
    border-top: 6px solid var(--mustard);
}
.plan .card-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    font-stretch: 115%;
    letter-spacing: -0.02em;
}
.plan p { color: var(--ink-soft); }
.plan .text-4xl { font-stretch: 85%; letter-spacing: -0.02em; }
.plan ul { padding: 0; list-style: none; }

.plans__more {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 2rem;
}
.plans__more p { margin: 0; max-width: 56ch; }

/* questions */
.faq { margin-top: clamp(32px, 5vw, 56px); max-width: 820px; border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
    cursor: pointer;
    list-style: none;
    font-size: 1.2rem;
    font-weight: 600;
    font-stretch: 105%;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.4rem; max-width: 62ch; color: var(--ink-soft); }

/* contact + footer, in the logo's colors */
.closing {
    background: var(--ink);
    color: #F4EADC;
}
.closing .section__title { color: var(--mustard); }
.closing .section__lede { color: #CFC1B4; }

.closing__grid { display: grid; gap: 3rem; }
@media (min-width: 900px) {
    .closing__grid { grid-template-columns: 1fr 1fr; gap: 5rem; }
}
.closing__install { margin-top: 2rem; }

.contact { display: grid; gap: 1rem; }
.contact label { display: grid; gap: 0.4rem; font-weight: 500; }
.contact input, .contact textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid transparent;
    border-radius: 6px;
    background: #FFFBF4;
    color: var(--ink);
    font: 400 1.05rem/1.4 var(--font);
}
.contact textarea { resize: vertical; min-height: 7.5rem; }
.contact input:focus, .contact textarea:focus { outline: none; border-color: var(--mustard); }
.contact .y-btn { justify-self: start; }
/* DaisyUI treats any [data-theme] element as a theme root and paints it; Turnstile needs the attribute */
.contact .cf-turnstile { justify-self: start; background: none; }

.colophon {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding-block: 2rem 2.5rem;
    border-top: 1px solid rgba(244, 234, 220, 0.15);
    color: #B9AA9C;
    font-size: 0.95rem;
}
.colophon nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.colophon a { text-decoration: none; }
.colophon a:hover { color: #F4EADC; text-decoration: underline; text-underline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
    .landing *, .landing *::before, .landing *::after {
        animation: none !important;
        transition: none !important;
    }
}
