/*
 * urbanit — site theme for urbanit.gr
 * Source of truth: urbanitDesign/design-system/tokens.json and brand-guidelines.md.
 * Loaded after urbanit-bootstrap.css (the brand's Bootstrap 5.3 build).
 * Minimal on purpose: one ink, one paper, one red. No other hues, no shadows, no gradients.
 */

/* ------------------------------------------------------------------ Tokens: light (default) */
:root,
[data-bs-theme="light"] {
    --paper: #fafaf8;
    --paper-raised: #ffffff;
    --paper-deep: #efefec;
    --ink: #1d2125;
    --ink-muted: #5b6066;
    --rule: #dfdfdb;
    --grey-60: #77797c;
    --grey-40: #a4a6a7;
    --grey-20: #d1d2d2;
    --red: #f24f4f;
    --red-text: #c42f2f;
    --on-red: #141618;
    --focus: var(--ink);
}

/* ------------------------------------------------------------------ Tokens: Night */
[data-bs-theme="dark"] {
    --paper: #141618;
    --paper-raised: #1c1f22;
    --paper-deep: #25282c;
    --ink: #f2f1ee;
    --ink-muted: #a0a5aa;
    --rule: #34383c;
    --grey-60: #8f9398;
    --grey-40: #5f6368;
    --grey-20: #3a3d41;
    --red: #f24f4f;
    --red-text: #ff7a72;
    --on-red: #141618;
    --focus: var(--ink);
}

/* Night without JavaScript: follow the system preference unless light is forced. */
@media (prefers-color-scheme: dark) {
    :root:not([data-bs-theme="light"]) {
        --paper: #141618;
        --paper-raised: #1c1f22;
        --paper-deep: #25282c;
        --ink: #f2f1ee;
        --ink-muted: #a0a5aa;
        --rule: #34383c;
        --grey-60: #8f9398;
        --grey-40: #5f6368;
        --grey-20: #3a3d41;
        --red-text: #ff7a72;
    }
}

/* ------------------------------------------------------------------ Type, spacing, radius */
:root {
    --font-serif: "Literata", "Noto Serif", Georgia, serif;
    --font-sans: "Commissioner", "Noto Sans", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 48px;
    --space-6: 96px;

    --radius-none: 0;
    --radius-sm: 3px;
    --radius-full: 9999px;

    --measure: 68ch;
}

/* ------------------------------------------------------------------ Bootstrap, aligned to the tokens */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --bs-body-bg: var(--paper);
    --bs-body-color: var(--ink);
    --bs-emphasis-color: var(--ink);
    --bs-secondary-color: var(--ink-muted);
    --bs-tertiary-color: var(--ink-muted);
    --bs-secondary-bg: var(--paper-deep);
    --bs-tertiary-bg: var(--paper-raised);
    --bs-border-color: var(--rule);
    --bs-heading-color: var(--ink);
    --bs-link-color: var(--red-text);
    --bs-link-hover-color: var(--red-text);
    --bs-code-color: var(--ink);

    /* Square by default; radius-sm is set per control below. */
    --bs-border-radius: 0;
    --bs-border-radius-sm: 0;
    --bs-border-radius-lg: 0;
    --bs-border-radius-xl: 0;
    --bs-border-radius-xxl: 0;
    --bs-border-radius-2xl: 0;
    --bs-border-radius-pill: var(--radius-full);

    --bs-box-shadow: none;
    --bs-box-shadow-sm: none;
    --bs-box-shadow-lg: none;
    --bs-box-shadow-inset: none;
    --bs-focus-ring-width: 2px;
    --bs-focus-ring-color: var(--focus);
}

html {
    background-color: var(--paper);
}

/* 18px side gutters: the logo's clear space (one u-height) holds at every width. */
.container,
.container-fluid {
    --bs-gutter-x: 36px;
}

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 27px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------------ Focus: solid 2px ink, offset 2px, everywhere */
:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.nav-link:focus-visible,
.navbar-toggler:focus-visible,
.accordion-button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.accordion-button:focus,
.navbar-toggler:focus,
.btn:focus {
    box-shadow: none;
}

.skip-link {
    position: absolute;
    left: var(--space-3);
    top: -100px;
    z-index: 1000;
    padding: var(--space-2) var(--space-3);
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-sans);
    font-size: 15px;
    text-decoration: none;
}

