/* ==========================================================================
   Infrito Insights - Design Tokens
   Every colour, type, space, radius, shadow and motion value used by the
   theme. Values come from the approved wireframe (resolved, pixel-verified
   stylesheet) with the contrast fixes from the design spec applied.
   Use ONLY these custom properties in theme CSS - never hard-code hex.
   ========================================================================== */

:root {
  /* ---- Brand and text colours ---- */
  --inf-ink:             #172538; /* body text and headings (15.5:1 on white) */
  --inf-ink-soft:        #3e4d60; /* header navigation links */
  --inf-ink-muted:       #405269; /* intro / lead paragraphs on tinted surfaces */
  --inf-quiet:           #516174; /* secondary text (6.3:1 on white, 5.8:1 on the footer) */
  --inf-meta:            #586980; /* meta lines: author, reading time */
  --inf-meta-dot:        #8896a8; /* meta separator dot (decorative) */
  --inf-number:          #556d8f; /* list numbers on tints (concept #657d9d failed AA) */
  --inf-blue:            #2e5496; /* primary: kickers, labels, links, outline buttons */
  --inf-blue-dark:       #24457d; /* primary hover / pressed (infrito.com hover) */
  --inf-blue-soft:       #eaf1fa; /* icon tiles, soft blue tints */
  --inf-orange:          #f84f12; /* accent FILLS ONLY: kicker square, rules, primary button bg */
  --inf-orange-hover:    #e03e0c; /* primary button hover background (infrito.com hover; white text 4.32:1) */
  --inf-orange-strong:   #b6380d; /* text-safe orange (5.9:1): orange text and hover colour */
  --inf-rust:            #b6380d; /* alias kept from the concept */
  --inf-on-orange:       #ffffff; /* text on the orange button: white, as on infrito.com (3.43:1 on #f84f12) */
  --inf-navy:            #142641; /* CTA band, active chip, current page */
  --inf-on-navy:         #ffffff;
  --inf-on-navy-soft:    #d3ddec; /* paragraph text on navy */
  --inf-on-navy-kicker:  #d2e2fc; /* kicker text on navy */
  --inf-white:           #ffffff;
  --inf-white-hover:     #dce9ff; /* white button hover on navy */

  /* ---- Lines ---- */
  --inf-line:            #e3e9f1; /* default 1px borders and dividers (soft) */
  --inf-line-strong:     #a6b9d5; /* card hover border, stronger dividers */
  --inf-line-soft:       #d6e0ed; /* footer note rule, dividers on tints */
  --inf-line-control:    #cdd7e4; /* outline button border */
  --inf-line-chip:       #dce4ed; /* chip border */
  --inf-line-divider:    #d5dce6; /* brand logo / label divider */
  --inf-line-field:      #8293ad; /* form fields (3.1:1, WCAG 1.4.11; concept #a9bad2 failed) */

  /* ---- Surfaces ---- */
  --inf-paper:           #fbfcfe; /* page background */
  --inf-surface:         #ffffff; /* header, cards, chips, dialogs */
  --inf-surface-alt:     #f4f7fc; /* hero and page-header tint */
  --inf-surface-hover:   #edf3fb; /* hover background of chips, outline and icon buttons */
  --inf-surface-cover:   #e8eff9; /* feature cover / card media placeholder */
  --inf-surface-desk:    #f1f5fa; /* quick reads desk */
  --inf-surface-footer:  #f1f5fb; /* footer */
  --inf-grid-line:       #dae4f2; /* blueprint grid on light tints */
  --inf-grid-line-cover: #ccd9ee; /* blueprint grid on the feature cover */
  --inf-grid-line-dark:  rgba(76, 100, 137, 0.314); /* blueprint grid on navy */
  --inf-backdrop:        rgba(18, 36, 64, 0.588); /* dialog backdrop */

  /* ---- Focus ---- */
  --inf-focus:           #325da8; /* 3px focus ring on light surfaces */
  --inf-focus-on-dark:   #9cc0ff; /* focus ring on navy (8.2:1) */
  --inf-focus-width:     3px;
  --inf-focus-offset:    4px;

  /* ---- Font families ---- */
  --inf-font-display: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --inf-font-body:    "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; /* Montserrat everywhere, like infrito.com */
  --inf-font-mono:    ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;

  /* ---- Type scale ----
     One scale for the whole theme, on a 16px base. Montserrat is a wide face,
     so the small UI steps go up in single pixels from 12px (the minimum
     anywhere) to 16px; headings then follow a ~1.25 ratio and grow fluidly
     between phone and desktop widths (min at 360px, max at 1440px+).
     Reading text is never set below 15px. */
  --inf-text-2xs:  0.75rem;   /* 12px  overlines, category pills, figure tags, dates under titles (minimum) */
  --inf-text-xs:   0.8125rem; /* 13px  meta (author, date, read time), breadcrumbs, kickers, small chips */
  --inf-text-sm:   0.875rem;  /* 14px  chips, text links, form labels, table of contents, sidebar titles */
  --inf-text-md:   0.9375rem; /* 15px  navigation, buttons, card excerpts, footer links */
  --inf-text-base: 1rem;      /* 16px  body text */
  --inf-text-lg:   1.125rem;  /* 18px  lead paragraphs, article text */
  --inf-text-xl:   1.25rem;   /* 20px  card titles, article standfirst */
  --inf-text-2xl:  1.5rem;    /* 24px  small section titles (Quick reads, comments) */
  --inf-text-3xl:  clamp(1.5rem, 1.2rem + 0.85vw, 2rem);         /* 24-32px CTA band, footer tagline */
  --inf-text-4xl:  clamp(1.75rem, 1.35rem + 1.15vw, 2.5rem);     /* 28-40px section heads */
  --inf-text-5xl:  clamp(2rem, 1.55rem + 1.3vw, 2.75rem);        /* 32-44px page titles (topics, authors, search) */
  --inf-text-article: clamp(2rem, 1.45rem + 1.55vw, 2.875rem);   /* 32-46px article title */
  --inf-text-h1:   clamp(2.25rem, 1.5rem + 2.2vw, 3.5rem);       /* 36-56px homepage hero */
  --inf-text-feature: clamp(1.625rem, 1.25rem + 1.05vw, 2.25rem); /* 26-36px featured article */

  /* ---- Font weights (variable fonts: any value 100-900 works) ---- */
  --inf-weight-regular:  450; /* Montserrat reads a touch light at 400 on screens; matches infrito.com body text */
  --inf-weight-medium:   550;
  --inf-weight-strong:   600;
  --inf-weight-semibold: 650;
  --inf-weight-heading:  670; /* h2 titles: feature, sections, CTA */
  --inf-weight-display:  680; /* hero h1, page titles, quick reads title */
  --inf-weight-bold:     700;
  --inf-weight-heavy:    750;

  /* ---- Line heights ---- */
  --inf-leading-display: 1.04;
  --inf-leading-tight:   1.08;
  --inf-leading-snug:    1.2;
  --inf-leading-normal:  1.6;  /* body text and paragraphs */
  --inf-leading-relaxed: 1.7;

  /* ---- Letter spacing ---- */
  --inf-tracking-display: -0.045em; /* hero h1, page titles */
  --inf-tracking-tighter: -0.042em; /* h2 titles */
  --inf-tracking-brand:   -0.03em;  /* "Insights" brand label */
  --inf-tracking-tight:   -0.025em; /* card titles */
  --inf-tracking-caps:    0.12em;   /* uppercase micro labels */

  /* ---- Spacing (4px base) ---- */
  --inf-space-1:  4px;
  --inf-space-2:  8px;
  --inf-space-3:  12px;
  --inf-space-4:  16px;
  --inf-space-5:  20px;
  --inf-space-6:  24px;
  --inf-space-7:  28px;
  --inf-space-8:  32px;
  --inf-space-9:  36px;
  --inf-space-10: 40px;
  --inf-space-11: 44px;
  --inf-space-12: 48px;
  --inf-space-13: 52px;
  --inf-space-14: 56px;
  --inf-space-15: 60px;
  --inf-space-16: 64px;

  /* ---- Layout ---- */
  --inf-shell-max:     1300px; /* 1216px of content with 42px gutters */
  --inf-gutter:        42px;   /* 28px at <=1000px, 16px at <=540px */
  --inf-content-max:   680px;  /* article reading column: ~70 characters per line at 18px */
  --inf-sidebar:       300px;  /* article sidebar (same width as the rail, so sidebar boxes match on every page) */
  --inf-rail:          300px;  /* right-hand rail: homepage, listings */
  --inf-header-height: 88px;   /* 80px at <=1000px, 76px at <=900px, 64px at <=540px */
  --inf-tap-min:       44px;   /* minimum touch target on small screens */

  /* ---- Radii ---- */
  --inf-radius-xs:      6px;   /* small tags, thumbnails */
  --inf-radius-sm:      8px;   /* buttons, inputs */
  --inf-radius-control: 10px;  /* icon buttons, pagination, share buttons */
  --inf-radius-md:      12px;  /* cards, panels, feature card */
  --inf-radius-lg:      16px;  /* dialogs, CTA band */
  --inf-radius-pill:    999px; /* chips, labels */

  /* ---- Shadows (layered, soft, navy-tinted) ---- */
  --inf-shadow-xs: 0 1px 2px rgba(16, 32, 56, 0.06);
  --inf-shadow-sm: 0 1px 2px rgba(16, 32, 56, 0.05), 0 2px 6px -1px rgba(16, 32, 56, 0.06);
  --inf-shadow-md: 0 2px 4px -1px rgba(16, 32, 56, 0.05), 0 10px 24px -6px rgba(16, 32, 56, 0.12);
  --inf-shadow-lg: 0 4px 8px -2px rgba(16, 32, 56, 0.06), 0 20px 40px -12px rgba(16, 32, 56, 0.2);
  --inf-shadow-primary: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(16, 32, 56, 0.08), 0 8px 18px -8px rgba(248, 79, 18, 0.65);
  --inf-shadow-primary-hover: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 4px rgba(16, 32, 56, 0.08), 0 14px 26px -10px rgba(224, 62, 12, 0.7);
  --inf-ring: 0 0 0 4px rgba(46, 84, 150, 0.16); /* focus glow for inputs */

  /* ---- Dividers ---- */
  --inf-divider-fade: linear-gradient(90deg, #d3dce8 0%, #e3e9f1 55%, rgba(227, 233, 241, 0) 100%); /* section rule that fades out to the right */

  /* ---- Motion ---- */
  --inf-ease:     cubic-bezier(0.2, 0.7, 0.2, 1);
  --inf-duration: 0.18s;

  /* ---- Stacking ---- */
  --inf-z-header: 40;
  --inf-z-skip:   100;
}

/* ---- Breakpoint-driven tokens (desktop-first, as in the wireframe) ---- */
@media (max-width: 1000px) {
  :root {
    --inf-gutter: 28px;
    --inf-header-height: 80px;
  }
}

@media (max-width: 900px) {
  :root {
    --inf-header-height: 76px;
  }
}

@media (max-width: 540px) {
  :root {
    --inf-gutter: 16px;
    --inf-header-height: 64px;
  }
}
