html {
    font-size: 62.5%; /* 1rem = 10px */
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
    font-family: var(--font-family);
}

body {
    font-size: 1.6rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background: var(--color-background-light);
}

:root {
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Brand Colors */
    --color-primary: #FF9500;
    --color-primary-dark: #C37200;
    --color-primary-light: #FFD599;
    --color-primary-extra-light:#FFEACC;

    --color-secondary: #764ba2;

    --color-dark-text: #1F2933;

    --color-dark-gray-text: #656565;
    --color-gray-text: #7C7C7C;
    --color-light-gray: #e9e9e9;

    /* Aliases used across the stylesheets. */
    --color-text-muted: var(--color-gray-text);
    --color-text-secondary: var(--color-dark-gray-text);
    --color-bg-secondary: #f3f4f6;
    --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);

    /* Motion: one set of speeds and curves, so every animation feels like the same app.
       Use these in new animations (existing ones keep their own values for now). */
    --motion-fast: 150ms;  /* small things: a press, a colour, a tick */
    --motion-base: 250ms;  /* most things: fades, a card appearing */
    --motion-slow: 350ms;  /* big things: a panel sliding, a sheet opening */
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);    /* arriving: fast start, soft landing (the map editor's curve) */
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);   /* moving or changing in place */

    --color-light-red: #ff2b2b;
    --color-dark-red: #a30000;

    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    /* Background Colors*/
    --color-background-light: #FAFAFA;

    /*Sizes of components*/
    --sidebar-w: 24rem;
    --sidebar-w-collapsed: 6rem;

    /*border color*/
    --border-gray: #dddddd;

    /* Gradients */
    --gradient-primary: linear-gradient(179deg, #FF9500 0%, #C37200 100%);
    --gradient-primary-reverse: linear-gradient(175deg, #C37200 0%,  #FF9500 100%);
    --gradient-primary-scroll: linear-gradient(90deg, #FF9500 0%, #C37200 100%);

    --gradient-gray: linear-gradient(180deg, #e9e9e9 0%, #b5b5b5 100%);
    --gradient-gray-reverse: linear-gradient(180deg, #c7c7c7 0%, #e9e9e9 100%);

    --gradient-gray-light: linear-gradient(180deg, #adadad 0%, #7C7C7C 100%);
    --gradient-gray-dark: linear-gradient(180deg, #7C7C7C 0%, #656565 100%);

    --gradient-primary-180: linear-gradient(180deg, #FF9500 0%, #C37200 100%);

    --gradient-gray-review-card: linear-gradient(148deg, #f9f9f9 0%, #e5e5e5 100%);

    --gradient-red: linear-gradient(180deg, #ff2b2b 0%, #a30000 100%);

    --gradient-star: linear-gradient(180deg, #fbbf24 0%, #ef9e16 100%);

    --gradient-blue: linear-gradient(180deg, #0098C4 0%, #006c8b 100%);

    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-purple-indigo: linear-gradient(170deg, #667eea 0%, #752cbf 100%);
    --gradient-amber-orange: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --gradient-creator: linear-gradient(135deg, #f97316 0%, #dc2626 100%);

    /* Top nav height; the whole layout reads this (smaller values in utilities.css at ≤767px and in the short-screen block below). */
    --nav-height: 6.4rem;

    /* Guide Card Dimensions - 8:9 aspect ratio */
    --guide-card-width: 30.5em;
    --guide-card-image-height: 36em;
    --guide-card-description-height: 10em;
    --guide-card-total-height: 46em;

    --marker-image-width: 9rem;
    --marker-image-height: 12rem; 

    --activity-card-image-width: 16rem;
    --activity-card-image-height: 22rem; 

    /* The vertical spot card stays between these widths on every page (its height follows: 3:4 photo + chips).
       Min = an iPhone's 2 per row (157 × 240px). */
    --activity-card-min: 15.7rem;
    --activity-card-max: 22rem;

    /* ============================================
       FLUID DESIGN TOKENS
       These scale smoothly with the viewport instead
       of jumping at breakpoints. Use them in NEW code
       or when refactoring. Existing fixed rem values
       (cards, buttons, etc.) can stay as-is.
       ============================================ */

    /* Spacing — for padding, margins, gaps between sections */
    --space-xs:  clamp(0.5rem, 1vw, 0.75rem);
    --space-sm:  clamp(0.75rem, 1.5vw, 1.25rem);
    --space-md:  clamp(1.25rem, 2vw, 2rem);
    --space-lg:  clamp(2rem, 3.5vw, 3.5rem);
    --space-xl:  clamp(3rem, 5vw, 6rem);
    --space-2xl: clamp(4rem, 7vw, 9rem);

/* Page-level layout */
    --page-max-width: 167rem;
    --page-padding-y: clamp(2rem, 2.5vw, 3rem);
    --page-padding-x: clamp(0rem, 2.5vw, 1rem);

    /* Space under the last element in the CONTENT column.
       ⚠️ Never on .default-page (it also wraps the sidebar, and "Log out" would become unreachable).
       ⚠️ No vw units (they include the scrollbar and cause sideways overflow on Windows). */
    --page-bottom-gap: 8rem;

    /* Fluid font sizes for new headings and hero text (tralenso-header__* has its own scale in utilities.css). */
    --fs-display: clamp(2.4rem, 3.5vw, 4rem);
    --fs-h1:      clamp(2rem, 2.5vw, 2.8rem);
    --fs-h2:      clamp(1.7rem, 2vw, 2.2rem);
    --fs-h3:      clamp(1.5rem, 1.7vw, 1.8rem);
    --fs-body:    clamp(1.3rem, 1.4vw, 1.5rem);

    /* Viewport heights — always use dvh over vh going forward */
    --vh-full:     100dvh;
    --modal-max-h: min(90dvh, 90rem);

    /* Clearance for the floating bottom-nav pill: its height (5.6rem) + the 1rem it
       floats above the safe area + 1rem breathing room. Consumed by whichever element
       is LAST on the page — the footer on web, the page wrapper in the app. */
    --bottom-nav-clearance: calc(7.6rem + env(safe-area-inset-bottom));
}

/* ============================================
   HEIGHT-CONSTRAINED VIEWPORTS
   MacBook 13" gives ~760px of usable browser height.
   This block tightens the spacing/font tokens centrally,
   so any element using them gets breathing room
   automatically on short screens — no per-component edits.
   ============================================ */
@media (max-height: 800px) and (min-width: 1024px) {
    :root {
        --space-lg: clamp(1.5rem, 3vw, 2.5rem);
        --space-xl: clamp(2rem, 4vw, 4rem);
        --space-2xl: clamp(2.5rem, 5vw, 6rem);
        --page-padding-y: clamp(1rem, 2vw, 3rem);
        --fs-display: clamp(2rem, 3vw, 3rem);
        --fs-h1: clamp(1.8rem, 2.2vw, 2.4rem);
        --nav-height: 6rem;
    }
}

/* Reduced motion (the user's device setting): every animation built on the tokens above becomes instant.
   Existing animations keep their own reduced-motion rules. */
@media (prefers-reduced-motion: reduce) {
    :root {
        --motion-fast: 0.01ms;
        --motion-base: 0.01ms;
        --motion-slow: 0.01ms;
    }
}