.skip-link:focus {
    top: var(--space-2);
    color: var(--paper);
}

.site-content:focus {
    outline: none;
}

/* ------------------------------------------------------------------ Type roles */
h1, .h1 {
    /* title */
    font-family: var(--font-serif);
    font-size: 34px;
    line-height: 40px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--ink);
    margin-bottom: var(--space-3);
}

h2, .h2, h3, .h3 {
    /* heading */
    font-family: var(--font-sans);
    font-size: 21px;
    line-height: 28px;
    font-weight: 650;
    color: var(--ink);
    margin-top: var(--space-4);
    margin-bottom: var(--space-2);
}

h3, .h3 {
    font-size: 18px;
    line-height: 26px;
}

h4, .h4, h5, .h5, h6, .h6 {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
    color: var(--ink);
}

.lead {
    font-family: var(--font-serif);
    font-size: 20px;
    line-height: 30px;
    font-weight: 400;
    font-style: italic;
}

.label,
th {
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Eyebrows stay ink: red is kept for the page's one red moment. */
.eyebrow {
    color: var(--ink-muted);
}

code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 21px;
}

:not(pre) > code {
    color: var(--ink);
    background: var(--paper-deep);
    border-radius: var(--radius-sm);
    padding: 1px var(--space-1);
}

pre {
    color: var(--ink);
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    border-radius: var(--radius-none);
    padding: var(--space-3);
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Code highlighting, greys only: keywords bold, comments italic and muted. */
pre .token.comment, pre .hljs-comment, pre .token.prolog { color: var(--ink-muted); font-style: italic; }
pre .token.keyword, pre .hljs-keyword, pre .token.builtin { color: var(--ink); font-weight: 600; }
pre .token.string, pre .hljs-string, pre .token.number, pre .hljs-number,
pre .token.function, pre .hljs-title, pre .token.operator, pre .token.punctuation { color: var(--ink); }

/* Links: red-text, never red. Hover is a thicker underline, not a new colour. */
a {
    color: var(--red-text);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

a:hover {
    color: var(--red-text);
    text-decoration-thickness: 2px;
}

hr {
    border: 0;
    border-top: 1px solid var(--rule);
    opacity: 1;
}

::selection {
    background: var(--paper-deep);
    color: var(--ink);
}

/* ------------------------------------------------------------------ Shape: square blocks, 3px controls */
.btn,
.form-control,
.form-select,
.input-group-text,
.form-check-input[type="checkbox"] {
    --bs-btn-border-radius: var(--radius-sm);
    border-radius: var(--radius-sm);
}

.btn {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    box-shadow: none;
}

.form-control,
.form-select {
    border-color: var(--ink-muted);
    background-color: var(--paper-raised);
    color: var(--ink);
    font-family: var(--font-sans);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ink);
    background-color: var(--paper-raised);
    color: var(--ink);
}

.card,
.list-group,
.accordion,
.accordion-item,
.alert,
.badge,
.modal-content,
.dropdown-menu,
.img-thumbnail,
.rounded,
img {
    border-radius: var(--radius-none) !important;
    box-shadow: none !important;
}

.shadow, .shadow-sm, .shadow-lg {
    box-shadow: none !important;
}

.card {
    --bs-card-bg: var(--paper-raised);
    --bs-card-border-color: var(--rule);
    --bs-card-cap-bg: transparent;
    --bs-card-spacer-y: var(--space-3);
    --bs-card-spacer-x: var(--space-3);
}

.card-header {
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    border-bottom: 1px solid var(--rule);
    padding-top: var(--space-3);
    padding-bottom: var(--space-2);
}

.card-title,
.card .card-title {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
    margin-top: var(--space-3);
    margin-bottom: var(--space-1);
}

.card-body > .card-title:first-child {
    margin-top: 0;
}

.blockquote-footer {
    color: var(--ink-muted);
    font-family: var(--font-sans);
    font-size: 13px;
    margin-top: calc(-1 * var(--space-2));
}

.blockquote-footer::before {
    content: none;
}

.blockquote-footer cite {
    font-style: normal;
}

.list-group {
    --bs-list-group-bg: transparent;
    --bs-list-group-border-color: var(--rule);
    --bs-list-group-color: var(--ink);
}

.accordion {
    --bs-accordion-bg: var(--paper-raised);
    --bs-accordion-border-color: var(--rule);
    --bs-accordion-active-bg: var(--paper-deep);
    --bs-accordion-active-color: var(--ink);
    --bs-accordion-btn-focus-box-shadow: none;
}

/* ------------------------------------------------------------------ Header and navigation */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
}

