/* hostrivo storefront base styles, tokens from hostrivomain/DESIGN.md (Signal) */

/* Signal typefaces, self hosted (GDPR): assets/fonts, SIL OFL 1.1.
   Variable woff2, split latin / latin-ext so a page without latin-ext
   characters only pulls the smaller file. */

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/inter-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;
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: Archivo;
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url("../fonts/archivo-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;
}

@font-face {
    font-family: Archivo;
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/jetbrains-mono-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;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --bg: #EAEAEC;
    --surface: #FFFFFF;
    --raised: #FFFFFF;
    --border: #D8D8DC;
    --text: #1B1B1E;
    --muted: #66666C;
    --accent: #C13E0E;
    --accent-hover: #A93509;
    --on-accent: #FFFFFF;
    --success: #3FA363;
    --warning: #C9A227;
    --danger: #CC2E2E;
    --info: #5B8DB8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 6px 16px -10px rgba(0, 0, 0, 0.18);
    --radius: 6px;
    --radius-sm: 4px;
    --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-heading: Archivo, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-mono: "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
    --bg: #17171A;
    --surface: #1F1F23;
    --raised: #27272C;
    --border: #38383E;
    --text: #EDEDEF;
    --muted: #9C9CA2;
    --accent: #E8551F;
    --accent-hover: #F26A38;
    --on-accent: #1C0D06;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px -10px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin: 0 0 12px 0;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

/* the accent carries the focus ring, rule 2 */
a:focus-visible,
.btn:focus-visible,
.mode-toggle:focus-visible,
.lang-switch button:focus-visible,
.site-news-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* the reading measure is for prose; the bars and the product grid use the
   screen they are given */
.site-nav .wrap,
.site-footer .wrap,
.site-section > .wrap {
    max-width: none;
    padding: 0 32px;
}

/* top navigation */
.site-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-nav .wrap {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 60px;
}

.site-brand {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
}

.site-brand span:not(.brand-text) {
    color: var(--accent);
}

.site-brand img {
    max-height: 30px;
    display: block;
}

.site-nav a.nav-link {
    color: var(--muted);
    font-size: 14px;
}

.site-nav a.nav-link:hover,
.site-nav a.nav-link.is-active {
    color: var(--text);
}

.site-nav .spacer {
    flex: 1;
}

.lang-switch {
    display: flex;
    gap: 2px;
}

.lang-switch button {
    background: transparent;
    border: 0;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    text-transform: uppercase;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.lang-switch button.is-active {
    color: var(--text);
    background: var(--bg);
}

/* the toggle shows the mode it switches to */
.mode-toggle svg {
    display: block;
    margin: 0 auto;
}

:root[data-theme="dark"] .icon-moon,
:root:not([data-theme="dark"]) .icon-sun {
    display: none;
}

.mode-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    width: 30px;
    height: 30px;
    cursor: pointer;
    line-height: 1;
}

/* used by the theme views for secondary text */
.muted {
    color: var(--muted);
}

/* buttons */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--on-accent);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--muted);
    color: var(--text);
}

/* hero */
.site-hero {
    padding: 72px 0 56px 0;
    text-align: center;
}

.site-hero h1 {
    font-size: 40px;
    margin-bottom: 14px;
}

.site-hero p {
    color: var(--muted);
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto 26px auto;
}

.site-hero .actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* offer grid */
.site-section {
    padding: 30px 0 60px 0;
}

.site-section > .wrap > h2 {
    font-size: 26px;
    text-align: center;
    margin-bottom: 26px;
}

/* one section per category, the type sections follow them */
.offer-group + .offer-group {
    margin-top: 44px;
}

.offer-group-head {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 18px 0;
}

.offer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
}

.offer-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.offer-card h3,
.offer-card h4 {
    font-size: 17px;
    margin: 0;
}

.offer-card .offer-type {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: -6px;
}

.offer-card .desc {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.offer-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: var(--muted);
}

.offer-card ul li {
    padding: 3px 0;
    border-bottom: 1px solid var(--border);
}

.offer-card ul li:last-child {
    border-bottom: 0;
}

.offer-card .price {
    margin-top: auto;
    padding-top: 8px;
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.offer-card .price span {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

.offer-card .chip {
    align-self: flex-start;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--muted);
}

.offer-card .chip.chip-warning {
    color: var(--warning);
    border-color: var(--warning);
}

.offers-empty {
    text-align: center;
    color: var(--muted);
    padding: 30px 0;
}

/* text pages (imprint, terms, privacy) */
.site-prose {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 20px 72px 20px;
}

.site-prose h1 {
    font-size: 30px;
}

.site-prose h2 {
    font-size: 19px;
    margin-top: 28px;
}

.site-prose p {
    color: var(--muted);
}

/* news */
.site-news #news-head {
    padding-bottom: 0;
}

.site-news #news-list,
.site-news #news-empty,
.site-news #news-foot {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px 24px 20px;
}

.site-news-item {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 18px 20px;
    margin-bottom: 14px;
    color: inherit;
    text-decoration: none;
}

.site-news-item:hover h2 {
    color: var(--accent);
}

.site-news-item h2 {
    font-size: 18px;
    margin: 0 0 2px 0;
}

.site-news-item p {
    color: var(--muted);
    margin: 8px 0 0 0;
    font-size: 14px;
}

.site-news-date {
    color: var(--muted);
    font-size: 12px;
}

.site-news #news-foot {
    padding-bottom: 60px;
}

/* footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 26px 0;
    margin-top: 40px;
}

.site-footer .wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}

.site-footer a {
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--text);
}

.site-footer .spacer {
    flex: 1;
}

@media (max-width: 640px) {
    .site-hero {
        padding: 44px 0 32px 0;
    }

    .site-hero h1 {
        font-size: 30px;
    }

    .site-nav .wrap {
        flex-wrap: wrap;
        gap: 10px 14px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* contact form and help center */
.site-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

@media (max-width: 640px) {
    .site-fields {
        grid-template-columns: 1fr;
    }
}

.site-field {
    margin-bottom: 14px;
}

.site-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.site-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.site-input:focus {
    outline: none;
    border-color: var(--accent);
}

.site-honey {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.site-alert {
    padding: 10px 12px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    color: var(--accent);
    font-size: 13px;
}

.site-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.site-thread {
    margin: 18px 0 24px;
}

.site-msg {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    background: var(--surface);
}

.site-msg.is-staff {
    border-color: var(--accent);
}

.site-msg-meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.site-msg p {
    margin: 0 0 8px;
}

.site-help-group {
    margin: 24px 0;
}

.site-help-group h2 {
    font-size: 16px;
    margin: 0 0 8px;
}

.site-help-item {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    text-decoration: none;
    color: var(--text);
}

.site-help-item:hover {
    border-color: var(--accent);
}

.site-help-item strong {
    display: block;
}

.site-help-item span {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

.kb-body {
    line-height: 1.65;
}

.kb-body pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    overflow-x: auto;
    font-size: 13px;
}

.kb-body img {
    max-width: 100%;
    border-radius: var(--radius);
}

.site-vote {
    margin-top: 28px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
}
