/* ============================================================================
 * Baby Tools — styles.css  (babytools.neuralialabs.com)
 * ==========================================================================*/
:root {
    --brand: #ff7f6e;          /* coral */
    --brand-2: #ffa394;
    --brand-dark: #e85f4d;
    --accent: #5fb3b0;         /* soft teal */
    --accent-soft: #e3f3f2;
    --ink-1: #33414a;
    --ink-2: #6b7a83;
    --line: #efe7e2;
    --bg: #fff6f0;             /* warm cream */
    --card: #ffffff;
    --ok: #2fa56a;
    --warn-bg: #fff7ec;
    --warn-bd: #ffd98a;
    --warn-tx: #8a5a00;
    --radius: 16px;
    --shadow-sm: 0 1px 3px rgba(80, 50, 40, .07);
    --shadow-md: 0 12px 32px rgba(80, 50, 40, .12);
    --maxw: 1120px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--ink-1);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body.no-translate { visibility: hidden; opacity: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    font: inherit; font-weight: 600; cursor: pointer;
    padding: .7em 1.25em; border-radius: 12px; border: 1px solid transparent;
    background: #fdede9; color: var(--ink-1); transition: .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(255, 127, 110, .32); }
.btn--primary:hover { background: var(--brand-dark); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(95,179,176,.3); }
.btn--ghost { background: transparent; border-color: var(--line); }
.btn--small { padding: .45em .85em; font-size: .9rem; border-radius: 9px; }
.btn--block { width: 100%; }
.btn--lg { padding: .9em 1.8em; font-size: 1.05rem; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* --- Header --- */
.sticky-header { position: sticky; top: 0; z-index: 50; }
.topbar { background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.topbar__inner { max-width: var(--maxw); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 9px; color: var(--brand); font-weight: 800; font-size: 1.2rem; }
.logo-text { color: var(--ink-1); }
.logo-text__accent { color: var(--brand); }
.nav { display: flex; gap: 2px; margin-left: 8px; flex: 1; flex-wrap: wrap; }
.nav-link { padding: .45em .6em; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.nav-link:hover { background: var(--accent-soft); color: var(--ink-1); }
.topbar__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.premium-badge { background: linear-gradient(120deg, #ffd56a, #ffb020); color: #5a3b00; font-weight: 700; font-size: .8rem; padding: .3em .7em; border-radius: 20px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink-1); }
.nav-drawer { display: none; flex-direction: column; gap: 6px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); max-height: 70vh; overflow:auto; }
.nav-drawer.is-open { display: flex; }

/* --- Hero --- */
.hero { padding-top: 60px; padding-bottom: 36px; text-align: center; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.hero .lead { color: var(--ink-2); font-size: 1.15rem; max-width: 660px; margin: 0 auto 8px; }
.hero__trust { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; color: var(--ink-2); font-size: .95rem; margin-top: 14px; }

/* --- Sections / tool grid --- */
.section { padding-top: 38px; padding-bottom: 38px; }
.section__title { text-align: center; font-size: 1.8rem; }
.section__subtitle { text-align: center; color: var(--ink-2); max-width: 620px; margin: 0 auto 28px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tool-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow-sm); transition: .2s; display: flex; flex-direction: column; gap: 7px;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-2); }
.tool-card__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; color: var(--brand); background: #fdece8; }
.tool-card__title { font-weight: 700; font-size: 1.06rem; }
.tool-card__desc { color: var(--ink-2); font-size: .9rem; }
.tool-card--cat { background: var(--accent-soft); }
.toolgrid-cats .cat-title { font-size: 1.15rem; margin: 26px 0 12px; color: var(--ink-1); }
.toolgrid-cats .cat-title:first-child { margin-top: 0; }

/* --- Tool page --- */
.tool-hero { padding-top: 46px; padding-bottom: 14px; text-align: center; }
.tool-hero .crumbs { color: var(--ink-2); font-size: .85rem; margin-bottom: 10px; }
.tool-hero .crumbs a { color: var(--accent); font-weight: 600; }
.tool-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.tool-hero p { color: var(--ink-2); max-width: 600px; margin: 0 auto; }
.workspace { max-width: 760px; margin: 0 auto 50px; padding: 0 20px; }

/* --- Forms / panels --- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-top: 20px; box-shadow: var(--shadow-sm); }
.panel h2, .panel h3 { font-size: 1.1rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { color: var(--ink-2); font-size: .82rem; margin-top: 5px; }
.field input[type=text], .field input[type=number], .field input[type=date], .field input[type=time], .field select {
    width: 100%; padding: .7em .8em; border: 1px solid var(--line); border-radius: 11px; font: inherit; background: #fff; color: var(--ink-1);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,127,110,.15); }
.input-group { display: flex; gap: 8px; }
.input-group > * { flex: 1; }

/* segmented / radio chips */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 6px; background: #faf1ec; padding: 5px; border-radius: 12px; }
.segmented label { padding: .5em .9em; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented input:checked + span, .segmented label.is-active { color: #fff; }
.segmented label:has(input:checked) { background: var(--brand); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: .45em .9em; border: 1px solid var(--line); border-radius: 20px; background:#fff; cursor: pointer; font-weight: 600; font-size: .88rem; }
.chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

.action-bar { display: flex; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* --- Results --- */
.bt-result { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-top: 22px; box-shadow: var(--shadow-sm); }
.bt-result.is-hero { background: linear-gradient(135deg, #fff, var(--accent-soft)); text-align: center; }
.result-big { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; color: var(--brand-dark); margin: 6px 0; }
.result-sub { color: var(--ink-2); }
.result-rows { display: grid; gap: 10px; margin-top: 14px; }
.result-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; background: #faf6f3; border-radius: 11px; }
.result-row__k { color: var(--ink-2); }
.result-row__v { font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 12px; margin-top: 14px; }
.stat { background: #faf6f3; border-radius: 12px; padding: 14px; text-align: center; }
.stat__v { font-size: 1.5rem; font-weight: 800; color: var(--brand-dark); }
.stat__k { color: var(--ink-2); font-size: .82rem; }

/* progress timeline (weeks / vaccines / milestones) */
.timeline { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background:#faf6f3; border-radius: 11px; }
.timeline .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex: 0 0 auto; }
.timeline .when { font-weight: 700; }
.timeline .what { color: var(--ink-2); font-size: .92rem; }

/* table for history */
.bt-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .92rem; }
.bt-table th, .bt-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.bt-table th { color: var(--ink-2); font-weight: 600; }

/* big timer / counter displays */
.bigclock { font-variant-numeric: tabular-nums; font-size: clamp(2.6rem, 12vw, 4.2rem); font-weight: 800; text-align: center; color: var(--ink-1); letter-spacing: 1px; }
.counter-ring { width: 180px; height: 180px; margin: 4px auto 0; border-radius: 50%; display:grid; place-items:center; background: radial-gradient(circle at 50% 40%, #fff, var(--accent-soft)); border: 3px solid var(--accent); }
.counter-ring .n { font-size: 3.2rem; font-weight: 800; color: var(--brand-dark); }
.counter-ring .of { color: var(--ink-2); font-size: .9rem; }

/* white-noise / audio */
.sound-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 10px; }
.sound-btn { padding: 16px 10px; border-radius: 14px; border: 1px solid var(--line); background:#fff; cursor:pointer; text-align:center; font-weight:600; font-size:.9rem; transition:.15s; }
.sound-btn .emoji { font-size: 1.7rem; display:block; margin-bottom: 6px; }
.sound-btn.is-on { background: var(--accent); color:#fff; border-color: var(--accent); }
.slider { width: 100%; accent-color: var(--brand); }

/* cry analyzer */
.mic-orb { width: 150px; height: 150px; border-radius: 50%; margin: 4px auto; background: radial-gradient(circle at 50% 40%, var(--brand-2), var(--brand)); display:grid; place-items:center; color:#fff; font-size: 2.6rem; box-shadow: 0 10px 30px rgba(255,127,110,.4); transition: transform .1s; }
.mic-orb.is-listening { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.meter { height: 10px; border-radius: 6px; background: #f0e6e0; overflow: hidden; margin-top: 14px; }
.meter__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--brand)); transition: width .08s linear; }
.guess-list { display:grid; gap: 10px; margin-top: 8px; }
.guess { padding: 12px 14px; background:#faf6f3; border-radius: 12px; }
.guess__top { display:flex; justify-content:space-between; font-weight:700; }
.guess__bar { height: 8px; border-radius: 5px; background:#eaddd6; margin-top:7px; overflow:hidden; }
.guess__fill { height:100%; background: var(--brand); border-radius:5px; }
.guess.is-top .guess__fill { background: var(--accent); }

/* chart */
.chart-wrap { position: relative; margin-top: 14px; }
.chart-wrap canvas { max-width: 100%; }

/* misc */
.warn { background: var(--warn-bg); border: 1px solid var(--warn-bd); color: var(--warn-tx); padding: 10px 14px; border-radius: 11px; font-size: .9rem; margin-top: 14px; }
.disclaimer { color: var(--ink-2); font-size: .82rem; margin-top: 14px; text-align: center; }
.lock-pill { display:inline-flex; align-items:center; gap:5px; font-size:.78rem; font-weight:700; color:#5a3b00; background:linear-gradient(120deg,#ffd56a,#ffb020); padding:.2em .6em; border-radius:20px; }
.hidden { display: none !important; }

/* --- Modal / paywall --- */
.modal { position: fixed; inset: 0; background: rgba(60,40,35,.55); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal.show { display: flex; }
.modal-content { background: #fff; border-radius: 20px; max-width: 440px; width: 100%; padding: 30px; position: relative; box-shadow: var(--shadow-md); }
.modal-content h2 { font-size: 1.5rem; }
.modal-desc { color: var(--ink-2); }
.close { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink-2); }
.paywall-bullets { list-style: none; padding: 0; margin: 16px 0; }
.paywall-bullets li { padding: 7px 0 7px 28px; position: relative; }
.paywall-bullets li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.payment-link-button {
    display: flex; align-items: center; justify-content: center; gap: .5em; width: 100%;
    background: var(--brand); color: #fff; font-weight: 700; padding: .9em; border-radius: 14px; margin-top: 8px;
    box-shadow: 0 6px 16px rgba(255,127,110,.32); transition: .18s;
}
.payment-link-button:hover { background: var(--brand-dark); }
.lock-icon { width: 18px; height: 18px; }
.payment-secure-note { text-align: center; color: var(--ink-2); font-size: .82rem; margin-top: 10px; }

/* --- Lead form --- */
.lead-offer { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 30px auto 0; max-width: 560px; text-align: center; box-shadow: var(--shadow-sm); }
.lead-form__row { display: flex; gap: 8px; margin-top: 10px; }
.lead-form__row input { flex: 1; padding: .7em .9em; border: 1px solid var(--line); border-radius: 11px; font: inherit; }
.lead-form__help { color: var(--ink-2); font-size: .82rem; margin-top: 8px; }
.lead-form__error { color: var(--brand-dark); font-size: .85rem; }
.lead-form__success { color: var(--ok); font-size: .85rem; }

/* --- FAQ --- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--ink-2); margin: 10px 0 0; }

/* --- Footer --- */
.footer { background: #fff; border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 20px 24px; }
.footer__tools { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.footer__col h4 { font-size: .95rem; }
.footer__col a { display: block; color: var(--ink-2); font-size: .9rem; padding: 3px 0; }
.footer__col a:hover { color: var(--brand); }
.footer__col--about p { color: var(--ink-2); font-size: .9rem; }
.footer__note { text-align: center; color: var(--ink-2); font-size: .85rem; margin-top: 28px; }

/* --- Responsive --- */
@media (max-width: 980px) { .nav { display: none; } .nav-toggle { display: block; } }
@media (max-width: 600px) {
    .topbar__inner { padding: 10px 16px; gap: 10px; }
    .logo { font-size: 1.1rem; }
    #openPaywallFromHeader { display: none; }
    .hero { padding-top: 34px; padding-bottom: 20px; }
    .hero .lead { font-size: 1.02rem; }
    .hero__trust { gap: 6px 16px; font-size: .9rem; }
    .section { padding-top: 28px; padding-bottom: 28px; }
    .section__title { font-size: 1.45rem; }
    .tool-hero { padding-top: 30px; }
    .panel, .bt-result { padding: 18px; }
    .modal-content { padding: 24px 18px; border-radius: 16px; }
    .lead-form__row { flex-direction: column; }
    .lead-form__row .btn { width: 100%; }
}
@media (max-width: 400px) { .hero h1 { font-size: 1.7rem; } .section__title { font-size: 1.3rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
