/* About Us + legal pages (Terms, Cancellation & Refund, Privacy).
   Ported from the design team's export and reworked to scale smoothly between phone (400px) and desktop (1440px):
   clamp(MIN, calc(MIN + (MAX - MIN) * (100vw - 400px) / 1040), MAX). The value cards come from base.css. */

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, calc(8px + 2 * (100vw - 400px) / 1040), 10px) clamp(16px, calc(16px + 4 * (100vw - 400px) / 1040), 20px);
    border: 1px solid var(--sell-bright);
    border-radius: 48px;
    background: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: clamp(13px, calc(13px + 3 * (100vw - 400px) / 1040), 16px);
    line-height: 1;
    letter-spacing: -0.025em;
    color: #525252;
}

.wc-n {
    font-family: var(--font-serif);
    font-size: clamp(24px, calc(24px + 6 * (100vw - 400px) / 1040), 30px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--sell-bright);
}

/* ================= ABOUT ================= */

.ab-h2 {
    font-weight: 600;
    font-size: clamp(24px, calc(24px + 26 * (100vw - 400px) / 1040), 50px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--heading);
    text-align: center;
}

.ab-h2.lh14 {
    line-height: 1.4;
    color: var(--title);
}

.ab-p25 {
    font-size: clamp(12px, calc(12px + 13 * (100vw - 400px) / 1040), 25px);
    line-height: 1.6;
    letter-spacing: -0.025em;
    color: var(--muted);
    text-align: center;
}

.ab-p20 {
    font-size: clamp(12px, calc(12px + 8 * (100vw - 400px) / 1040), 20px);
    line-height: 1.6;
    letter-spacing: -0.025em;
    color: var(--muted-2);
    text-align: center;
}

.ab-sec-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(8px, calc(8px + 3 * (100vw - 400px) / 1040), 11px);
    width: 100%;
    max-width: 1344px;
}

/* hero: the story copy, and SELL + BUY waving hello (the bots from the home page, js/landing.js) */
.ab-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(16px, calc(16px + 24 * (100vw - 400px) / 1040), 40px);
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin: 0 auto;
    padding: clamp(32px, calc(32px + 24 * (100vw - 400px) / 1040), 56px) var(--gutter) 0;
}

.ab-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    max-width: 789px;
}

.ab-title {
    font-weight: 600;
    font-size: clamp(32px, calc(32px + 48 * (100vw - 400px) / 1040), 80px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--heading);
}

.ab-title .serif-i {
    font-weight: 500;
}

.ab-lead {
    font-size: clamp(13px, calc(13px + 12 * (100vw - 400px) / 1040), 25px);
    line-height: 1.6;
    letter-spacing: -0.025em;
    color: var(--muted);
}

/* 52 x 30 bot pixels: two 23u bots, 3u apart, with a little room for hops and speech bubbles */
.ab-bots {
    position: relative;
    flex: none;
    width: min(420px, 100%);
    aspect-ratio: 52 / 30;
}

.ab-bots .scene {
    --u: calc(100cqw / 52);
    --edge: 1.5;
    --gap: 3;
    --ground: 1;
}

/* why we exist + the founder */
.ab-why {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(24px, calc(24px + 9 * (100vw - 400px) / 1040), 33px);
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin: 0 auto;
    padding: clamp(64px, calc(64px + 40 * (100vw - 400px) / 1040), 104px) var(--gutter) 0;
}

.ab-why-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(16px, calc(16px + 8 * (100vw - 400px) / 1040), 24px);
    max-width: 1066px;
}

.ab-why-head .ab-h2 {
    margin-bottom: -8px;
}

.founder {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.founder-img {
    flex: none;
    width: 435px;
    aspect-ratio: 435 / 327;
    border-radius: 47px;
    overflow: hidden;
}

.founder-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 26%;   /* Figma's frame is landscape: keep the hair and face */
    transition: transform 1.2s var(--ease-out);
}

