/* Glencross Scaffolding: the one settings file for the look.
   Every colour, text size, spacing value, corner rounding, shadow, movement time, layer order and the font live
   here, and the rest of the CSS uses only these names. Colours are read from the Glencross logo (orange and near-black).

   Width bands the layout steps at (CSS can't read settings inside @media, so they're listed here):
     computer > 1100px · small computer / tablet 861–1100px · phone <= 860px · small phone down to 320px.
   The menu bar also steps at 1239, 1189, 1099, 539 and 389px, and sections may fine-tune at
   those too. That is the whole set (a test refuses any other): don't add new ones.
   One height step: the project photo pop-up has its own layout on screens 500px tall or less, such as a phone held
   sideways (user, q27). */

:root {
  color-scheme: light;

  /* Base colours */
  --orange-500: #DF541F;   /* Glencross orange */
  --orange-300: #ff9c75;   /* orange that reads on near-black */
  --orange-200: #ffb08f;   /* orange that reads on a dark photo */
  --orange-700: #c2410c;   /* error outline */
  --orange-800: #9f2d0d;   /* orange that reads as text on white */
  --orange-50:  #fdf0ea;
  --ink-900: #171415;
  --ink-800: #221E20;      /* Glencross near-black */
  --ink-700: #2c2729;
  --stone-600: #625b58;
  --stone-700: #4a4442;
  --stone-500: #8b8580;
  --stone-300: #bdb6b2;
  --stone-250: #d9d2ce;
  --stone-200: #d9d1cb;
  --stone-125: #e7e1dd;
  --stone-150: #ece6e1;
  --stone-100: #f6f3f0;
  --stone-50:  #faf8f6;
  --white: #ffffff;
  --black: #000000;

  /* Colours by job */
  /* --color-brand for lines, ticks, icons, big numbers and big headings; --color-brand-deep for orange words and for
     buttons with white words on them. Both are the logo orange (user, 17 Nov, after trying it in place of the deeper
     #C64A1B: "WHAT ever i'm currently looking at"). They stay two names so the words and buttons can change apart.
     The logo orange gives 3.87:1 with white, under the 4.5:1 rule for small text: kept by the user's choice. */
  --color-brand: var(--orange-500);
  --color-brand-deep: var(--orange-500);
  --color-brand-on-dark: var(--orange-300);
  --color-brand-on-photo: var(--orange-200);
  --color-brand-text: var(--orange-800);
  --color-brand-pale: var(--orange-50);
  --color-error: var(--orange-800);
  --color-error-edge: var(--orange-700);
  --color-text: var(--ink-800);
  --color-muted: var(--stone-600);
  --color-page: var(--white);
  --color-surface: var(--white);
  --color-tile: var(--stone-100);
  --color-section-pale: var(--stone-50);
  --color-line: var(--stone-150);
  --color-line-strong: var(--stone-200);
  --color-placeholder-edge: var(--stone-500);
  --color-dark: var(--ink-800);
  --color-dark-deep: var(--ink-900);
  --color-dark-soft: var(--ink-700);
  --color-on-dark: var(--white);
  --color-on-dark-muted: var(--stone-300);
  --color-on-dark-soft: var(--stone-250);
  --color-on-dark-dim: color-mix(in srgb, var(--color-on-dark) 80%, transparent);  /* the trail of links over a photo */
  --color-on-dark-label: color-mix(in srgb, var(--color-on-dark) 72%, transparent);
  --color-check: var(--stone-700);         /* "To check with Glencross" notes */
  --color-check-tag: var(--stone-150);
  --color-on-photo-text: var(--stone-125);  /* a line of words over a darkened photo */
  --color-on-photo-card: color-mix(in srgb, var(--color-on-dark) 94%, transparent);
  --color-on-photo-label: color-mix(in srgb, var(--color-on-dark) 92%, transparent);
  --color-hover-patch-on-dark: color-mix(in srgb, var(--color-on-dark) 12%, transparent);  /* a menu link pointed at, in the menu bar, its line of section links and the phone Menu */
  --color-on-dark-strong: color-mix(in srgb, var(--color-on-dark) 82%, transparent);
  --color-shadow: var(--black);
  --color-photo-chip: color-mix(in srgb, var(--color-dark) 82%, transparent);  /* the camera and photo count on a project card */

  /* The fade behind the clear menu bar at the top of a photo (user, 17 Nov: "if that menu just fades to black a bit
     more?"): darkest behind the bar, easing into the photo below it, so every menu word and the phone number reach
     4.5:1 on the photo. Part of --wash-hero, so every photo top (Home, town, service and other pages) has it. */
  --fade-under-menu: linear-gradient(180deg,
      color-mix(in srgb, var(--color-dark) 52%, transparent) 0,
      color-mix(in srgb, var(--color-dark) 52%, transparent) 84px,
      color-mix(in srgb, var(--color-dark) 30%, transparent) 130px,
      color-mix(in srgb, var(--color-dark) 10%, transparent) 180px,
      transparent 230px);
  /* Photo washes: near-black to orange, as approved in round 2 C */
  --wash-hero: var(--fade-under-menu), linear-gradient(90deg,
      color-mix(in srgb, var(--color-dark) 94%, transparent) 0%,
      color-mix(in srgb, var(--color-dark) 72%, transparent) 45%,
      color-mix(in srgb, var(--color-brand) 55%, transparent) 100%);
  --wash-band: linear-gradient(90deg,
      color-mix(in srgb, var(--color-dark) 55%, transparent) 0%,
      color-mix(in srgb, var(--color-dark) 15%, transparent) 55%,
      color-mix(in srgb, var(--color-brand) 35%, transparent) 100%);
  --wash-band-flipped: linear-gradient(270deg,
      color-mix(in srgb, var(--color-dark) 55%, transparent) 0%,
      color-mix(in srgb, var(--color-dark) 15%, transparent) 55%,
      color-mix(in srgb, var(--color-brand) 35%, transparent) 100%);

  /* Lines on dark backgrounds */
  --line-on-dark-faint: color-mix(in srgb, var(--color-on-dark) 10%, transparent);
  --line-on-dark: color-mix(in srgb, var(--color-on-dark) 14%, transparent);
  --line-on-dark-strong: color-mix(in srgb, var(--color-on-dark) 80%, transparent);

  /* Corner rounding */
  --radius-focus: 4px;          /* a focus ring drawn round a link */
  --radius-tag: 6px;            /* a small label, like the Questions panel's "Not answered here?" */
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-bar-scrolled: 14px;  /* the menu bar once the page is scrolled */
  --radius-slot: 14px;          /* a dashed frame for a photo still to come, inside a tile */
  --radius-card: 16px;
  --radius-bar: 18px;
  --radius-lg: 22px;
  --radius-band: 28px;
  --radius-pill: 999px;
  --radius-round: 50%;

  /* Text sizes, smallest first. Numbered, not named by job, because most are used in only one or two places. */
  --font-size-1: 9px;
  --font-size-2: 11px;
  --font-size-3: 12px;
  --font-size-4: 13px;
  --font-size-5: 13.5px;
  --font-size-6: 14px;
  --font-size-7: 15px;
  --font-size-8: 16px;
  --font-size-9: 17px;
  --font-size-10: 18px;
  --font-size-11: 19px;
  --font-size-12: 20px;
  --font-size-13: 22px;
  --font-size-14: 24px;
  --font-size-15: 26px;
  --font-size-16: 28px;
  --font-size-17: 32px;
  --font-size-18: 38px;
  --font-size-19: 42px;
  --font-size-20: 44px;
  --font-size-21: 68px;
  /* Added for the other pages (Brief 2, 17 Nov), named by job because they sit between the numbered steps */
  --font-size-tile-phone: 14.5px;   /* a photo tile's name on phones */
  --font-size-number-small: 30px;   /* Contact's phone number on the smallest phones */
  --font-size-page-title-phone: 36px;  /* a page's main heading on the smallest phones */
  --font-size-page-title: 60px;     /* a page's main heading in the short photo top */

  /* Spacing (margins, padding and gaps), smallest first. A gap pulled the other way is calc(-1 * var(--space-n)). */
  --space-1: 1px;
  --space-2: 2px;
  --space-3: 4px;
  --space-4: 6px;
  --space-5: 8px;
  --space-6: 10px;
  --space-7: 11px;
  --space-8: 12px;
  --space-9: 13px;
  --space-10: 14px;
  --space-11: 15px;
  --space-12: 16px;
  --space-13: 18px;
  --space-14: 20px;
  --space-15: 22px;
  --space-16: 24px;
  --space-17: 26px;
  --space-18: 28px;
  --space-19: 30px;
  --space-20: 32px;
  --space-21: 34px;
  --space-22: 36px;
  --space-23: 40px;
  --space-24: 44px;
  --space-25: 46px;
  --space-26: 56px;
  --space-27: 60px;
  --space-28: 64px;
  --space-29: 72px;
  --space-30: 84px;
  --space-31: 92px;
  --space-32: 96px;
  --space-33: 112px;
  --space-34: 120px;
  --space-35: 136px;
  --space-36: 150px;
  --space-37: 180px;
  --space-38: 230px;
  /* Added for the other pages (Brief 2, 17 Nov), named by job because they sit between the numbered steps */
  --space-gap-wide: 48px;      /* between a photo and the words beside it */
  /* The section-link line inside the menu bar: what the bar grows by when it shows. Its parts (site.css .sec-row):
     the 6px gap under the bar's first line, its 1px top border, the links (--section-link-space above and below
     --section-link-height), and the bar's 3px orange bottom edge below them. tools/browser-check.js checks the line
     exactly fills the extra height. */
  --section-bar: 55px;
  --section-link-height: 29px;  /* a section link, its orange or grey patch with it (user, q36: "just shrink the buttons vertically") */
  --section-link-space: 8px;    /* the menu background showing above and below each section link, the same both sides */

  /* Shadows */
  --shadow-bar: 0 10px 30px color-mix(in srgb, var(--color-shadow) 28%, transparent);
  --shadow-card-big: 0 30px 60px -20px color-mix(in srgb, var(--color-shadow) 45%, transparent);
  --shadow-card-up: 0 -10px 30px -12px color-mix(in srgb, var(--color-shadow) 35%, transparent);
  --shadow-strip: 0 22px 48px -18px color-mix(in srgb, var(--color-dark) 35%, transparent);
  --shadow-panel: 0 22px 40px -26px color-mix(in srgb, var(--color-dark) 55%, transparent);
  --shadow-soft: 0 18px 40px -28px color-mix(in srgb, var(--color-dark) 35%, transparent);
  --shadow-small: 0 12px 30px color-mix(in srgb, var(--color-dark) 8%, transparent);
  --shadow-form: 0 24px 60px color-mix(in srgb, var(--color-shadow) 35%, transparent);
  --shadow-tile: 0 12px 30px color-mix(in srgb, var(--color-dark) 6%, transparent);
  --shadow-map-card: 0 18px 44px color-mix(in srgb, var(--color-dark) 12%, transparent);
  --shadow-banner: 0 18px 50px color-mix(in srgb, var(--color-shadow) 30%, transparent);

  /* Movement */
  --menubar-glide: .25s;   /* the menu bar's change on scroll: every part uses this one time, so they all move together */
  --menu-hover-fade: .12s; /* a menu link's patch fading in when pointed at */
  --photo-slide: var(--menubar-glide); /* the project photo pop-up's photos sliding sideways: the menu bar's time (Brief 3, settled 6) */
  --card-point-fade: .2s;  /* a project card's photo chip and "see bigger" mark changing when pointed at */

  /* Layer order, lowest first */
  --z-photo-wash: 1;
  --z-over-photo: 2;
  --z-strip: 3;
  --z-callbar: 9;
  --z-menubar: 20;
  --z-cookie-banner: 30;

  /* Lettering and page width */
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --page-width: 1200px;
  --page-gutter: 24px;
  --menubar-height: 84px;
  --menubar-height-scrolled: 68px;  /* the bar once it fills in and floats, 861px and up (58px below that, in site.css) */
  --jump-offset: 100px;        /* a jump to a section stops this far down, clear of the menu bar */
  --jump-offset-phone: 80px;
  --focus-ring-width: 3px;
  --focus-ring: var(--focus-ring-width) solid var(--color-text);
  --focus-ring-on-dark: var(--focus-ring-width) solid var(--color-brand-on-dark);
  --current-mark-forced: 2px solid Highlight;  /* the current menu link in high-contrast mode, in the system's own colour */
}
