/* ==========================================================================
   LureCycle — base stylesheet
   Palette sampled directly from the logo artwork.
   Mobile-first: base rules target phones, media queries scale up.
   ========================================================================== */

:root {
    /* Brand */
    --navy:       #06305f;
    --navy-deep:  #04203f;
    --blue:       #0f70b0;
    --cyan:       #12a2e0;
    --green:      #2f9050;
    --lime:       #70c040;

    /* Neutrals */
    --ink:        #10202e;
    --body:       #45525e;
    --muted:      #6b7784;
    --line:       #e2e8ee;
    --surface:    #ffffff;
    --canvas:     #f5f8fa;

    --radius:     14px;
    --radius-sm:  9px;
    --shadow:     0 1px 2px rgba(6, 48, 95, .06), 0 8px 24px rgba(6, 48, 95, .07);
    --wrap:       1120px;
}

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

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--body);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; letter-spacing: -.01em; }
h3 { font-size: 1.0625rem; }

p { margin: 0 0 1rem; }
a { color: var(--blue); }

img { max-width: 100%; height: auto; display: block; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 20px;
}

/* --- Header ------------------------------------------------------------ */

.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 66px;
}

.brand { display: inline-flex; align-items: center; }
.brand img { width: 148px; }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* --- Buttons ----------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .7em 1.25em;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 600;
    font-size: .9375rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    box-shadow: 0 2px 10px rgba(18, 162, 224, .3);
}

.btn-accent {
    background: linear-gradient(135deg, var(--green), var(--lime));
    color: #fff;
    box-shadow: 0 2px 10px rgba(112, 192, 64, .3);
}

.btn-ghost {
    background: transparent;
    color: var(--navy);
    border-color: var(--line);
}

.btn:hover { transform: translateY(-1px); }
.btn-ghost:hover { background: var(--canvas); }
.btn:focus-visible { outline: 3px solid rgba(18, 162, 224, .45); outline-offset: 2px; }

.btn-lg { padding: .85em 1.6em; font-size: 1rem; }

/* --- Hero -------------------------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1100px 460px at 78% -12%, rgba(112, 192, 64, .16), transparent 62%),
        radial-gradient(900px 420px at 8% 0%,   rgba(18, 162, 224, .16), transparent 60%),
        var(--canvas);
    border-bottom: 1px solid var(--line);
    padding: 44px 0 52px;
    text-align: center;
}

.hero-logo { width: min(300px, 74vw); margin: 0 auto 22px; }

.hero h1 {
    font-size: clamp(1.75rem, 6.2vw, 2.9rem);
    max-width: 17ch;
    margin-inline: auto;
}

.hero h1 .grad {
    background: linear-gradient(100deg, var(--blue), var(--cyan) 45%, var(--lime));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lede {
    font-size: 1.0625rem;
    max-width: 46ch;
    margin: 0 auto 26px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* --- Status pill ------------------------------------------------------- */

.pill {
    display: inline-flex;
    align-items: center;
    gap: .55em;
    padding: .4em .95em;
    margin-bottom: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid var(--line);
    color: var(--navy);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .01em;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 3px rgba(112, 192, 64, .22);
}

/* --- Sections ---------------------------------------------------------- */

.section { padding: 52px 0; }
.section-alt { background: var(--canvas); border-block: 1px solid var(--line); }

.section-head { text-align: center; margin-bottom: 30px; }
.section-head p { color: var(--muted); max-width: 52ch; margin-inline: auto; }

/* --- Category grid ----------------------------------------------------- */

.cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 22px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    text-align: center;
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.cat:hover { border-color: var(--cyan); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat .emoji { font-size: 1.75rem; line-height: 1; }
.cat .count { font-size: .8125rem; font-weight: 500; color: var(--muted); }

/* --- Steps ------------------------------------------------------------- */

.steps { display: grid; gap: 16px; }

.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}

.step .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-weight: 700;
    font-size: .9375rem;
}

.step:nth-child(2) .num { background: linear-gradient(135deg, var(--cyan), var(--lime)); }
.step:nth-child(3) .num { background: linear-gradient(135deg, var(--green), var(--lime)); }
.step p { margin: 0; font-size: .9375rem; }