.founder-img:hover img {
    transform: scale(1.05);
}

.founder-copy {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, calc(16px + 8 * (100vw - 400px) / 1040), 24px);
    max-width: 652px;
}

.founder-name {
    font-weight: 600;
    font-size: clamp(28px, calc(28px + 32 * (100vw - 400px) / 1040), 60px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--heading);
}

.founder-role {
    font-size: clamp(16px, calc(16px + 9 * (100vw - 400px) / 1040), 25px);
    line-height: 1.6;
    letter-spacing: -0.025em;
    color: var(--muted);
}

.founder-quote {
    margin: 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(19px, calc(19px + 21 * (100vw - 400px) / 1040), 40px);
    line-height: 1.4;
    letter-spacing: -0.03em;
    color: var(--sell-bright);
}

.ab-bg-logo {
    position: absolute;
    right: -42px;
    top: 548px;
    z-index: 0;
    width: 733px;
    aspect-ratio: 733 / 538;
    opacity: 0.045;
    filter: grayscale(1) brightness(0.4);
    pointer-events: none;
}

.ab-bg-logo img {
    width: 100%;
    height: 100%;
}

/* what we believe (value cards from base.css) */
.ab-believe {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(16px, calc(16px + 24 * (100vw - 400px) / 1040), 40px);
    padding: clamp(64px, calc(64px + 151 * (100vw - 400px) / 1040), 215px) var(--gutter) 0;
}

.ab-believe .ab-sec-head {
    max-width: 1095px;
}

/* how we work */
.ab-work {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, calc(24px + 24 * (100vw - 400px) / 1040), 48px);
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin: 0 auto;
    padding: clamp(64px, calc(64px + 64 * (100vw - 400px) / 1040), 128px) var(--gutter) 0;
}

.work-grid {
    display: grid;
    grid-template-columns: 282fr 309fr 298fr 407fr;
    gap: 16px;
}

.wcard {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 171px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--sell-bright);
    border-radius: clamp(16px, calc(16px + 6 * (100vw - 400px) / 1040), 22px);
    transition: transform 0.5s var(--ease-spring), box-shadow 0.4s var(--ease-out), background 0.4s, opacity 1s var(--ease-out);
}

.wcard:hover {
    transform: translateY(-6px);
    background: #fbfbff;
    box-shadow: 5px 5px 0 var(--sell-bright);
}

.wc-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wcard img {
    transition: transform 0.6s var(--ease-spring);
}

.wcard:hover .wc-top img {
    transform: rotate(-12deg) scale(1.15);
}

.wcard p {
    font-weight: 500;
    font-size: clamp(18px, calc(18px + 7 * (100vw - 400px) / 1040), 25px);
    line-height: 1.4;
    color: #626262;
}

/* team */
.ab-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(16px, calc(16px + 8 * (100vw - 400px) / 1040), 24px);
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin: 0 auto;
    padding: clamp(64px, calc(64px + 53 * (100vw - 400px) / 1040), 117px) var(--gutter) 0;
}

.ab-team .ab-sec-head {
    gap: 0;
}

.team-photo {
    width: 100%;
    aspect-ratio: 1344 / 394;
    border-radius: clamp(16px, calc(16px + 24 * (100vw - 400px) / 1040), 40px);
    overflow: hidden;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 78%;   /* Figma's strip is very wide: keep the faces */
    transform: scale(1.08);
    transition: transform 1.6s var(--ease-out);
}

.team-photo.is-in img {
    transform: scale(1);
}

.team-cap {
    margin-top: clamp(-16px, calc(-8px - 8 * (100vw - 400px) / 1040), -8px);
    font-size: clamp(12px, calc(12px + 13 * (100vw - 400px) / 1040), 25px);
    line-height: 1.6;
    letter-spacing: -0.025em;
    color: #727171;
    text-align: center;
}

.team-cap b {
    font-weight: 600;
    color: #3e3b3b;
}