.site-nav {
    --bs-navbar-padding-y: var(--space-3);
    --bs-navbar-color: var(--ink);
    --bs-navbar-hover-color: var(--ink);
    --bs-navbar-active-color: var(--ink);
    --bs-navbar-brand-color: var(--ink);
    --bs-navbar-brand-hover-color: var(--ink);
}

/* The logo: 120px wide (minimum 96px), clear space of one u-height (~18px at this size) kept on every side. */
.site-brand {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 18px 18px 18px 0; /* left clear space is the 18px container gutter */
    color: var(--ink);
    line-height: 0;
}

.site-brand:hover,
.site-brand:focus {
    color: var(--ink);
}

.urbanit-logo {
    display: block;
    width: 120px;
    min-width: 96px;
    height: auto;
    color: var(--ink);
}

.site-nav-toggle {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    border: 1px solid var(--ink-muted);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-3);
}

/* Light / Night switch: icon only, thin outline like the footer icons. */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: var(--ink-muted);
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.theme-toggle[hidden] {
    display: none;
}

.theme-toggle:hover {
    color: var(--ink);
}

.theme-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-icon-sun,
[data-bs-theme="dark"] .theme-icon-moon {
    display: none;
}

[data-bs-theme="dark"] .theme-icon-sun {
    display: block;
}

/* Native controls and scrollbars follow the chosen mode, not only the system one. */
[data-bs-theme="light"] {
    color-scheme: light;
}

[data-bs-theme="dark"] {
    color-scheme: dark;
}

.site-nav .nav-link {
    display: inline-flex;
    align-items: baseline;
    gap: var(--space-2);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 22px;
    color: var(--ink);
    text-decoration: none;
    padding: var(--space-2) 0;
}

/* The nav collapses into the Menu button below 992px (navbar-expand-lg). */
@media (min-width: 992px) {
    .site-nav .navbar-nav {
        gap: var(--space-3);
    }
}

@media (min-width: 1200px) {
    .site-nav .navbar-nav {
        gap: var(--space-4);
    }
}

@media (max-width: 991.98px) {
    .site-nav .navbar-nav {
        padding: var(--space-2) 0 var(--space-3);
    }
}

.site-nav .nav-hint {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
    color: var(--ink-muted);
    white-space: nowrap;
}

.site-nav .nav-link {
    white-space: nowrap;
}

.site-nav .nav-link:hover .nav-label,
.site-nav .nav-link[aria-current="page"] .nav-label {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.3em;
}

.site-nav .nav-link[aria-current="page"] .nav-label {
    text-decoration-thickness: 2px;
}

/* ------------------------------------------------------------------ Home hero (the "Hero" widget) */
.hero-section {
    background: var(--paper);
    color: var(--ink);
    padding: var(--space-6) 0 var(--space-5);
}

.hero-section .hero-title {
    /* display */
    font-family: var(--font-serif);
    font-size: clamp(38px, 7vw, 56px);
    line-height: 1.07;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-4);
}

.hero-section .hero-subtitle {
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
    color: var(--ink-muted);
    max-width: var(--measure);
    margin-bottom: var(--space-4);
}

.hero-section .lead {
    color: var(--ink);
    max-width: var(--measure);
}

/* Stats: ink figures; add .is-key to the single figure that matters to make it the page's red moment. */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--rule);
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 34px;
    line-height: 40px;
    color: var(--ink);
}

.stat-number.is-key {
    color: var(--red);
}

.stat-label {
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* ------------------------------------------------------------------ Page headers (Privacy, Terms, Contact) */
.hero {
    background: var(--paper);
    padding: var(--space-5) 0 var(--space-4);
    border-bottom: 1px solid var(--rule);
}

.hero h1 {
    margin-bottom: var(--space-2);
}

.hero p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 20px;
    line-height: 30px;
    color: var(--ink-muted);
    max-width: var(--measure);
    margin-bottom: 0;
}

.content-section {
    padding: var(--space-5) 0;
}

/* Left-aligned, ragged right: the policy pages' centred column starts under the page title. */
.content-section .mx-auto {
    margin-left: 0 !important;
}

