/* ==========================================================================
   Webexpo El Djazair 2027 - brand foundation
   Single source of truth for type, color and component shape.
   Loaded by every Blade view. Do not re-declare these in per-page <style>.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Typeface: Obviously (display) + Urbane (body)
   Both are commercial licences, so the files live in /assets/fonts and are
   NOT fetched from a CDN. Each face lists woff2 > woff > ttf so whichever
   format was licensed is picked up. If a file is missing the stack simply
   falls through to the system fallbacks declared in --font-display/--font-body.
   -------------------------------------------------------------------------- */

@font-face {
    font-family: 'Obviously';
    src: url('/assets/fonts/Obviously-Regular.woff2') format('woff2'),
         url('/assets/fonts/Obviously-Regular.woff') format('woff'),
         url('/assets/fonts/Obviously-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Obviously';
    src: url('/assets/fonts/Obviously-Medium.woff2') format('woff2'),
         url('/assets/fonts/Obviously-Medium.woff') format('woff'),
         url('/assets/fonts/Obviously-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Obviously';
    src: url('/assets/fonts/Obviously-Bold.woff2') format('woff2'),
         url('/assets/fonts/Obviously-Bold.woff') format('woff'),
         url('/assets/fonts/Obviously-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Urbane';
    src: url('/assets/fonts/Urbane-Regular.woff2') format('woff2'),
         url('/assets/fonts/Urbane-Regular.woff') format('woff'),
         url('/assets/fonts/Urbane-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Urbane';
    src: url('/assets/fonts/Urbane-Medium.woff2') format('woff2'),
         url('/assets/fonts/Urbane-Medium.woff') format('woff'),
         url('/assets/fonts/Urbane-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Urbane';
    src: url('/assets/fonts/Urbane-DemiBold.woff2') format('woff2'),
         url('/assets/fonts/Urbane-DemiBold.woff') format('woff'),
         url('/assets/fonts/Urbane-DemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Urbane';
    src: url('/assets/fonts/Urbane-Bold.woff2') format('woff2'),
         url('/assets/fonts/Urbane-Bold.woff') format('woff'),
         url('/assets/fonts/Urbane-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
    /* Brand palette - from the 2027 brandboard, these five and nothing else */
    --navy: #18243d;
    --electric: #3679ff;
    --aqua: #6fd0f7;
    --paper: #f7fafc;
    --volt: #97f743;

    /* Derived tints. Kept few on purpose so the palette stays recognisable. */
    --navy-deep: #111a2d;
    --navy-soft: #223254;
    --navy-line: rgba(24, 36, 61, 0.12);
    --paper-sink: #eef3f8;

    /* Text roles */
    --ink: var(--navy);
    --ink-muted: rgba(24, 36, 61, 0.68);
    --ink-faint: rgba(24, 36, 61, 0.48);
    --ink-invert: var(--paper);
    --ink-invert-muted: rgba(247, 250, 252, 0.72);

    /* Type stacks. The licensed faces come first; the free stand-ins loaded in
       layout/components/fonts.blade.php hold the same width and tone, so the
       swap to the real files does not reflow the layout.

       Archivo is requested at width 125 (expanded) to match Obviously's wide
       caps, which is what --display-stretch below applies. */
    --font-display: 'Obviously', 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Urbane', 'Figtree', 'Poppins', 'Helvetica Neue', Arial, sans-serif;

    /* Inert once Obviously is installed: a static face with no width axis
       simply resolves to its normal width. */
    --display-stretch: 125%;

    /* Shape lock: interactive elements are full pill, surfaces are 16px.
       Nothing on the site uses a third radius. */
    --radius-surface: 16px;
    --radius-inset: 12px;
    --radius-pill: 999px;

    /* Motion. Every transition names its properties so nothing animates
       layout off the GPU. */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --dur: 320ms;

    /* The hero gradient, also reused as the brand's signature wash. */
    --wash: linear-gradient(145deg, var(--navy-deep) 0%, #16305f 32%, var(--electric) 62%, var(--aqua) 100%);
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
    /* Offset anchored sections so the fixed navbar never covers a heading. */
    scroll-padding-top: 6rem;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-stretch: var(--display-stretch);
    color: var(--ink);
    letter-spacing: -0.02em;
    /* Sentence case. The 2027 identity drops the all-caps headline treatment
       the previous site forced on every heading. */
    text-transform: none;
}

h1 { line-height: 1.04; }
h2, h3 { line-height: 1.1; }

.font-display {
    font-family: var(--font-display);
    font-stretch: var(--display-stretch);
}
.font-body { font-family: var(--font-body); }

::selection {
    background: var(--volt);
    color: var(--navy);
}

/* Visible focus for keyboard users on every interactive element. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--electric);
    outline-offset: 3px;
    border-radius: var(--radius-inset);
}

.on-dark :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline-color: var(--volt);
}

/* --------------------------------------------------------------------------
   4. Buttons
   Primary is volt fill on navy text (contrast ~11:1).
   Secondary is a volt hairline, used only on dark grounds.
   Tertiary is a navy hairline for light grounds.
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    /* No wrapping: a CTA that breaks to two lines is a broken CTA. */
    white-space: nowrap;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1;
    padding: 1.0625rem 2rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                color var(--dur) var(--ease),
                transform var(--dur) var(--ease);
}

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

.btn-primary {
    background-color: var(--volt);
    color: var(--navy);
}

.btn-primary:hover {
    background-color: #a9f962;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--volt);
    border-color: var(--volt);
}

.btn-secondary:hover {
    background-color: var(--volt);
    color: var(--navy);
    transform: translateY(-1px);
}

/* For light sections, where volt-on-white would fail contrast. */
.btn-ink {
    background-color: var(--navy);
    color: var(--paper);
}

.btn-ink:hover {
    background-color: var(--navy-soft);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: var(--navy);
    border-color: var(--navy-line);
}

.btn-outline:hover {
    border-color: var(--navy);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.75rem 1.375rem;
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   5. Surfaces and controls
   -------------------------------------------------------------------------- */

.surface {
    background-color: #fff;
    border: 1px solid var(--navy-line);
    border-radius: var(--radius-surface);
}

.surface-hover {
    transition: border-color var(--dur) var(--ease),
                transform var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}

.surface-hover:hover {
    border-color: rgba(54, 121, 255, 0.4);
    transform: translateY(-3px);
    /* Shadow is tinted to the navy ground, never pure black. */
    box-shadow: 0 18px 40px -18px rgba(24, 36, 61, 0.28);
}

.field {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--ink);
    background-color: #fff;
    border: 1px solid var(--navy-line);
    border-radius: var(--radius-inset);
    padding: 0.8125rem 1rem;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.field::placeholder { color: var(--ink-faint); }

.field:focus {
    outline: none;
    border-color: var(--electric);
    box-shadow: 0 0 0 3px rgba(54, 121, 255, 0.16);
}

.field-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.field-error {
    font-size: 0.8125rem;
    /* Darkened red so it clears AA on both white and paper. */
    color: #b3261e;
    margin-top: 0.375rem;
}

/* Dark-ground variants, used inside the footer and navy sections. */
.on-dark .field {
    background-color: rgba(247, 250, 252, 0.07);
    border-color: rgba(247, 250, 252, 0.22);
    color: var(--paper);
}

.on-dark .field::placeholder { color: rgba(247, 250, 252, 0.55); }

.on-dark .field:focus {
    border-color: var(--volt);
    box-shadow: 0 0 0 3px rgba(151, 247, 67, 0.2);
}

.on-dark .field-label { color: var(--paper); }

/* --------------------------------------------------------------------------
   6. Section rhythm
   -------------------------------------------------------------------------- */

.shell {
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

@media (min-width: 768px) {
    .shell { padding-inline: 6%; }
}

@media (min-width: 1280px) {
    .shell { padding-inline: 8%; }
}

.section { padding-block: 5rem; }

@media (min-width: 768px) {
    .section { padding-block: 7rem; }
}

/* A single hairline above a section group. Used instead of boxing every
   row in its own card. */
.rule {
    height: 1px;
    background-color: var(--navy-line);
    border: 0;
}

/* --------------------------------------------------------------------------
   7. Motion
   MOTION_INTENSITY 5: entrance reveals, hover physics, no scroll hijack.
   Reveals are driven by IntersectionObserver in brand.js, never a scroll
   listener. Elements start hidden only once JS has confirmed it can run,
   so a JS failure leaves the content visible.
   -------------------------------------------------------------------------- */

[data-reveal] {
    opacity: 1;
}

.js-reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease), transform 700ms var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}

.js-reveal-ready [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .js-reveal-ready [data-reveal],
    .js-reveal-ready [data-reveal].is-revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   8. Utilities
   -------------------------------------------------------------------------- */

.scrollbar-hide::-webkit-scrollbar { display: none; }

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.wash { background: var(--wash); }

/* Horizontal rails used by the exhibitor and speaker carousels. */
.rail {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-block: 0.5rem;
}

.rail > * { scroll-snap-align: start; }

/* --------------------------------------------------------------------------
   9. Navigation
   The navbar sits transparent over a dark hero and turns solid once the
   sentinel leaves the viewport. State is a single class so there is no
   per-frame class juggling.
   -------------------------------------------------------------------------- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Capped at 72px of content height so the bar never eats the viewport. */
    height: 72px;
    background-color: transparent;
    transition: background-color var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
}

.navbar .nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--paper);
    white-space: nowrap;
    transition: color var(--dur) var(--ease);
}

.navbar .nav-link:hover { color: var(--volt); }

.navbar .nav-logo {
    height: 34px;
    width: auto;
    transition: filter var(--dur) var(--ease);
}

.navbar .nav-burger { color: var(--paper); }

.navbar.is-solid {
    background-color: rgba(247, 250, 252, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--navy-line);
}

.navbar.is-solid .nav-link { color: var(--ink-muted); }
.navbar.is-solid .nav-link:hover { color: var(--electric); }
.navbar.is-solid .nav-burger { color: var(--navy); }

/* The wordmark ships white, so invert it against the solid light bar. */
.navbar.is-solid .nav-logo { filter: brightness(0) saturate(100%); }

@media (prefers-reduced-transparency: reduce) {
    .navbar.is-solid {
        background-color: var(--paper);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* Mobile menu overlay */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    background-color: var(--paper);
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
}

.mobile-menu.is-open { transform: translateX(0); }

.mobile-menu a {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    transition: color var(--dur) var(--ease);
}

.mobile-menu a:hover { color: var(--electric); }

/* --------------------------------------------------------------------------
   10. Tabs
   -------------------------------------------------------------------------- */

.tab {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.6875rem 1.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--navy-line);
    background-color: transparent;
    color: var(--ink-muted);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                color var(--dur) var(--ease);
}

.tab:hover { border-color: var(--navy); color: var(--ink); }

.tab.is-active {
    background-color: var(--navy);
    border-color: var(--navy);
    color: var(--paper);
}

/* --------------------------------------------------------------------------
   11. Marquee
   Used exactly once on the site, for the past-exhibitor logo band where the
   logos carry breadth rather than individual attention.
   -------------------------------------------------------------------------- */

.marquee {
    position: relative;
    display: flex;
    overflow: hidden;
    /* Matches the section band. Kept in sync with it: the whole point is that
       logos shipping a white background blend into this. */
    background-color: #fff;
}

/* Edge fades are overlays rather than a mask, so the fade colour can be an
   exact match for the band. */
.marquee::before,
.marquee::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 7%;
    z-index: 2;
    pointer-events: none;
}

.marquee::before {
    left: 0;
    background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0));
}

.marquee::after {
    right: 0;
    background: linear-gradient(270deg, #fff, rgba(255, 255, 255, 0));
}

.marquee__track {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 4.5rem;
    padding-right: 4.5rem;
    /* max-content, never min-width:100%. Stretching a short track to the
       container width leaves dead space that scrolls past as a visible gap
       before the duplicate arrives. The Blade template repeats the logo set
       until the track is naturally wider than the viewport instead. */
    width: max-content;
    animation: marquee-scroll 42s linear infinite;
}

.marquee__logo {
    height: 4rem;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    flex-shrink: 0;
    /* No blend mode. The band behind is white, so logos with a baked-in white
       background sit flush with the transparent ones on their own. This also
       keeps light-coloured logos safe, which a multiply blend would erase. */
    opacity: 0.85;
    transition: opacity var(--dur) var(--ease);
}

.marquee__logo:hover { opacity: 1; }

@media (min-width: 768px) {
    .marquee__logo {
        height: 5rem;
        max-width: 240px;
    }
}

.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
    .marquee { overflow-x: auto; }

    .marquee::before,
    .marquee::after { display: none; }

    .marquee__track { animation: none; }
}

/* --------------------------------------------------------------------------
   12. Hero
   The 2027 hero art ships with its gradient already baked in, so the wash
   below is only a ground for the image to land on. It also keeps the hero
   readable if the image has not been added yet.
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    /* dvh, not vh: avoids the iOS address-bar jump. */
    min-height: 100dvh;
    background: var(--wash);
    overflow: hidden;
}

.hero__art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
}

