/*
 * Theme — Main CSS
 * Only design tokens (CSS variables) + minimal base.
 * All project-specific styles are written per project.
 */

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
    /* Rivera palette — sampled from the current site's stylesheet, so the
     * redesign stays the same site rather than a different one. */
    --color-navy-deep: #001331;  /* фон сторінки */
    --color-header-glow: #2a58b0; /* світла пляма градієнта біля лого */
    --color-navy:      #142250;  /* панель контенту */
    --color-navy-soft: #1c4485;  /* межі, розділювачі */
    --color-orange:    #ff9900;  /* акцент: слоган, заголовки, ціни */
    --color-orange-hot: #ff6600; /* помаранчева кнопка під курсором */
    --color-maroon:    #660000;  /* смуга меню */
    --color-maroon-hi: #a51c1c;  /* меню під курсором */
    --color-sky:       #99ccff;  /* другорядний текст на синьому */
    --color-panel:     #0b2a5b;  /* верх градієнта панелей секцій */
    --color-price:     #c9444c;  /* ціна в картці обʼєкта */
    --color-error:     #ff8a80;  /* помилки форм: 7:1 на navy-deep */
    --color-success:   #7ed99f;  /* «заявку отримано» */

    /* Semantic roles — overridden via Customizer inline CSS.
     * Keep the Customizer defaults in inc/customizer.php in step with these:
     * the inline style is printed after main.css and always wins. */
    --color-primary:   var(--color-navy);
    --color-secondary: #ffffff;
    --color-accent:    var(--color-orange);
    --color-text:      #ffffff;
    --color-muted:     var(--color-sky);
    --color-border:    var(--color-navy-soft);
    --color-bg:        var(--color-navy-deep);
    --color-bg-alt:    var(--color-navy);

    /* Typography
     * Arial, as on the current site — it declares Arial in 54 places and loads
     * no web font at all. Keeping it means zero font requests, no swap flash
     * and no layout shift.
     *
     * The stack is unquoted on purpose: these custom properties are also
     * written into an inline <style> from the Customizer, and quotes there
     * would come back as &quot; and kill the declaration.
     *
     * Fallbacks matter more than usual here — the site runs in nine languages.
     * Liberation Sans and Arimo are metric-compatible with Arial on Linux and
     * Android; Arimo and Noto Sans Hebrew carry the Hebrew glyphs that a bare
     * Liberation Sans does not.
     */
    --font-arial:   Arial, Helvetica Neue, Helvetica, Liberation Sans, Arimo, Noto Sans Hebrew, sans-serif;
    --font-body:    var(--font-arial);
    --font-heading: var(--font-arial);
    /* The card prices in the design are set in a black weight Arial has no
     * face for; Arial Black is on Windows and macOS, elsewhere bold Arial. */
    --font-price:   Arial Black, Arial Bold, Gadget, var(--font-arial);
    --line-height:  1.6;

    /* Type scale — measured on the current site, not invented.
     * Every size below appears in the live theme's CSS or in the design screens. */
    --fs-page-title:   34px;  /* «БУДИНКИ, ДАЧІ, ТАУНХАУСИ» */
    --fs-price-single: 34px;  /* ціна на сторінці обʼєкта */
    --fs-price-card:   20px;  /* ціна в картці каталогу */
    --fs-section:      20px;  /* «ОСТАННІ ПРОПОЗИЦІЇ», написи в панелі пошуку */
    --fs-body:         18px;  /* основний текст */
    --fs-card:         14px;  /* опис у картці */
    --fs-label:        12px;  /* дрібні написи: «ID ОБʼЄКТА», «ПЛОЩА» */
    --fs-label-sm:     11px;

    /* The old site sets text-transform: uppercase on almost every heading,
     * label and button. Kept as a token so sections stay consistent. */
    --tt-heading: uppercase;

    /* Layout */
    --container-width:   1380px;
    --container-padding: 1.5rem;

    /* UI */
    --radius:     4px;
    --transition: 0.2s ease;
    /* Slower step, for panels that change size rather than colour. */
    --transition-slow: 0.3s ease;
    --shadow:     0 4px 12px rgba(0, 0, 0, .12);

    /* Header / Footer */
    --header-height:  70px;
    /* Where the header's top row ends, measured from the top of the viewport.
     * js/main.js overwrites this on <html> from a live measurement — the row
     * changes with the breakpoint, with whatever logo the client uploads, and
     * with the admin bar WordPress adds for logged-in users. The value here is
     * only what the burger panel falls back to before the script runs. */
    --header-panel-top: 80px;
    --header-bg:      var(--color-navy-deep);
    --header-nav-bg:  var(--color-maroon);
    --footer-bg:      var(--color-navy);
    --footer-color:   var(--color-sky);

    /* Z-indexes */
    --z-dropdown: 100;
    --z-sticky:   200;
    --z-modal:    400;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
html {
    font-size: 16px;
    scroll-padding-top: var(--header-height);
}

body {
    font-family:      var(--font-body);
    font-size:        var(--fs-body);
    line-height:      var(--line-height);
    color:            var(--color-text);
    background-color: var(--color-bg);
    display:          flex;
    flex-direction:   column;
    min-height:       100vh;
}

/* The page ground: the design's navy with a glow on the top edge, over the
 * logo, that fades out below the menu, over the start of the content.
 *
 * It lives on body, not on .site: .site stops at 1800px, and on a wider
 * screen the glow ended there in a hard vertical edge. On body it spans the
 * whole window. The header and every page's <main> are transparent and show
 * this one gradient through, so there is no seam where the header ends. Its
 * height is in pixels, so it fades at the same depth on any page length.
 *
 * Measured off the client's reference (1200×749): the light peaks on the top
 * edge at ~22% of the width and fades out ~65% of the width across and ~580px
 * down. The stops are the reference's own colours, written as shares of the
 * glow over the page ground. */
body {
    background-image:  radial-gradient(
        ellipse 65% 580px at 22% 0,
        var(--color-header-glow) 0%,
        color-mix(in srgb, var(--color-header-glow) 91%, var(--color-bg)) 16%,
        color-mix(in srgb, var(--color-header-glow) 55%, var(--color-bg)) 42%,
        color-mix(in srgb, var(--color-header-glow) 22%, var(--color-bg)) 66%,
        color-mix(in srgb, var(--color-header-glow) 7%, var(--color-bg)) 88%,
        var(--color-bg) 100%
    );
    background-repeat: no-repeat;
}

.site {
    display:        flex;
    flex-direction: column;
    min-height:     100vh;
    width:          100%;
    max-width:      1800px;
    margin:         0 auto;
}

/* Every page sits on the same vertical inset; .request-page and the phone
 * breakpoints below adjust it rather than declaring it again. */
.site-main {
    flex:    1;
    padding: 40px 0 64px;
}

@media (max-width: 1023px) {
    .site-main {
        padding: 28px 0 56px;
    }
}

@media (max-width: 767px) {
    .site-main {
        padding: 20px 0 40px;
    }
}

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

/* .screen-reader-text lives in css/reset.css — the fuller version, with
 * clip-path and white-space, which this file used to override. */
