/* IOU public web pages (landing page + legal screens) — see
 * resources/views/web/**. Plain static CSS rather than a Vite bundle: this
 * project has no JS/Vite pipeline at all (the native mobile UI needs none),
 * and these are a handful of static-content pages — a build step would be
 * pure overhead. Served directly from public/, cached by nginx (see
 * deploy/nginx.conf's static-asset location block).
 */

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-muted: #6b6b6b;
    --border: #e5e5e5;
    --accent: #2f6eb6;

    /* Hero + phone-mockup tokens — Marina, IOU's own icon-derived palette
       (see App\Enums\Palette::marinaLightTokens()), so the mockup's colors
       match the real app rather than being generic. */
    --hero-from: #eef4ff;
    --hero-to: #dbe7f8;
    --phone-bezel: #12181f;
    --phone-bg: #f7faff;
    --phone-surface: #ffffff;
    --phone-on-surface: #12181f;
    --phone-on-surface-variant: #46536a;
    --phone-primary: #2f6eb6;
    --phone-accent: #49c4dd;
    --phone-lent: #146c38;
    --phone-borrowed: #ba1a1a;
    --glow: rgba(47, 110, 182, 0.25);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --surface: #1a1a1a;
        --text: #f0f0f0;
        --text-muted: #a0a0a0;
        --border: #2e2e2e;
        --accent: #6ea8e0;

        --hero-from: #0a1420;
        --hero-to: #0f1b2e;
        --phone-bezel: #05070a;
        --phone-bg: #0a1420;
        --phone-surface: #101823;
        --phone-on-surface: #e4ecf6;
        --phone-on-surface-variant: #a7bbd2;
        --phone-primary: #2f6eb6;
        --phone-accent: #49c4dd;
        --phone-lent: #5cd68c;
        --phone-borrowed: #ff8a80;
        --glow: rgba(73, 196, 221, 0.25);
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.nav {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.nav .links {
    display: flex;
    gap: 1.25rem;
}

.nav .links a {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
}

.nav .links a:hover {
    color: var(--accent);
}

main {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

body.is-landing main {
    max-width: none;
    padding: 0;
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

h2 {
    font-size: 1.1rem;
    margin: 1.75rem 0 0.4rem;
}

p {
    color: var(--text-muted);
    margin: 0.4rem 0;
}

.meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

footer {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

footer a {
    color: var(--text-muted);
}

/* ── Landing page hero + phone mockup ── */

.hero {
    background: linear-gradient(180deg, var(--hero-from) 0%, var(--hero-to) 100%);
    padding: 3.5rem 1.25rem 4.5rem;
}

.hero-inner {
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    text-align: center;
}

.eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 0.75rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    color: var(--text);
    font-weight: 600;
}

.hero h1 em {
    font-style: italic;
    font-weight: 500;
    color: var(--text-muted);
}

.hero-sub {
    max-width: 480px;
    margin: 0 auto 0.5rem;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.hero-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.hero-store {
    margin-top: 0.75rem;
}

.hero-store a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--phone-bezel);
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-store .play-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.phones {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: -2rem;
    padding: 1rem 0 0;
}

.phone {
    width: 190px;
    height: 390px;
    border-radius: 32px;
    background: var(--phone-bezel);
    padding: 8px;
    box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    position: relative;
}

.phone-b {
    margin-left: -3.5rem;
    transform: translateY(24px) rotate(4deg);
}

.phone-a {
    transform: translateY(-6px) rotate(-4deg);
    z-index: 1;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--phone-bg);
    border-radius: 26px;
    overflow: hidden;
    position: relative;
    font-size: 0.65rem;
}

.phone-notch {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 46px;
    height: 6px;
    border-radius: 4px;
    background: var(--phone-bezel);
    z-index: 2;
}

.phone-header {
    padding: 1.4rem 0.9rem 0.6rem;
    color: var(--phone-on-surface);
    font-weight: 600;
    font-size: 0.8rem;
}

.phone-summary {
    display: flex;
    gap: 0.5rem;
    padding: 0 0.9rem 0.7rem;
}

.phone-summary div {
    flex: 1;
    background: var(--phone-surface);
    border-radius: 10px;
    padding: 0.55rem 0.6rem;
}

.phone-summary .label {
    display: block;
    color: var(--phone-on-surface-variant);
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.phone-summary .value {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.phone-summary .lent .value {
    color: var(--phone-lent);
}

.phone-summary .borrowed .value {
    color: var(--phone-borrowed);
}

.phone-row {
    margin: 0 0.9rem 0.5rem;
    background: var(--phone-surface);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.phone-row .name {
    color: var(--phone-on-surface);
    font-weight: 600;
}

.phone-row .sub {
    display: block;
    color: var(--phone-on-surface-variant);
    font-size: 0.55rem;
    margin-top: 0.1rem;
}

.phone-row .amt {
    font-weight: 700;
}

.phone-row .amt.lent {
    color: var(--phone-lent);
}

.phone-row .amt.borrowed {
    color: var(--phone-borrowed);
}

.phone-pill {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.5rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: var(--phone-accent);
    color: var(--phone-bezel);
    font-weight: 700;
}

.phone-detail-header {
    padding: 1.4rem 0.9rem 0.5rem;
    color: var(--phone-on-surface);
}

.phone-detail-header .name {
    font-weight: 700;
    font-size: 0.9rem;
}

.phone-detail-header .sub {
    color: var(--phone-on-surface-variant);
    font-size: 0.55rem;
}

.phone-detail-amount {
    margin: 0.6rem 0.9rem;
    background: var(--phone-surface);
    border-radius: 12px;
    padding: 0.9rem;
    text-align: center;
}

.phone-detail-amount .value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--phone-primary);
}

.phone-detail-amount .label {
    display: block;
    color: var(--phone-on-surface-variant);
    font-size: 0.55rem;
    margin-top: 0.15rem;
}

.phone-timeline {
    margin: 0.6rem 0.9rem;
    background: var(--phone-surface);
    border-radius: 10px;
    padding: 0.6rem;
}

.phone-timeline .entry {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    color: var(--phone-on-surface-variant);
}

.phone-timeline .entry b {
    color: var(--phone-on-surface);
}

.float-card {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 0.85rem;
    font-size: 0.75rem;
    box-shadow: 0 20px 40px -16px var(--glow);
}

.float-card .value {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.float-card .label {
    color: var(--text-muted);
    font-size: 0.65rem;
}

.float-card-a {
    top: 6%;
    left: calc(50% - 220px);
}

.float-card-b {
    bottom: 8%;
    right: calc(50% - 230px);
}

.pillars {
    max-width: 880px;
    margin: 0 auto;
    padding: 3.5rem 1.25rem;
    text-align: center;
}

.pillars h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 600;
    margin: 0 0 2rem;
    line-height: 1.3;
}

.pillars h2 em {
    font-style: italic;
    font-weight: 500;
    color: var(--text-muted);
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.pillar-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
}

.pillar-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.links-row {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
    text-align: center;
}

@media (max-width: 560px) {
    .phone {
        width: 150px;
        height: 310px;
    }

    .phone-b {
        margin-left: -2.5rem;
    }

    .float-card {
        display: none;
    }
}