/* ================= LEGAL ================= */

.lg-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin: 0 auto;
    padding: clamp(32px, calc(32px + 24 * (100vw - 400px) / 1040), 56px) var(--gutter) 0;
}

.lg-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    max-width: 860px;
}

.lg-title {
    font-weight: 600;
    font-size: clamp(34px, calc(34px + 46 * (100vw - 400px) / 1040), 80px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--heading);
}

.lg-title .serif-i {
    font-weight: 500;
}

.lg-lead {
    max-width: 820px;
    font-size: clamp(14px, calc(14px + 8 * (100vw - 400px) / 1040), 22px);
    line-height: 1.6;
    letter-spacing: -0.025em;
    color: var(--muted);
}

.lg-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lg-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: #f3f3f6;
    font-size: clamp(12px, calc(12px + 2 * (100vw - 400px) / 1040), 14px);
    color: #6d6d6d;
}

.lg-meta span::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sell-bright);
}

/* the two floating SELL / BUY stat cards beside the title */
.lg-mark {
    flex: none;
    width: 240px;
    opacity: 0.9;
}

.lg-mark-card {
    position: relative;
    padding: 28px 24px;
    background: #fff;
    border: 1px solid var(--sell);
    border-radius: 26px;
    box-shadow: 6px 6px 0 var(--sell);
    animation: card-float 6s ease-in-out infinite;
}

.lg-mark-card.red {
    margin: -14px 0 0 40px;
    border-color: var(--buy);
    box-shadow: 6px 6px 0 var(--buy);
    animation-delay: -2s;
}

.lg-mark-card b {
    display: block;
    font-weight: 600;
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--sell);
}

.lg-mark-card.red b {
    color: var(--buy);
}

.lg-mark-card small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

@keyframes card-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

/* three key facts */
.lg-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, calc(10px + 6 * (100vw - 400px) / 1040), 16px);
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin: clamp(32px, calc(32px + 40 * (100vw - 400px) / 1040), 72px) auto 0;
    padding: 0 var(--gutter);
}

.hl-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: clamp(14px, calc(14px + 6 * (100vw - 400px) / 1040), 20px);
    background: #fff;
    border: 1px solid var(--hairline);
    border-radius: clamp(18px, calc(18px + 12 * (100vw - 400px) / 1040), 30px);
    box-shadow: 5px 5px 0 var(--hairline);
    transition: box-shadow 0.4s var(--ease-out), border-color 0.4s, transform 0.5s var(--ease-spring), opacity 1s var(--ease-out);
}

.hl-card:hover {
    transform: translateY(-4px);
    border-color: var(--sell-bright);
    box-shadow: 7px 7px 0 var(--sell-bright);
}

.hl-card.is-red:hover {
    border-color: var(--buy);
    box-shadow: 7px 7px 0 var(--buy);
}

.hl-ic {
    flex: none;
    display: grid;
    place-items: center;
    width: clamp(44px, calc(44px + 12 * (100vw - 400px) / 1040), 56px);
    height: clamp(44px, calc(44px + 12 * (100vw - 400px) / 1040), 56px);
    border-radius: clamp(14px, calc(14px + 4 * (100vw - 400px) / 1040), 18px);
    background: rgba(63, 78, 227, 0.08);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.025em;
    color: var(--sell-bright);
}

.is-red .hl-ic {
    background: rgba(165, 34, 38, 0.08);
    color: var(--buy);
}

.hl-card h3 {
    font-weight: 600;
    font-size: clamp(18px, calc(18px + 6 * (100vw - 400px) / 1040), 24px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--title);
}

.hl-card p {
    margin-top: 6px;
    font-size: clamp(13px, calc(13px + 3 * (100vw - 400px) / 1040), 16px);
    line-height: 1.5;
    letter-spacing: -0.02em;
    color: var(--muted);
}