.content-card {
    max-width: 70ch;
}

.content-card h2 {
    margin-top: var(--space-5);
}

.last-updated {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 20px;
    color: var(--ink-muted);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--rule);
}

.info-box {
    background: var(--paper-deep);
    border-left: 2px solid var(--ink);
    padding: var(--space-3) var(--space-4);
    margin: var(--space-4) 0;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Contact page cards sit below the page header */
.flow .container.mt-5 {
    margin-top: var(--space-5) !important;
    margin-bottom: var(--space-5);
}

.flow .row > .col {
    min-width: min(100%, 320px);
    margin-bottom: var(--space-4);
}

/* ------------------------------------------------------------------ Blog */
.page-container {
    padding-top: var(--space-5);
    padding-bottom: var(--space-5);
}

.prose,
.blog-post {
    max-width: var(--measure);
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 27px;
}

.prose p,
.blog-post p {
    margin-bottom: var(--space-3);
}

.post-header {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--rule);
}

/* urbanit-bootstrap sets .prose headings in the sans; the title role is Literata. */
.prose h1,
.post-title {
    font-family: var(--font-serif);
    font-weight: 500;
}

.post-title {
    margin-bottom: 0;
}

.blog {
    max-width: var(--measure);
}

.blog .list-group-item {
    background: transparent;
    border-left: 0;
    border-right: 0;
    padding: var(--space-4) 0;
}

.blog .list-group-item:first-child {
    border-top: 0;
}

.blog .content-blog-post h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
    margin: 0 0 var(--space-2);
}

.blog .content-blog-post h2 a {
    color: var(--ink);
    text-decoration: none;
}

.blog .content-blog-post h2 a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

/* ------------------------------------------------------------------ Footer: whitespace first, one hairline */
.site-footer {
    margin-top: var(--space-6);
    padding: var(--space-5) 0 var(--space-4);
    border-top: 1px solid var(--rule);
    background: var(--paper);
    color: var(--ink-muted);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 22px;
}

.site-footer p {
    font-family: var(--font-sans);
}

.site-footer-name {
    color: var(--ink);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.social-links,
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.footer-links {
    margin-bottom: var(--space-3);
}

@media (min-width: 768px) {
    .footer-links {
        justify-content: flex-end;
        gap: var(--space-4);
    }
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: -8px;
    color: var(--ink-muted);
}

.social-links a:hover {
    color: var(--ink);
}

.social-links svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-links a {
    color: var(--ink-muted);
    text-decoration: none;
}

.footer-links li:has(> [hidden]) {
    display: none;
}

/* "Cookie settings" is a button (it opens the banner) styled like the footer links. */
.footer-link-button {
    font: inherit;
    color: var(--ink-muted);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.footer-link-button:hover {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.footer-links a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.site-footer-notice {
    margin: 0;
    font-size: 13px;
    color: var(--ink-muted);
}

/* ------------------------------------------------------------------ Cookie consent */
/* A quiet bar at the bottom of the viewport: paper-raised, hairline on top, no red.
   Accept and Reject look exactly the same, so neither is the "easy" choice. */
.consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: var(--paper-raised);
    color: var(--ink);
    border-top: 1px solid var(--rule);
    padding: var(--space-3) 0;
}

.consent[hidden] {
    display: none;
}

.consent-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-4);
}

.consent-text {
    flex: 1 1 32rem;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 22px;
}

.consent-text p {
    margin: 0;
    max-width: var(--measure);
    color: var(--ink-muted);
}

.consent-title {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 22px;
    font-weight: 650;
    margin: 0 0 var(--space-1);
    color: var(--ink);
}

.consent-actions {
    display: flex;
    gap: var(--space-2);
}

.consent-button {
    min-width: 96px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    color: var(--ink);
    background: var(--paper-raised);
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
}

.consent-button:hover {
    background: var(--paper-deep);
}

@media (max-width: 575.98px) {
    .consent-actions {
        width: 100%;
    }

    .consent-button {
        flex: 1 1 0;
    }
}

/* ------------------------------------------------------------------ Small screens */
@media (max-width: 767.98px) {
    .hero-section {
        padding: var(--space-5) 0 var(--space-5);
    }

    h1, .h1 {
        font-size: 30px;
        line-height: 36px;
    }
}
