/* BabyLogly home page. Shared by every language folder.
   "Warm Journal" look, matching the iOS app: paper, ink, terracotta, serif display. */
:root {
    color-scheme: light dark;
    --bg: #FAF5EC;          /* page paper */
    --card: #FFFDF8;        /* card paper */
    --sand: #EFE6D6;        /* bands, chips */
    --hair: #E4D8C4;        /* sand hairline */
    --ink: #2B2320;
    --muted: #6E6259;
    --accent: #B4583A;      /* terracotta */
    --accent-ink: #A04C30;  /* terracotta for small text */
    --on-accent: #FFFDF8;
    --rose: #9A5357;        /* nursing */
    --dusk: #7A7FA6;        /* sleep */
    --dusk-ink: #5A5F88;
    --ochre: #9A7432;       /* diapers */
    --ochre-ink: #80602A;
    --sage: #5E7A5C;        /* growth, watch */
    --sage-ink: #4C664A;
    --bezel: #1E1815;
    --shadow: 0 1px 2px rgba(43,35,32,.05), 0 10px 30px rgba(43,35,32,.08);
    --radius: 18px;
    --serif: ui-serif, 'Newsreader', 'New York', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --rounded: ui-rounded, 'SF Pro Rounded', 'Inter', -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #17120F;
        --card: #221B17;
        --sand: #2A221D;
        --hair: #3A2F28;
        --ink: #EFE4D6;
        --muted: #B5A797;
        --accent: #B4583A;
        --accent-ink: #E3926F;
        --on-accent: #FFF8F0;
        --rose: #D08A8D;
        --dusk: #A4A9CF;
        --dusk-ink: #AEB2D6;
        --ochre: #CFA45C;
        --ochre-ink: #D6AD68;
        --sage: #93B290;
        --sage-ink: #9DBB9A;
        --bezel: #3A2F28;
        --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav {
    padding: 16px 0;
    border-bottom: 1px solid var(--hair);
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.2) blur(14px);
    backdrop-filter: saturate(1.2) blur(14px);
}
nav .container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo-icon { width: 40px; height: 40px; border-radius: 10px; }
.logo span { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--accent-ink); }

/* Hero */
.hero { text-align: center; padding: 88px 0 72px; }
.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--sand);
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: 24px;
}
.hero h1 {
    font-family: var(--serif);
    font-size: clamp(42px, 7vw, 76px);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
    color: var(--ink);
}
.hero h1 .accent { color: var(--accent-ink); font-style: italic; font-weight: 500; }
.hero p {
    font-size: clamp(17px, 2.4vw, 20px);
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto 32px;
}
.promise { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 30px; }
.promise span {
    padding: 7px 15px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--hair);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}
.promise span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; }
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: transform .2s, filter .2s, box-shadow .2s;
}
.cta-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 20px rgba(180,88,58,.28); }
.cta-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.cta-secondary { background: var(--card); color: var(--ink); border: 1px solid var(--hair); }
.cta-secondary:hover { background: var(--sand); }

/* Phone and watch screenshots in a simple device bezel */
.hero-shots { display: flex; gap: 28px; justify-content: center; align-items: flex-end; margin-top: 60px; }
.hero-shots img, .screens img {
    display: block;
    height: auto;
    background: var(--sand);
    border: 7px solid var(--bezel);
    border-radius: 40px;
    box-shadow: var(--shadow);
}
.hero-shots .phone { width: 260px; }
.hero-shots .phone:first-child { transform: rotate(-2deg); }
.hero-shots .phone:last-child { transform: rotate(2deg); }
.hero-shots .watch { width: 150px; border-width: 8px; border-radius: 42px; background: #17120F; }

/* Highlights */
.highlights {
    padding: 56px 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 180px));
    justify-content: center;
    gap: 24px;
    background: var(--sand);
    border-top: 1px solid var(--hair);
    border-bottom: 1px solid var(--hair);
}
.highlight { text-align: center; }
.highlight-value { font-family: var(--rounded); font-size: 44px; font-weight: 700; line-height: 1.1; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.highlight-label { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }

/* Section headings */
.features h2, .soon h2, .screens h2 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.15;
    text-align: center;
}

/* Features */
.features { padding: 88px 0; }
.features h2 { font-size: clamp(30px, 4.2vw, 42px); margin-bottom: 48px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.feature-card {
    background: var(--card);
    border: 1px solid var(--hair);
    border-radius: var(--radius);
    padding: 26px;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 1px 2px rgba(43,35,32,.04);
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon {
    width: 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--sand);
    margin-bottom: 16px;
}
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature-card h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.feature-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 14px;
    background: var(--sand);
}
/* Category colours follow the app: nursing rose, sleep dusk, diaper ochre, health terracotta, growth sage. */
.ic-pink { stroke: var(--rose); } .ic-lav { stroke: var(--dusk); } .ic-orange { stroke: var(--ochre); }
.ic-red { stroke: var(--accent); } .ic-blue { stroke: var(--accent); } .ic-green { stroke: var(--sage); }
.tag-pink { color: var(--rose); } .tag-lavender { color: var(--dusk-ink); } .tag-orange { color: var(--ochre-ink); }
.tag-red, .tag-blue { color: var(--accent-ink); } .tag-green { color: var(--sage-ink); }