/* how the money moves (refund page) */
.flow {
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin: clamp(32px, calc(32px + 24 * (100vw - 400px) / 1040), 56px) auto 0;
    padding: 0 var(--gutter);
}

.flow-card {
    padding: clamp(20px, calc(20px + 8 * (100vw - 400px) / 1040), 28px) clamp(16px, calc(16px + 16 * (100vw - 400px) / 1040), 32px);
    background: #fff;
    border: 1px solid #000;
    border-radius: clamp(22px, calc(22px + 12 * (100vw - 400px) / 1040), 34px);
    box-shadow: 5px 5px 0 #000;
}

.flow-card h3 {
    font-weight: 600;
    font-size: clamp(20px, calc(20px + 8 * (100vw - 400px) / 1040), 28px);
    letter-spacing: -0.03em;
    color: #1a1a1a;
}

.flow-card > p {
    margin-top: 6px;
    font-size: clamp(13px, calc(13px + 3 * (100vw - 400px) / 1040), 16px);
    color: var(--muted);
}

.flow-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.flow-row + .flow-row {
    margin-top: 18px;
}

.flow-node {
    padding: 16px;
    border: 1px solid #e3e3e3;
    border-radius: 20px;
    background: #fcfcfd;
    text-align: center;
}

.flow-node b {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #2c2c2c;
}

.flow-node small {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted-2);
}

.flow-node.navy {
    border-color: var(--sell);
    background: rgba(38, 31, 142, 0.05);
}

.flow-node.red {
    border-color: var(--buy);
    background: rgba(165, 34, 38, 0.05);
}

.flow-node.green {
    border-color: #01ae0f;
    background: rgba(1, 174, 15, 0.06);
}

.flow-arrow {
    position: relative;
    width: 70px;
    height: 16px;
}

.flow-arrow svg {
    width: 70px;
    height: 16px;
    overflow: visible;
}

.flow-arrow path {
    fill: none;
    stroke: var(--sell-bright);
    stroke-width: 2;
    stroke-dasharray: 6 6;
    animation: flow-dash 1s linear infinite;
}

.flow-arrow.red path {
    stroke: var(--buy);
}

.flow-arrow .tag {
    position: absolute;
    left: 50%;
    top: -22px;
    transform: translateX(-50%);
    font-weight: 600;
    font-size: 11px;
    color: var(--sell-bright);
    white-space: nowrap;
}

.flow-arrow.red .tag {
    color: var(--buy);
}

@keyframes flow-dash {
    to { stroke-dashoffset: -12; }
}

/* contents + sections */
.lg-body {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin: clamp(40px, calc(40px + 48 * (100vw - 400px) / 1040), 88px) auto 0;
    padding: 0 var(--gutter);
}

/* stays in view under the floating header (js/site.js highlights the section being read) */
.toc {
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: calc(100vh - 140px);
    padding: 16px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--sell-bright);
    border-radius: 25px;
}

.toc p {
    padding: 4px 8px 10px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.015em;
    color: #2c2c2c;
}

.toc a {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.3;
    color: #6b6b6b;
    transition: background 0.3s, color 0.3s, transform 0.3s var(--ease-out);
}

.toc a span {
    min-width: 20px;
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--sell-bright);
}

.toc a:hover {
    background: #f5f5fb;
    color: #222;
    transform: translateX(3px);
}

.toc a.is-active {
    background: rgba(63, 78, 227, 0.09);
    color: var(--sell);
    font-weight: 500;
}

.lg-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.legal-sec {
    scroll-margin-top: 110px;
    padding: clamp(18px, calc(18px + 6 * (100vw - 400px) / 1040), 24px) clamp(16px, calc(16px + 12 * (100vw - 400px) / 1040), 28px);
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: clamp(18px, calc(18px + 7 * (100vw - 400px) / 1040), 25px);
    transition: border-color 0.4s, box-shadow 0.4s;
}

