/* ============================================================
   Lignexo — shared stylesheet
   Tokens, reset, buttons, forms, header, footer and the states
   the platform components add (raz-on, raz-off, raz-disabled).
   Every page's stylesheet is merged into one head on the React
   side, so nothing here depends on the page it loads on.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
    /* Bark (brand): the logo PNG's tan and its shades */
    --color-bark-800: #74512b;
    --color-bark-700: #8f6436;
    --color-bark-600: #ad7b44;
    --color-bark-500: #c49057;
    --color-bark-300: #d9b587;
    --color-bark-100: #f6ebdc;

    /* Ink (neutrals, warm) */
    --color-ink-900: #22201c;
    --color-ink-700: #57534e;
    --color-ink-500: #8a857d;
    --color-ink-300: #d6d2cb;
    --color-ink-200: #e8e5df;
    --color-ink-100: #f4f2ee;
    --color-paper: #fbfaf7;
    --color-white: #ffffff;
    --color-black: #000000;

    --color-danger: #b3261e;
    --color-success: #2e7d4f;

    /* Typography */
    --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Shape */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(34, 32, 28, 0.06), 0 1px 3px rgba(34, 32, 28, 0.08);
    --shadow-md: 0 4px 14px rgba(34, 32, 28, 0.1);
    --shadow-lg: 0 12px 32px rgba(34, 32, 28, 0.14);

    /* Layout */
    --header-height: 72px;
    --container-max: 1240px;
    --container-padding: 1.25rem;
    --focus-ring: 0 0 0 3px rgba(173, 123, 68, 0.45);
}

/* --- Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-ink-900);
    background-color: var(--color-paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.mobile-menu-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    color: var(--color-ink-900);
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
}

h2 {
    font-size: var(--font-size-2xl);
}

h3 {
    font-size: var(--font-size-xl);
}

h4 {
    font-size: var(--font-size-lg);
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
}

/* --- Layout helpers --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

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

main {
    min-height: calc(100vh - var(--header-height) - 240px);
}

/* The React layout reserves its height while the loading screen shows. */
body > main.react-root {
    padding-bottom: 0;
}
.react-root > div {
    min-height: 100vh;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: var(--font-size-sm);
    line-height: 1;
    padding: 0.8rem 1.4rem;
    border-radius: var(--radius-md);
    border: 1.5px solid transparent;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

/* The primary button is black, like the logo's disc */
.btn-primary {
    background-color: var(--color-black);
    border-color: var(--color-black);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-ink-900);
    border-color: var(--color-ink-900);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* The secondary button is the logo's tan, darkened until white text reads on it */
.btn-secondary {
    background-color: var(--color-bark-700);
    border-color: var(--color-bark-700);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-bark-800);
    border-color: var(--color-bark-800);
}

.btn-outline {
    background-color: var(--color-white);
    border-color: var(--color-ink-300);
    color: var(--color-ink-900);
}

.btn-outline:hover,
.btn-outline.raz-on {
    border-color: var(--color-ink-900);
    color: var(--color-ink-900);
    background-color: var(--color-bark-100);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-ink-900);
    padding: 0.6rem 0.9rem;
}

.btn-ghost:hover,
.btn-ghost.raz-on {
    background-color: var(--color-bark-100);
}

.btn-sm {
    padding: 0.6rem 1rem;
    font-size: var(--font-size-sm);
}

.btn-block {
    width: 100%;
}

.btn.raz-disabled,
.btn[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.4;
    background-color: var(--color-bark-100);
    color: var(--color-bark-700);
}

.badge-service {
    background-color: var(--color-white);
    border: 1px solid var(--color-bark-300);
    color: var(--color-bark-700);
}

.badge-soldout {
    background-color: var(--color-ink-900);
    color: var(--color-white);
}

.badge-special {
    background-color: var(--color-white);
    border: 1px solid var(--color-ink-300);
    color: var(--color-ink-700);
    text-transform: none;
    letter-spacing: 0;
}

.badge-special:hover {
    border-color: var(--color-bark-500);
    color: var(--color-bark-700);
}

/* --- Forms --- */
.form-input,
.form-select,
input[type="text"]:not(.MuiInputBase-input),
input[type="email"]:not(.MuiInputBase-input),
input[type="search"]:not(.MuiInputBase-input),
input[type="tel"]:not(.MuiInputBase-input),
input[type="number"]:not(.MuiInputBase-input),
select:not(.MuiInputBase-input),
textarea:not(.MuiInputBase-input) {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-sm);
    color: var(--color-ink-900);
    border: 1.5px solid var(--color-ink-300);
    border-radius: var(--radius-md);
    background-color: var(--color-white);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.form-input:focus,
.form-select:focus,
input:not(.MuiInputBase-input):focus,
select:not(.MuiInputBase-input):focus,
textarea:not(.MuiInputBase-input):focus {
    outline: none;
    border-color: var(--color-bark-500);
    box-shadow: var(--focus-ring);
}

.form-input::placeholder {
    color: var(--color-ink-500);
}

.form-select {
    appearance: none;
    padding-right: 2.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2357534e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
}

/* ============================================================
   HEADER
   The header takes the logo's own tan, so the opaque PNG sits on
   it edge to edge. Text on that tan is dark ink, like the logo's
   disc; white (2.8:1 against it) is too faint to read.
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background-color: var(--color-bark-500);
    color: var(--color-ink-900);
    border-bottom: 1px solid var(--color-bark-600);
    /* No backdrop-filter here: it would make the header the containing block
       of the fixed mobile drawer, which then collapses to the header's height. */
}

/* Focus rings read as black on the tan */
.site-header :focus-visible,
.mobile-menu :focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* The logo never shrinks: flex-none on the wrapper, no percentage max-width on the image.
   The PNG's tan background is the header's, so it needs no frame. */
