/* Первый экран из согласованных desktop/mobile макетов. Остальной лендинг сохраняет свой шрифт. */
@font-face {
    font-family: Onest;
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/fonts/onest-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Onest;
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/fonts/onest-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
        U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.landing-header, .try-hero { font-family: Onest, sans-serif; line-height: 1.45; }
.landing-header {
    position: static;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.landing-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    border-bottom: 1px solid color-mix(in srgb, var(--color-text) 13%, transparent);
}
.landing-header .logo { font-size: 30px; letter-spacing: -0.035em; }
.landing-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.landing-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.landing-nav a:hover { color: var(--color-accent-ink); }
.landing-nav .landing-login { padding: 0 18px; border: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent); border-radius: 12px; }
.landing-header .theme-toggle { width: 40px; height: 40px; background: transparent; border: 0; box-shadow: none; }
.landing-header .theme-toggle svg { width: 22px; height: 22px; }
.try-hero.hero { display: block; padding: 24px 0 32px; text-align: center; }
.try-positioning { color: var(--color-text-muted); font-size: 16px; font-weight: 500; margin-bottom: 10px; }
.try-hero h1 {
    font-family: Onest, sans-serif;
    font-size: clamp(32px, 4.2vw, 54px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.035em;
    max-width: none;
    margin: 0 0 14px;
    text-wrap: balance;
}
.try-subtitle { margin: 0 auto 28px; max-width: 700px; font-size: 18px; color: var(--color-text-muted); text-wrap: balance; }
.try-workspace {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    background: var(--color-surface);
    border-radius: 24px;
    padding: 20px;
    margin: 0;
    text-align: left;
    box-shadow: 0 10px 26px var(--color-shadow);
    border: 1px solid color-mix(in srgb, var(--color-text) 5%, transparent);
}
.try-upload {
    border: 1px dashed color-mix(in srgb, var(--color-text) 30%, transparent);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.try-upload__icon { width: 46px; height: 46px; color: var(--color-text-muted); margin-bottom: 12px; }
.try-upload h2 { font: 700 24px/1.25 Onest, sans-serif; margin: 0 0 10px; }
.try-drag-hint { color: var(--color-text-muted); font-size: 14px; margin-bottom: 22px; }
.try-pick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 340px;
    min-height: 54px;
    padding: 12px 16px;
    background: var(--color-accent-strong);
    color: #fff;
    border: 1px solid transparent;
    border-radius: 12px;
    font: 600 17px/1.3 Onest, sans-serif;
    transition: background-color 160ms ease;
}
.try-pick svg { width: 22px; height: 22px; flex: 0 0 auto; }
.try-pick:hover:not(:disabled) { background: var(--color-accent-hover); }
.try-pick:disabled { cursor: default; opacity: 0.65; }
.try-pick--secondary { background: transparent; color: var(--color-accent-ink); border-color: currentColor; }
.try-pick--secondary:hover:not(:disabled) { background: color-mix(in srgb, var(--color-accent) 8%, transparent); }
.try-conditions { font-size: 13px; color: var(--color-text-muted); margin: 12px 0 8px; }
.try-privacy { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--color-text-muted); }
.try-privacy svg { width: 16px; height: 16px; }
.try-result {
    padding: 4px 0 4px 24px;
    margin-left: 24px;
    border-left: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
    min-width: 0;
    align-self: center;
}
.try-result-label { font-size: 13px; font-weight: 600; color: var(--color-text-muted); margin-bottom: 20px; }
.try-result-grid { display: grid; grid-template-columns: minmax(110px, 0.85fr) minmax(0, 1.2fr); align-items: center; gap: 18px; }
.try-photo { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 14px; align-self: start; }
.try-hero .mockup-card__head { margin-bottom: 8px; }
.try-hero .mockup-card__name { font-size: 19px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.try-hero .mockup-card__cal { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 7px; }
.try-hero .mockup-card__cal-num { font-size: 36px; font-weight: 700; line-height: 1.15; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.try-hero .mockup-card__cal-unit { font-size: 21px; font-weight: 600; }
.try-portion { font-size: 14px; color: var(--color-text-muted); margin: 8px 0 18px; }
.try-hero .mockup-card__macros { display: flex; flex-wrap: wrap; gap: 7px; font-size: 13px; font-weight: 600; }
.try-macro { border-radius: 7px; padding: 5px 7px; white-space: nowrap; }
.try-macro--protein { background: color-mix(in srgb, var(--macro-protein) 20%, var(--color-surface)); }
.try-macro--fat { background: color-mix(in srgb, var(--macro-fat) 20%, var(--color-surface)); }
.try-macro--carb { background: color-mix(in srgb, var(--macro-carb) 20%, var(--color-surface)); }
.try-estimate { font-size: 12px; color: var(--color-text-muted); margin-top: 18px; }
.try-credit { grid-column: 1 / -1; text-align: right; font-size: 12px; color: var(--color-text-muted); margin-top: 14px; }
.try-credit a { text-decoration: underline; text-underline-offset: 3px; }
.try-entry { margin-top: 16px; font-size: 14px; color: var(--color-text-muted); }
.try-entry__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; margin-top: 2px; }
.try-entry a { color: var(--color-accent-ink); font-size: 16px; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; }
.guest-file[hidden], .guest-actions[hidden] { display: none; }
.guest-hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.guest-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.guest-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 0; border-radius: 10px; padding: 10px 15px; font: 600 14px/1.35 Onest, sans-serif; background: var(--color-accent-strong); color: #fff; }
.guest-btn:hover { background: var(--color-accent-hover); }
.guest-btn--ghost { background: transparent; color: var(--color-accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.guest-btn--ghost:hover { background: transparent; }
.guest-remaining { flex-basis: 100%; font-size: 12px; color: var(--color-text-muted); }
.guest-msg { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.guest-msg--sub { font-size: 13px; color: var(--color-text-muted); margin-top: 7px; }
.guest-skeleton { display: block; height: 12px; border-radius: 5px; background: color-mix(in srgb, var(--color-text) 12%, transparent); margin-top: 10px; animation: guest-pulse 1.2s ease-in-out infinite; }
.guest-skeleton--wide { width: 80%; }
.guest-skeleton--num { width: 65%; height: 30px; }
.try-workspace.is-dragover .try-upload { outline: 3px solid var(--color-accent-ink); outline-offset: 3px; }
.try-workspace[data-state='loading'] .try-photo { opacity: 0.65; }
.try-workspace:not([data-state='idle']):not([data-state='disabled']) .guest-credit { display: none; }
.try-hero :focus-visible, .landing-header :focus-visible { outline: 3px solid var(--color-accent-ink); outline-offset: 4px; }
.try-hero ::selection { background: var(--color-accent-strong); color: #fff; }
#how-it-works { scroll-margin-top: 24px; }
@keyframes guest-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: no-preference) {
    .try-photo.is-new-preview {
        outline: 2px solid transparent;
        outline-offset: -2px;
        animation: guest-photo-accepted 120ms ease-out;
    }
    .try-workspace[data-state='result'] #guest-card-inner {
        animation: guest-result-arrive 220ms cubic-bezier(0.16, 1, 0.3, 1);
    }
}
@keyframes guest-photo-accepted { from { outline-color: var(--color-accent-ink); } }
@keyframes guest-result-arrive { from { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .try-hero *, .landing-header * { transition: none; }
    .guest-skeleton { animation: none; }
}
@media (max-width: 960px) {
    .try-workspace { grid-template-columns: 1fr 1fr; padding: 20px; }
    .try-result { margin-left: 18px; padding-left: 18px; }
    .try-result-grid { grid-template-columns: 100px minmax(0, 1fr); gap: 12px; }
    .try-hero .mockup-card__cal-num { font-size: 30px; }
    .try-hero .mockup-card__cal-unit { font-size: 17px; }
}
@media (max-width: 700px) {
    .landing-header__inner { min-height: 64px; }
    .landing-header .logo { font-size: 27px; }
    .landing-nav { gap: 10px; }
    .landing-nav .landing-nav__desktop { display: none; }
    .landing-nav .landing-login { min-height: 38px; padding: 0 14px; font-size: 14px; }
    .landing-header .theme-toggle { width: 36px; height: 38px; padding: 7px; }
    .try-hero.hero { padding: 22px 0 36px; }
    .try-positioning { font-size: 13px; margin-bottom: 9px; }
    .try-hero h1 { font-size: clamp(29px, 8.4vw, 38px); letter-spacing: -0.03em; margin-bottom: 12px; max-width: 480px; margin-inline: auto; }
    .try-hero h1 span { display: block; }
    .try-subtitle { font-size: 15px; line-height: 1.5; margin-bottom: 22px; max-width: 360px; }
    .try-workspace { display: block; padding: 16px; border-radius: 20px; }
    .try-upload { padding: 17px 14px; }
    .try-upload__icon { width: 32px; height: 32px; margin-bottom: 8px; }
    .try-upload h2 { font-size: 19px; margin-bottom: 16px; }
    .try-drag-hint { display: none; }
    .try-pick { min-height: 50px; font-size: 16px; padding: 12px; }
    .try-conditions { font-size: 12px; margin: 10px 0 6px; }
    .try-privacy { font-size: 12px; }
    .try-result { margin: 18px 0 0; padding: 16px 0 0; border-left: 0; border-top: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent); }
    .try-result-label { font-size: 12px; margin-bottom: 12px; }
    .try-result-grid { grid-template-columns: 100px minmax(0, 1fr); gap: 14px; }
    .try-hero .mockup-card__name { font-size: 16px; }
    .try-hero .mockup-card__head { margin-bottom: 5px; }
    .try-hero .mockup-card__cal-num { font-size: 28px; }
    .try-hero .mockup-card__cal-unit { font-size: 17px; }
    .try-portion { font-size: 12px; margin: 5px 0 10px; }
    .try-hero .mockup-card__macros { gap: 5px; font-size: 12px; }
    .try-macro { padding: 4px 6px; }
    .try-estimate { font-size: 12px; margin-top: 12px; }
    .try-credit { font-size: 12px; margin-top: 12px; text-align: left; }
    .try-entry { margin-top: 18px; font-size: 13px; }
    .try-entry__links { gap: 20px; }
    .try-entry a { font-size: 15px; }
}
@media (max-width: 359px) {
    .try-workspace { padding: 12px; }
    .try-upload { padding: 16px 10px; }
    .try-result-grid { grid-template-columns: 82px minmax(0, 1fr); gap: 10px; }
    .try-hero .mockup-card__cal-num { font-size: 24px; }
    .try-hero .mockup-card__cal-unit { font-size: 15px; }
}