/* Readability scrim on the text side only, so the architecture on the right
   stays clean. Strength is low because the art is already dark at that edge. */
.hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 26, 45, 0.72) 0%, rgba(17, 26, 45, 0.35) 42%, transparent 72%);
}

@media (max-width: 767px) {
    .hero__art { object-position: 72% center; }

    .hero__scrim {
        background: linear-gradient(180deg, rgba(17, 26, 45, 0.55) 0%, rgba(17, 26, 45, 0.78) 100%);
    }
}

/* --------------------------------------------------------------------------
   13. Legal prose
   Used by the privacy and terms pages, whose body text is injected per
   language from a translations object.
   -------------------------------------------------------------------------- */

.legal {
    max-width: 68ch;
    color: var(--ink-muted);
    line-height: 1.75;
}

.legal h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ink);
    margin-top: 2.75rem;
    margin-bottom: 0.875rem;
}

.legal h2:first-child { margin-top: 0; }

.legal p { margin-bottom: 1.125rem; }

.legal ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.legal li {
    position: relative;
    padding-left: 1.375rem;
    margin-bottom: 0.5rem;
}

.legal li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--electric);
}

/* Arabic switches the whole page to RTL, so the bullets have to follow. */
[dir="rtl"] .legal li {
    padding-left: 0;
    padding-right: 1.375rem;
}

[dir="rtl"] .legal li::before {
    left: auto;
    right: 0;
}

/* --------------------------------------------------------------------------
   14. Past-edition tiles
   The cards carry the brand wash instead of a photograph. Three angle
   variants, cycled by index, so a row reads as a set rather than three
   identical panels. All three stay navy-weighted at the bottom-left, which is
   where the title and excerpt sit.
   -------------------------------------------------------------------------- */

.edition-tile {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg,
        var(--navy-deep) 0%,
        #16305f 38%,
        var(--electric) 78%,
        var(--aqua) 100%);
    transition: transform 700ms var(--ease);
}

.edition-tile--1 {
    background: linear-gradient(115deg,
        var(--navy-deep) 0%,
        #1b3a6b 46%,
        var(--electric) 100%);
}

.edition-tile--2 {
    background: linear-gradient(165deg,
        var(--navy-soft) 0%,
        var(--electric) 54%,
        var(--aqua) 100%);
}

.group:hover .edition-tile { transform: scale(1.05); }

@media (prefers-reduced-motion: reduce) {
    .group:hover .edition-tile { transform: none; }
}