.header-logo {
    flex: none;
    display: flex;
    align-items: center;
}

.header-logo img {
    display: block;
    height: 56px;
    width: auto;
    max-width: none;
}

@media (max-width: 599px) {
    .header-container {
        gap: var(--space-sm);
    }

    .header-logo img {
        height: 42px;
    }

    .header-actions {
        gap: var(--space-sm);
    }

    /* Icon only: the account label does not fit beside the logo and the switcher */
    .header-user-menu .user-menu--name-span {
        display: none;
    }
}

.header-nav {
    display: none;
}

.header-nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.header-nav a {
    position: relative;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-ink-900);
    padding: 0.4rem 0;
    transition: color 0.18s ease;
}

.header-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: var(--radius-full);
    background-color: var(--color-black);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.18s ease;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--color-black);
}

.header-nav a:hover::after,
.header-nav a.active::after {
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-cta {
    display: none;
}

/* Language switcher: the platform marks the current language with raz-on */
.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: var(--radius-full);
    /* A lighter track, so the dark letters of the other language stay legible on it */
    background-color: rgba(255, 255, 255, 0.28);
}

.language-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--color-ink-900);
    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}

.language-switcher a:hover {
    color: var(--color-black);
}

/* The current language is a black disc with white letters, like the logo's */
.language-switcher a.is-current,
.language-switcher a.raz-on {
    background-color: var(--color-black);
    color: var(--color-white);
}

/* User menu block (medialem/user-menu). Its script renders the link as `.btn.btn-ghost`,
   so the sizing matches `.btn-sm` next to it and the hover stays legible on the tan;
   three classes because the block's own styles are inlined after this sheet. */
.site-header .header-user-menu .user-menu--name,
.site-header .header-user-menu a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.6rem 1rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-ink-900);
    background-color: transparent;
    border-radius: var(--radius-md);
}

.site-header .header-user-menu .user-menu--name:hover,
.site-header .header-user-menu .user-menu--name:focus-visible {
    color: var(--color-black);
    background-color: rgba(0, 0, 0, 0.1);
}

/* Same icon size as the CTA's, so both links come out the same height; the block sizes the
   icon from its own custom property, the only rule of its own that this needs to beat. */
.site-header .header-user-menu {
    --user-icon-size: 18px;
}

/* The dropdown stays a light panel; its links keep the site's dark text */
.header-user-menu .user-menu--popup {
    color: var(--color-ink-900);
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    color: var(--color-ink-900);
    transition: background-color 0.18s ease;
}

.mobile-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* The drawer continues the header's tan below it */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    background-color: var(--color-bark-500);
    color: var(--color-ink-900);
    padding: var(--space-xl) var(--container-padding);
    overflow-y: auto;
}

.mobile-menu.is-open {
    display: block;
}

/* The block group's flow layout gives its second child a 24px block gap, which a fixed box
   still keeps; the rule is inlined after this stylesheet, so it takes two classes to beat it. */
.site-header .mobile-menu {
    margin: 0;
}

.mobile-menu nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.mobile-menu nav a {
    display: block;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-ink-900);
    border-radius: var(--radius-md);
}

.mobile-menu nav a:hover,
.mobile-menu nav a.active {
    color: var(--color-black);
    background-color: rgba(0, 0, 0, 0.1);
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(0, 0, 0, 0.18);
}

.mobile-menu .btn-secondary {
    background-color: var(--color-white);
    border-color: var(--color-white);
    color: var(--color-ink-900);
}

.mobile-menu .btn-secondary:hover {
    background-color: var(--color-paper);
    border-color: var(--color-paper);
}

@media (min-width: 768px) {
    .header-cta {
        display: inline-flex;
    }
}

@media (min-width: 1024px) {
    .header-nav {
        display: block;
    }

    .mobile-menu-toggle,
    .mobile-menu {
        display: none;
    }
}

/* ============================================================
   FOOTER
   The same tan as the header closes the page, so the logo sits
   on it edge to edge too; text is dark ink, accents black.
   ============================================================ */
.site-footer {
    background-color: var(--color-bark-500);
    color: var(--color-ink-900);
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid var(--color-bark-600);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    padding-bottom: var(--space-2xl);
}

.footer-brand {
    max-width: 340px;
}

/* The PNG carries its own margin around the disc, so it starts flush with the column */
.footer-brand img {
    display: block;
    height: 64px;
    width: auto;
    margin: 0 0 var(--space-md) -6px;
}

.footer-brand p {
    font-size: var(--font-size-sm);
    line-height: 1.7;
    color: var(--color-ink-900);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2xl);
}

.footer-column h5 {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-black);
    margin-bottom: var(--space-lg);
}

.footer-column nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-column nav a {
    font-size: var(--font-size-sm);
    color: var(--color-ink-900);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition:
        color 0.18s ease,
        text-decoration-color 0.18s ease;
}

/* Hover underlines in black, like the active link in the header */
.footer-column nav a:hover {
    color: var(--color-black);
    text-decoration-color: var(--color-black);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(0, 0, 0, 0.18);
    text-align: center;
}

.footer-bottom p {
    font-size: var(--font-size-xs);
    color: var(--color-ink-900);
}

.footer-bottom a {
    color: var(--color-black);
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.4);
}

.site-footer :focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        align-items: start;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ============================================================
   PAGE HEADER (listing, details)
   ============================================================ */
.page-header {
    padding-top: var(--space-xl);
}

.page-header h1 .highlight {
    color: var(--color-bark-700);
    font-style: italic;
}

.page-header-description {
    margin-top: var(--space-sm);
    max-width: 70ch;
    color: var(--color-ink-700);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-bark {
    color: var(--color-bark-700);
}

.icon {
    flex: none;
}