/* Screens gallery (English home) */
.screens { padding: 88px 0 72px; background: var(--card); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.screens h2 { font-size: clamp(30px, 4.2vw, 42px); margin-bottom: 10px; }
.screens .sub { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 44px; }
.screens ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px;
}
.screens figure { margin: 0; }
.screens img { width: 100%; border-width: 6px; border-radius: 34px; }
.screens figcaption { margin-top: 14px; text-align: center; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.screens figcaption span { display: block; font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--muted); }

/* Also in BabyLogly */
.soon { padding: 72px 0; background: var(--sand); text-align: center; border-top: 1px solid var(--hair); }
.soon h2 { font-size: clamp(26px, 3.6vw, 34px); margin-bottom: 10px; }
.soon p { color: var(--muted); max-width: 640px; margin: 0 auto 8px; }
.soon p b { color: var(--ink); }
.soon ul { list-style: none; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.soon li { background: var(--card); border: 1px solid var(--hair); border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 15px; }

/* Footer */
footer { border-top: 1px solid var(--hair); padding: 48px 0; text-align: center; background: var(--bg); }
footer p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
footer p:first-child { font-family: var(--serif); font-size: 19px; font-style: italic; color: var(--ink); }
footer a { color: var(--accent-ink); text-decoration: none; font-weight: 500; }
footer a:hover { text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: center; margin-top: 16px; }

a:focus-visible, .cta:focus-visible, summary:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 10px; }

@media (max-width: 900px) {
    .screens ul { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding: 4px 24px 12px; margin: 0 -24px; }
    .screens li { flex: 0 0 62%; scroll-snap-align: center; }
}
@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; }
    .hero { padding: 56px 0 40px; }
    .logo span { display: none; }
    .nav-links { gap: 14px; }
    .nav-links a { font-size: 13px; white-space: nowrap; }
    .nav-links .hide-sm { display: none; }
    .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 40px 24px; }
    .hero-shots { gap: 14px; margin-top: 44px; }
    .hero-shots .phone { width: 46%; max-width: 200px; border-width: 5px; border-radius: 30px; }
    .hero-shots .watch { display: none; }
    .features, .screens { padding: 64px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .hero-shots .phone { transform: none !important; } }

/* Language menu: <details> + real links, works without JavaScript. */
.langs { position: relative; margin-left: 16px; }
.langs > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); padding: 5px 11px; border-radius: 999px; border: 1px solid var(--hair); background: var(--card); }
.langs > summary::-webkit-details-marker { display: none; }
.langs > summary:hover { color: var(--accent-ink); }
.langs ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 120; list-style: none; padding: 5px; min-width: 180px; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; box-shadow: var(--shadow); }
.langs ul a, .langs ul .on { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink); }
.langs ul a:hover { background: var(--sand); color: var(--accent-ink); }
.langs ul .on { color: var(--accent-ink); font-weight: 700; }
.langs .fl { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
@media (max-width: 600px) { .langs .cur { display: none; } .langs { margin-left: 10px; } }

/* Official Apple "Download on the App Store" badge (inline SVG, unmodified artwork).
   Apple: min 40px tall on screen, clear space of 1/4 badge height, no effects.
   Black badge on light pages, white badge in dark mode. */
.appstore-badge { display: inline-block; line-height: 0; margin: 13px; border-radius: 9px; }
.appstore-badge svg { display: block; height: 54px; width: auto; }
.appstore-badge .badge-white { display: none; }
@media (prefers-color-scheme: dark) {
    .appstore-badge .badge-black { display: none; }
    .appstore-badge .badge-white { display: block; }
}
.appstore-badge:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 4px; }

/* Right-to-left languages (Hebrew). Everything is scoped to [dir="rtl"] or :lang(he), so left-to-right pages are untouched. */
html:lang(he) {
    /* Inter has no Hebrew: Latin keeps Inter, Hebrew falls through to system fonts (no webfont download). */
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Arial Hebrew', 'Noto Sans Hebrew', 'Segoe UI', Arial, sans-serif;
    --serif: 'Newsreader', 'Arial Hebrew', 'Noto Sans Hebrew', 'Segoe UI', Arial, sans-serif;
    --rounded: 'Inter', -apple-system, 'Arial Hebrew', 'Noto Sans Hebrew', 'Segoe UI', Arial, sans-serif;
}
html[dir="rtl"] .hero h1, html[dir="rtl"] .features h2, html[dir="rtl"] .soon h2, html[dir="rtl"] .screens h2,
html[dir="rtl"] .feature-card h3, html[dir="rtl"] .logo span, html[dir="rtl"] .hero-badge, html[dir="rtl"] .highlight-label { letter-spacing: 0; }
html[dir="rtl"] .hero h1 { line-height: 1.15; }
html[dir="rtl"] .hero h1 .accent, html[dir="rtl"] footer p:first-child { font-style: normal; }
html[dir="rtl"] .promise span::before { margin-right: 0; margin-left: 8px; }
html[dir="rtl"] .hero-shots { direction: ltr; }          /* phone screenshots keep their composition */
html[dir="rtl"] .langs { margin-left: 0; margin-right: 16px; }
html[dir="rtl"] .langs ul { right: auto; left: 0; }
@media (max-width: 600px) { html[dir="rtl"] .langs { margin-left: 0; margin-right: 10px; } }