.legal-sec:hover {
    border-color: rgba(63, 78, 227, 0.45);
    box-shadow: 4px 4px 0 rgba(63, 78, 227, 0.2);
}

.ls-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 12px;
}

.ls-head h2 {
    font-weight: 600;
    font-size: clamp(19px, calc(19px + 7 * (100vw - 400px) / 1040), 26px);
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--title);
}

.legal-sec p,
.legal-sec li {
    font-size: clamp(14px, calc(14px + 3 * (100vw - 400px) / 1040), 17px);
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: #6f6f6f;
}

.legal-sec p + p,
.legal-sec p + ul,
.legal-sec ul + p {
    margin-top: 10px;
}

.legal-sec ul {
    padding-left: 22px;
}

.legal-sec li::marker {
    color: var(--sell-bright);
}

.legal-sec b {
    font-weight: 600;
    color: #3c3c3c;
}

.legal-sec a {
    color: var(--sell-bright);
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 14px;
    padding: 14px 16px;
    background: rgba(63, 78, 227, 0.06);
    border: 1px dashed rgba(63, 78, 227, 0.45);
    border-radius: 16px;
}

.callout.red {
    background: rgba(165, 34, 38, 0.05);
    border-color: rgba(165, 34, 38, 0.4);
}

.callout b {
    color: var(--sell);
}

.callout.red b {
    color: var(--buy);
}

.legal-sec .callout p {
    margin: 0;
    font-size: clamp(14px, calc(14px + 2 * (100vw - 400px) / 1040), 16px);
}

.contact-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.contact-card div {
    padding: 14px 16px;
    background: #f7f7f9;
    border-radius: 16px;
}

.contact-card small {
    display: block;
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.contact-card span {
    display: block;
    margin-top: 3px;
    font-size: clamp(14px, calc(14px + 2 * (100vw - 400px) / 1040), 16px);
    color: #333;
    overflow-wrap: anywhere;
}

.legal-sec .lg-note {
    font-size: 14px;
    font-style: italic;
    color: #9a9a9a;
}

/* ================= TABLETS AND PHONES ================= */

@media (max-width: 1099px) {
    .ab-hero {
        flex-direction: column;
        align-items: center;
    }

    .ab-hero-copy {
        align-self: stretch;
    }

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

    .lg-mark {
        display: none;
    }

    .lg-highlights {
        grid-template-columns: minmax(0, 1fr);
    }

    /* the money flow runs top to bottom */
    .flow-row {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
    }

    .flow-node {
        width: 100%;
        max-width: 420px;
    }

    /* the arrow points down and its label sits beside it */
    .flow-arrow {
        width: 16px;
        height: 48px;
    }

    .flow-arrow svg {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(90deg);
    }

    .flow-arrow .tag {
        left: calc(100% + 8px);
        top: 50%;
        transform: translateY(-50%);
    }
}

@media (max-width: 899px) {
    .ab-lead br,
    .ab-p25 br,
    .founder-quote br {
        display: none;
    }

    .founder {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .founder-img {
        width: min(100%, 520px);
        border-radius: 28px;
    }

    .founder-copy {
        width: 100%;
        max-width: none;
    }

    .founder-role {
        margin-top: -4px;
        line-height: 1.2;
    }

    .ab-bg-logo {
        display: none;
    }

    .wcard {
        min-height: 0;
    }

    /* contents become a row of chips that scrolls sideways */
    .lg-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .toc {
        position: static;
        flex-direction: row;
        gap: 4px;
        max-height: none;
        padding: 8px;
        overflow-x: auto;
        border-radius: 18px;
        scrollbar-width: none;
    }

    .toc::-webkit-scrollbar {
        display: none;
    }

    .toc p {
        display: none;
    }

    .toc a {
        flex: none;
        font-size: 13px;
        white-space: nowrap;
    }

    .toc a:hover {
        transform: none;
    }
}

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

    .contact-card {
        grid-template-columns: minmax(0, 1fr);
    }
}
