/*
 * Home page, Host's-notebook design (mockups/website-redesign/5-hosts-notebook.jpg).
 * Sections are prefixed .nb- and move over from the inline <style> in
 * layouts/index.html one at a time (frontend#33).
 */

.nb-script {
    font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
    font-weight: 600;
    color: var(--ink);
}

/* Amber hand-drawn underline on a key word */
.nb-mark {
    position: relative;
    white-space: nowrap;
}
.nb-mark::after {
    content: '';
    position: absolute;
    left: -3%;
    right: -3%;
    bottom: -0.16em;
    height: 0.3em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 50 3, 120 3, 197 8 M22 16 C 80 11, 140 11, 180 14' fill='none' stroke='%23F5A524' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
    z-index: -1;
}

.nb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 2rem;
    border-radius: 8px;
    border: 2px solid transparent;
    font-family: 'Nunito', 'DM Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.nb-btn svg { width: 1.3em; height: 1.3em; flex: none; }
.nb-btn-primary {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 4px 14px rgba(242, 107, 33, 0.28);
}
.nb-btn-primary:hover { background: #D95A14; color: #fff; transform: translateY(-1px); }
.nb-btn-ghost {
    background: rgba(255, 255, 255, 0.55);
    color: var(--ink);
    border-color: var(--ink);
}
.nb-btn-ghost:hover { background: #fff; color: var(--ink); transform: translateY(-1px); }

/* ---------- Hero ---------- */
.nb-hero {
    position: relative;
    padding: 10.5rem 2rem 6.5rem;
    min-height: 40rem;
    background:
        radial-gradient(ellipse 55% 70% at 78% 45%, rgba(255, 214, 160, 0.55), transparent 70%),
        radial-gradient(ellipse 40% 50% at 0% 100%, rgba(245, 165, 36, 0.10), transparent 70%),
        var(--sand);
    color: var(--ink);
    overflow: hidden;
}
.nb-hero-inner {
    max-width: 1180px;
    margin: 0 auto;
}
.nb-hero-copy { position: relative; z-index: 1; width: 41%; }
.nb-hero h1 {
    font-size: clamp(2.3rem, 4.1vw, 3.3rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}
.nb-hero-sub {
    font-size: 1.12rem;
    line-height: 1.65;
    color: #3A3A4D;
    max-width: 25.5rem;
    margin-bottom: 2rem;
}
.nb-hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.nb-hero-note { margin-top: 1rem; font-size: 0.9rem; color: var(--text-light); }

.nb-hero-art {
    position: absolute;
    top: 5.1rem; /* below the fixed nav */
    right: 0;
    bottom: 0;
    width: 66%;
}
.nb-hero-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% 35%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%);
    mask-image: linear-gradient(to right, transparent 0, #000 12%);
}
.nb-hero-scribble {
    position: absolute;
    right: 3%;
    bottom: 1.4rem;
    padding: 0.5rem 1.1rem 0.6rem;
    background: rgba(246, 239, 230, 0.92);
    border-radius: 14px;
    font-size: 1.45rem;
    line-height: 1.15;
    text-align: center;
    max-width: 15rem;
    transform: rotate(-3deg);
}
.nb-hero-scribble svg {
    position: absolute;
    right: 0.6rem;
    top: -2.5rem;
    width: 2.4rem;
    height: 2.4rem;
}
.nb-rays { position: absolute; width: 3.4rem; height: 3.4rem; }
.nb-rays-tv { left: 6%; top: 0.8rem; z-index: 1; transform: scaleX(-1); }
.nb-rays-h1 { left: -2.6rem; top: -1.6rem; transform: scaleX(-1); }

@media (max-width: 960px) {
    .nb-hero { padding: 7.5rem 0 0; min-height: 0; }
    .nb-hero-inner { padding: 0 1.5rem; }
    .nb-hero-copy { width: auto; }
    .nb-hero-sub { max-width: none; }
    .nb-hero-art { position: relative; top: auto; width: auto; margin-top: 2.5rem; }
    .nb-hero-photo {
        height: auto;
        aspect-ratio: 3 / 2;
        border-radius: 16px 16px 0 0;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .nb-rays-h1, .nb-rays-tv { display: none; }
}
@media (max-width: 560px) {
    .nb-hero-cta { flex-direction: column; }
    .nb-btn { width: 100%; }
    .nb-hero-scribble { display: none; }
}

/* ---------- Shared section bits ---------- */
.nb-wrap { max-width: 1100px; margin: 0 auto; }
.nb-h2 {
    position: relative;
    z-index: 0;
    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.015em;
    text-align: center;
    color: var(--ink);
    margin-bottom: 1rem;
}
.nb-lede {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 36rem;
    margin: 0 auto;
}

/* ---------- Before / after ---------- */
.nb-ba { padding: 5rem 2rem; background: var(--warm-white); }
.nb-ba-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) auto minmax(0, 1.25fr);
    gap: 2rem;
    align-items: center;
    margin-top: 3.5rem;
}
.nb-ba-side { position: relative; }
.nb-ba-before { padding-left: 7.5rem; }
.nb-tag {
    position: absolute;
    left: 5.5rem;
    top: -1.4rem;
    z-index: 2;
    padding: 0.1rem 1.1rem 0.2rem;
    background: var(--amber);
    border-radius: 60% 40% 55% 45% / 55% 60% 40% 45%;
    font-size: 1.7rem;
    transform: rotate(-8deg);
}
.nb-tag-after { left: -0.9rem; top: -1.3rem; }
.nb-ba-note { font-size: 1.5rem; line-height: 1.15; }
.nb-ba-note-before {
    position: absolute;
    left: 0;
    top: 30%;
    width: 7rem;
    transform: rotate(-6deg);
}
.nb-ba-note-after { margin-top: 1.4rem; text-align: right; transform: rotate(-2deg); }
.nb-chat {
    background: #fff;
    border: 8px solid #15151F;
    border-bottom: 0;
    border-radius: 34px 34px 0 0;
    padding: 1rem 0.9rem 0.6rem;
    box-shadow: 0 24px 44px -20px rgba(30, 30, 46, 0.4);
    font-size: 0.9rem;
}
.nb-chat-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-light);
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #EEE9E1;
}
.nb-chat-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 38%, #fff 0 22%, transparent 23%), radial-gradient(ellipse at 50% 105%, #fff 0 45%, transparent 46%), #D9D2C7;
}
.nb-chat-day { text-align: center; font-size: 0.7rem; color: #9A968F; margin: 0.6rem 0; }
.nb-bubble {
    width: fit-content;
    max-width: 88%;
    margin: 0 0 0.55rem;
    padding: 0.5rem 0.85rem;
    background: #ECEAE6;
    color: var(--ink);
    border-radius: 1.1rem 1.1rem 1.1rem 0.3rem;
    line-height: 1.35;
}
.nb-bubble-typing { display: flex; gap: 0.25rem; padding: 0.7rem 0.85rem; }
.nb-bubble-typing span { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: #A8A49C; }
.nb-ba-arrow { width: 5rem; }
.nb-ba-photo {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 26px 50px -22px rgba(30, 30, 46, 0.45);
    transform: rotate(-0.8deg);
}
.nb-ba-links {
    margin: 3.5rem auto 0;
    max-width: 44rem;
    text-align: center;
    color: var(--text-light);
}
.nb-ba-links a { color: var(--orange); font-weight: 600; text-decoration: none; }
.nb-ba-links a:hover { text-decoration: underline; }

/* ---------- How it works ---------- */
.nb-how { padding: 5rem 2rem; background: var(--sand); }
.nb-steps {
    list-style: none;
    margin: 3rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3.5rem;
}
.nb-step { position: relative; }
.nb-step + .nb-step::before {
    content: '';
    position: absolute;
    left: -3.2rem;
    top: 0.4rem;
    width: 2.8rem;
    height: 2rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 40'%3E%3Cpath d='M4 30C16 14 32 10 50 16M50 16 39 13M50 16 44 26' fill='none' stroke='%23F5A524' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.nb-step-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.nb-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--amber);
    color: #fff;
    font-family: 'Nunito', 'DM Sans', sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
}
.nb-step-head svg {
    width: 3rem;
    height: 3rem;
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nb-step h3 { font-size: 1.3rem; color: var(--ink); margin-bottom: 0.5rem; }
.nb-step p { color: var(--text-light); line-height: 1.6; }
.nb-how-cta { text-align: center; margin-top: 3rem; }

@media (max-width: 860px) {
    .nb-ba, .nb-how { padding: 3.5rem 1.5rem; }
    .nb-ba-grid { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 3rem; }
    .nb-ba-before { padding-left: 0; max-width: 20rem; margin: 0 auto; width: 100%; }
    .nb-tag { left: -0.6rem; top: -0.4rem; }
    .nb-tag-after { top: -1.3rem; }
    .nb-ba-grid { gap: 2.6rem; }
    .nb-ba-note-before { position: static; width: 9rem; margin: 0 0 0.8rem auto; text-align: center; transform: rotate(-3deg); }
    .nb-ba-arrow { transform: rotate(75deg); margin: 0 auto 1rem; width: 4rem; }
    .nb-steps { grid-template-columns: 1fr; gap: 2rem; }
    .nb-step + .nb-step::before { display: none; }
    .nb-how-cta .nb-btn { width: 100%; }
}