/* --- Footer ------------------------------------------------------------ */

.site-footer {
    background: var(--navy-deep);
    color: rgba(255, 255, 255, .62);
    padding: 34px 0;
    font-size: .875rem;
}

.site-footer .wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    text-align: center;
}

.site-footer a { color: rgba(255, 255, 255, .85); }
.site-footer p { margin: 0; }

/* The full lockup has a dark-blue wordmark, so on navy we use the mark
   plus live text instead of the logo image. */
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand img { width: 34px; }
.footer-brand span {
    color: #fff;
    font-weight: 700;
    font-size: 1.0625rem;
    letter-spacing: -.01em;
}

/* --- Forms ------------------------------------------------------------- */

.field { margin-bottom: 16px; }

.field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: .875rem;
    color: var(--ink);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="file"],
.field select,
.field textarea {
    width: 100%;
    padding: .7em .85em;
    font: inherit;
    font-size: 1rem;   /* >=16px stops iOS zooming the page on focus */
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .12s ease, box-shadow .12s ease;
}

.field textarea { min-height: 110px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(18, 162, 224, .18);
}

.field .hint {
    display: block;
    margin-top: 5px;
    font-size: .8125rem;
    color: var(--muted);
}

.check {
    display: flex;
    align-items: center;
    gap: .55em;
    margin-bottom: 18px;
    font-size: .9375rem;
    cursor: pointer;
}

.check input { width: 17px; height: 17px; accent-color: var(--blue); }

.btn-full { width: 100%; }

/* --- Alerts ------------------------------------------------------------ */

.alert {
    padding: .8em 1em;
    margin-bottom: 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: .9375rem;
}

.alert ul { margin: 0; padding-left: 1.1em; }

.alert-error {
    background: #fdf1f1;
    border-color: #f2c9c9;
    color: #8f2020;
}

.alert-success {
    background: #eef8f0;
    border-color: #bfe3c8;
    color: #1e6b34;
}

/* --- Auth pages -------------------------------------------------------- */

.auth-page {
    display: flex;
    justify-content: center;
    padding: 40px 20px 64px;
    background:
        radial-gradient(760px 340px at 50% -10%, rgba(18, 162, 224, .13), transparent 62%),
        var(--canvas);
    min-height: 70vh;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px 26px;
}

.auth-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: .9375rem; margin-bottom: 22px; }

.auth-alt {
    margin: 16px 0 0;
    text-align: center;
    font-size: .9375rem;
    color: var(--muted);
}

/* --- User chip / avatars ----------------------------------------------- */

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    font-size: .875rem;
}

.user-chip:hover { background: var(--canvas); }

.user-chip img,
.user-chip .avatar-fallback {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
}

.avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
}

/* Hide the name on small screens — the avatar alone is enough */
.user-chip-name { display: none; }

/* --- Profile ----------------------------------------------------------- */

.profile-grid { display: grid; gap: 24px; }

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.panel h2 { font-size: 1.125rem; margin-bottom: 18px; }

.avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }

.avatar-row img,
.avatar-row .avatar-fallback {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    font-size: 1.5rem;
}

.meta-list { list-style: none; margin: 0; padding: 0; font-size: .9375rem; }
.meta-list li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.meta-list li:last-child { border-bottom: 0; }
.meta-list .k { color: var(--muted); }
.meta-list .v { font-weight: 600; color: var(--ink); text-align: right; }

/* --- Larger screens ---------------------------------------------------- */

@media (min-width: 700px) {
    .hero { padding: 68px 0 76px; }
    .cats { grid-template-columns: repeat(4, 1fr); }
    .steps { grid-template-columns: repeat(3, 1fr); }
    .section { padding: 72px 0; }
    .site-footer .wrap { flex-direction: row; justify-content: space-between; text-align: left; }
    .user-chip-name { display: inline; }
    .auth-page { padding: 64px 20px 88px; }
    .auth-card { padding: 36px 34px; }
    .profile-grid { grid-template-columns: 1fr 1.4fr; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
