/* Tokens: every value the site uses. Other CSS files reference these and nothing else.
   Breakpoints (Bootstrap, mobile first, min-width): sm 576px · md 768px · lg 992px · xl 1200px · xxl 1400px.
   Custom properties cannot be used inside media queries, so the numbers are written out there. */

:root {
  /* Colours: neutral placeholders until the site's house style sets its palette. */
  --c-page: rgb(255, 255, 255);
  /* Doctor Beran's admin layout (views/layouts/area.php, components/admin.css), from the drberan site's house style. */
  --c-off-white: rgb(
    250,
    250,
    250
  ); /* behind the page in /admin, /staff, /user */
  --c-ground: rgb(250, 248, 244); /* warm cream: a menu row under the pointer */
  --c-heading: rgb(78, 78, 78); /* soft black for headings */
  --c-anthracite: rgb(
    84,
    88,
    92
  ); /* dark grey: the band with a partner's or clinic's name above their menu */
  --c-accent: rgb(238, 248, 255); /* palest blue: the avatar's circle */
  --c-accent-text: rgb(
    27,
    85,
    126
  ); /* deep blue: the area's name under the logo, the avatar's letter */
  --c-menu-button: rgb(47, 149, 220); /* the open page's row in the menu */
  --c-menu-button-text: var(--c-off-white);
  --c-hex: rgba(
    47,
    149,
    220,
    0.2
  ); /* the hexagon texture (components/hex.css): thin lines of that blue at 20% */
  --c-hex-area: rgba(
    47,
    149,
    220,
    0.15
  ); /* the hexagons behind the page in /admin, /staff, /user: softer, at 15% */
  --c-bar: rgb(
    196,
    229,
    255
  ); /* light blue: a bar in a small chart (the dashboard's Consultations held) */
  --c-menu-button-hover: rgb(
    30,
    105,
    160
  ); /* the bright button on hover (button--bright) */
  --c-blue-glow: rgb(
    228,
    234,
    239
  ); /* the soft blue glow behind the coming soon page's browser window */
  --c-tick: rgb(25, 135, 84); /* green: a tick on a confirmation */
  --c-pay-top: rgb(
    30,
    140,
    88
  ); /* the checkout's Pay button: a green gradient, white words readable on both ends */
  --c-pay-bottom: rgb(20, 110, 68);
  --c-pay-hover: rgb(14, 90, 55); /* its bottom on hover */
  --c-photo-label: rgba(
    255,
    255,
    255,
    0.92
  ); /* the webinar page: the white box with Dr Beran's name over her photo */
  /* The browser window on the coming soon page: its three dots, as on a Mac. */
  --c-window-close: rgb(255, 95, 87);
  --c-window-min: rgb(254, 188, 46);
  --c-window-max: rgb(40, 200, 64);
  --c-chip: rgb(
    236,
    245,
    252
  ); /* the calendar's availability slots and Add: pale blue */
  --c-chip-border: rgb(196, 229, 255);
  --c-linen: rgba(
    255,
    255,
    255,
    0.025
  ); /* the calendar's title band: the very faint crosshatch over anthracite */
  --c-on-dark-muted: rgba(
    255,
    255,
    255,
    0.8
  ); /* the dialog's × on its anthracite bar */
  --c-on-dark-hover: rgba(255, 255, 255, 0.1); /* behind it on hover */
  --c-glass-top: rgba(
    255,
    255,
    255,
    0.95
  ); /* glass buttons: white at the top fading to see-through */
  --c-glass-bottom: rgba(255, 255, 255, 0.55);
  --c-glass-edge: rgba(255, 255, 255, 0.9); /* their bright top edge */
  --c-glass-toast: rgba(
    255,
    255,
    255,
    0.6
  ); /* under a toast's glass, so its words stay easy to read */
  --c-surface: rgb(245, 245, 244);
  --c-line: rgb(222, 222, 220);
  --c-text: rgb(28, 28, 30);
  --c-text-muted: rgb(92, 92, 96);
  --c-action: rgb(38, 84, 160);
  --c-action-hover: rgb(28, 64, 124);
  --c-error: rgb(179, 38, 30);
  /* Focus (Bootstrap's): a soft 4px ring of the action colour at 25%, and a lighter border on fields.
     When the site changes --c-action, update these two to match. */
  --c-focus-ring: rgba(38, 84, 160, 0.25);
  --c-focus-border: rgb(147, 170, 208); /* --c-action mixed 50% with white */
  --c-error-ring: rgba(
    179,
    38,
    30,
    0.25
  ); /* --c-error at 25%, for fields in error */
  --c-error-hover: rgb(150, 30, 24);
  --c-backdrop: rgba(28, 28, 30, 0.5); /* behind dialogs */

  /* Message colours (Bootstrap 5.3's soft alert colours): background, border, text. */
  --c-success-bg: rgb(209, 231, 221);
  --c-success-border: rgb(163, 207, 187);
  --c-success-text: rgb(10, 54, 34);
  --c-info-bg: rgb(207, 244, 252);
  --c-info-border: rgb(158, 234, 249);
  --c-info-text: rgb(5, 81, 96);
  --c-warning-bg: rgb(255, 243, 205);
  --c-warning-border: rgb(255, 230, 156);
  --c-warning-text: rgb(102, 77, 3);
  --c-warning-dot: rgb(214, 150, 20); /* the warning toast's amber dot */
  --c-error-bg: rgb(248, 215, 218);
  --c-error-border: rgb(241, 174, 181);
  --c-error-text: rgb(88, 21, 28);

  /* Fonts: self-hosted Google Fonts (assets/css/fonts.css), with the system font as the fallback. */
  --font-body:
    "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "STIX Two Text", Georgia, "Times New Roman", serif;

  /* Type scale: base 16px. Ratio 1.2 on phones, 1.25 from md (768px).
     A site changes its scale by changing --fs-ratio only. */
  --fs-ratio: 1.2;
  --fs-xxs: 1rem; /* 10px: the smallest; small capitals in the dashboard's tile bands */
  --fs-xs: 1.1rem; /* 11px: small capitals (the area's name under the logo) */
  --fs-menu: 1.4rem; /* 14px: the rows of the areas' menu */
  --fs-hello-max: 3.1rem; /* 31px: the most the dashboard's greeting grows to on phones (its desktop size) */
  --fs-body: 1.6rem; /* 16px, also the minimum for inputs */
  --fs-small: calc(var(--fs-body) / var(--fs-ratio)); /* 13.3 / 12.8px */
  --fs-lead: calc(var(--fs-body) * var(--fs-ratio)); /* 19.2 / 20px */
  --fs-h4: calc(var(--fs-body) * pow(var(--fs-ratio), 2)); /* 23 / 25px */
  --fs-h3: calc(var(--fs-body) * pow(var(--fs-ratio), 3)); /* 27.6 / 31.3px */
  --fs-h2: calc(var(--fs-body) * pow(var(--fs-ratio), 4)); /* 33.2 / 39.1px */
  --fs-h1: calc(var(--fs-body) * pow(var(--fs-ratio), 5)); /* 39.8 / 48.8px */

  --lh-body: 1.5;
  --lh-heading: 1.2;

  /* Spacing: 4px grid. */
  --sp-1: 0.4rem; /* 4px */
  --sp-2: 0.8rem; /* 8px */
  --sp-3: 1.2rem; /* 12px */
  --sp-4: 1.6rem; /* 16px */
  --sp-5: 2rem; /* 20px */
  --sp-6: 2.4rem; /* 24px */
  --sp-8: 3.2rem; /* 32px */
  --sp-10: 4rem; /* 40px */
  --sp-12: 4.8rem; /* 48px */
  --sp-16: 6.4rem; /* 64px */
  --sp-24: 9.6rem; /* 96px */

  /* Lines and corners. */
  --border-1: 0.1rem; /* 1px */
  --radius-1: 0.4rem; /* 4px */
  --radius-2: 0.8rem; /* 8px: dialogs (Bootstrap's large radius) */
  --radius-pill: 99rem; /* fully rounded: the avatar, the window's address bar */
  --radius-window: 1.2rem; /* 12px: the browser window on the coming soon page */
  --tracking-caps: 0.2em; /* letter spacing for small capitals */
  --focus-ring: 0 0 0 var(--sp-1) var(--c-focus-ring);
  --shadow-glass:
    inset 0 var(--border-1) 0 var(--c-page),
    0 0 0 var(--border-1) rgba(28, 28, 30, 0.08),
    0 0.2rem 0.6rem rgba(28, 28, 30, 0.1); /* glass buttons (the calendar's Availability): bright top edge, faint ring, soft shadow */
  --shadow-glass-hover:
    inset 0 var(--border-1) 0 var(--c-page),
    0 0 0 var(--border-1) rgba(28, 28, 30, 0.16),
    0 0.2rem 0.8rem rgba(28, 28, 30, 0.14);
  --shadow-pressed: inset 0 0.2rem 0.3rem rgba(28, 28, 30, 0.1); /* a joined button that looks pressed in: the chosen one */
  --shadow-seg: 0 var(--border-1) 0.2rem rgba(28, 28, 30, 0.08); /* the faint lift under a row of joined buttons */
  --shadow-1: 0 var(--sp-2) var(--sp-4) rgba(28, 28, 30, 0.15);

  /* Icons drawn in CSS (data: images are allowed by the content security policy). The chevron of every select, in --c-text-muted. */
  --icon-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='rgb(92,92,96)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
  --shadow-bright: 0 var(--sp-1) var(--sp-3) rgba(47, 149, 220, 0.35); /* a soft blue glow under the bright button */
  --shadow-pay: 0 var(--sp-1) var(--sp-3) rgba(20, 110, 68, 0.35); /* a soft green glow under Pay */
  --shadow-window:
    3rem 4rem 8rem rgba(27, 85, 126, 0.18),
    0.8rem 1.2rem 2.4rem rgba(28, 28, 30, 0.08); /* the browser window, lifted off the page */ /* things that float: dialogs, toasts (Bootstrap's shadow) */
  /* The hexagon texture: one 56 x 100px tile of honeycomb lines (only its shape is used; the colour is --c-hex),
     and its default fade, strongest in the middle and gone at the edges. */
  --hex-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E");
  --hex-size: 5.6rem 10rem;
  --hex-fade: radial-gradient(
    closest-side,
    rgb(0, 0, 0),
    rgba(0, 0, 0, 0.5) 45%,
    rgba(0, 0, 0, 0)
  );

  /* Stacking: toasts sit above everything on the page (dialogs use the browser's top layer). */
  --z-toast: 1000;

  /* Form fields: 24 top + 24 text line + 8 bottom + 2 border = 58px (Bootstrap's floating-label height). */
  --field-h: calc(
    var(--sp-6) + var(--fs-body) * var(--lh-body) + var(--sp-2) + 2 *
      var(--border-1)
  );

  /* Buttons: three sizes on the 4px grid, close to Bootstrap's 31 / 38 / 48px. */
  --button-h-sm: var(--sp-8); /* 32px */
  --button-h: var(--sp-10); /* 40px */
  --button-h-lg: var(--sp-12); /* 48px */
  --admin-top-h: calc(
    2 * var(--sp-3) + var(--button-h-sm) + var(--border-1)
  ); /* the phone top bar of the areas: its padding, menu button and line (57px) */

  /* Transitions: Bootstrap's timings. Turned off for visitors who ask for reduced motion (base.css). */
  --ease: ease-in-out;
  --duration-fast: 0.15s; /* hover and focus on buttons and fields */
  --duration-base: 0.2s; /* anything larger that moves or fades */
  --duration-slow: 0.3s; /* dialogs sliding in */
  --ease-out: ease-out;

  /* Page container widths per breakpoint (Bootstrap's). */
  --container-sm: 54rem; /* 540px from 576px */
  --container-md: 72rem; /* 720px from 768px */
  --container-lg: 96rem; /* 960px from 992px */
  --container-xl: 114rem; /* 1140px from 1200px */
  --container-xxl: 132rem; /* 1320px from 1400px */
  --gutter: var(
    --sp-6
  ); /* 24px: the space at each side of the page in the areas (40px from 768px, 64px from 1200px) */

  /* Floating boxes. */
  --dialog-w: 50rem; /* 500px, Bootstrap's modal width */
  --auth-w: 40rem; /* 400px, the sign-in pages' single column */
  --text-w: 72rem; /* 720px, a comfortable line length for reading (Pages module text) */
  --area-menu-w: 28rem; /* 280px (Bootstrap's sidebar), the menu beside the page in /admin, /staff, /user (from 992px) */
  --logo-h: 2rem; /* 20px: the logo at the top of the area menu */
  /* The coming soon page: its widest content, the words' width, and the browser window's turn in 3D (less on phones). */
  --soon-max: 144rem; /* 1440px */
  --soon-text-w: 52rem; /* 520px */
  --window-depth: 160rem;
  --window-turn-y: -16deg;
  --window-turn-x: 6deg;
  --window-turn-phone: 0.6;
  --qr-size: 20rem; /* 200px, the QR code for setting up a code generator app */
  /* The Calendar module (pages/calendar.css). */
  --calendar-row: var(
    --sp-4
  ); /* 16px: a quarter of an hour, so an hour is 64px */
  --calendar-time-w: var(--sp-16); /* 64px: the column of hours */
  --calendar-panel-w: 48rem; /* 480px: the Availability drop-down */
  --calendar-menu-w: 26.4rem; /* 264px: Availability's Templates menu */
  --calendar-edit-w: 32rem; /* 320px: Availability's Edit menu (Add a slot) */
  --calendar-time-pick-w: 12.8rem; /* 128px: the Availability's From and To from 768px */
  /* A client's file (pages/client.css). */
  --client-min-h: 64rem; /* 640px: the shortest the file's box gets; on a shorter screen the page scrolls instead */
  --client-side-w: 26rem; /* 260px: the journey and the list of reports beside the page (from 992px) */
  --client-qty-w: 12rem; /* 120px: How many, beside the product picker in an order */
  --client-dose-panel-w: 46rem; /* 460px: the Change dose drop-down */
  --client-tag-w: 12.8rem; /* 128px: the Prescription or Shop column of an order's lines, so the tags line up */
  --client-step-w: 17rem; /* 170px: one step in the journey's sideways row (below 992px) */
  /* Booking a consultation (pages/book.css). */
  --book-pick-w: 20rem; /* 200px: the narrowest a consultant's button gets before they stack */
  --book-label-w: 14rem; /* 140px: the labels on Check and book */
  /* Orders: the How many field beside each item of an order being made. */
  --quantity-w: 12rem; /* 120px */
  /* The shop (pages/shop.css). */
  --c-hex-shop: rgba(
    47,
    149,
    220,
    0.3
  ); /* the shop's hexagons: stronger than the rest of the site (20%) */
  --shop-max: 144rem; /* 1440px: the shop's widest content */
  --shop-top-h: calc(
    2 * var(--sp-4) + var(--button-h-sm) + var(--border-1)
  ); /* the phone top bar while the menu is open (65px) */
  --shop-hero-gap: var(
    --sp-12
  ); /* 48px: the least space between the hero and the first box of products */
  --shop-help-w: 56rem; /* 560px: Help me choose's drop-down */
  --shop-prices-w: 28rem; /* 280px: the Prices in drop-down */
  --shop-hex-h: 140rem; /* 1400px: how far down the hexagons reach behind the top of the shop */
  --shop-hex-bottom-h: 90rem; /* 900px: how far up the hexagons reach from the bottom left */
  --shop-cart-w: 36rem; /* 360px: the basket's drop-down */
  --shop-add-w: 28rem; /* 280px: the widest a product page's Add to basket gets */
  --c-glass-bar: rgba(
    255,
    255,
    255,
    0.72
  ); /* the sticky header's white glass, once the page scrolls under it */
  --c-glass-bar-line: rgba(222, 222, 220, 0.8); /* the faint line under it */
  --shadow-bar: 0 var(--sp-1) var(--sp-4) rgba(28, 28, 30, 0.06);
  --blur-bar: blur(1.4rem) saturate(1.4); /* what shows through the shop's sticky header and every toast, blurred */
  /* The home page's hero (pages/home.css): the floating hexagon whose photo changes every 10 seconds. */
  --home-hex-w-phone: 30rem; /* 300px: the most it gets on phones, above the words */
  --home-hex-w: 44rem; /* 440px: the most it gets beside the words (from 992px) */
  --home-hex-border: var(--sp-1); /* 4px: its white border */
  --c-home-hex-clear: rgba(
    255,
    255,
    255,
    0.5
  ); /* inside a product's hexagon: half see-through, the hexagons behind show */
  --shadow-home-hex: drop-shadow(1.6rem 2.4rem 3.2rem rgba(27, 85, 126, 0.16));
  /* Its three speeds: change one number to speed an effect up (smaller) or slow it down (bigger). */
  --home-photo-time: 6s; /* how long each photo stays; its grow and shrink take about a quarter of it each */
  --home-hover-time: 10.2s; /* one gentle bob up and down; the sideways drift and the tilt are slower, set from it */
  --home-glow-time: 8.75s; /* the background hexagons fading in and out (the six sets each a little faster or slower) */
  --home-cycle: calc(var(--home-photo-time) * 9); /* 9 photos: one full round */
  --home-drift: calc(
    var(--home-hover-time) * 1.43
  ); /* three movements of different lengths, so the hovering never repeats the same way */
  --home-float: var(--home-hover-time);
  --home-tilt: calc(var(--home-hover-time) * 2.29);
  --home-turn: 0.8deg; /* how far it tilts */
  --ease-swap: cubic-bezier(
    0.65,
    0,
    0.35,
    1
  ); /* a photo growing in and shrinking away: slow at both ends */
  --home-fill-size: 112rem 100rem; /* the filled hexagons' tile (img/home/hexagons/): 20 x 10 honeycomb tiles, so the pattern only repeats every 1120px */
  /* What we do (pages/home.css): the four steps the page stops on while scrolling moves through them. */
  --home-what-top: var(
    --shop-top-h
  ); /* where the section stops: just under the sticky header */
  --home-what-step: 55vh; /* how much scrolling moves on one step */
  --home-what-step-dvh: 55dvh; /* the same, of the visible screen on phones */
  --home-what-intro-w: 72rem; /* 720px: the widest its title and words get */
  --home-what-photo-opacity: 0.1; /* the glass photo behind it (img/home/what-we-do/): 10%, it is a strong image */
  --home-what-photo-fade: linear-gradient(
    transparent,
    rgb(0, 0, 0) 35%,
    rgb(0, 0, 0) 65%,
    transparent
  ); /* fades in at the top, out at the bottom */
  --c-what-bar: rgba(
    255,
    255,
    255,
    0.45
  ); /* the steps' bar: frosted glass, brighter at the top and the bottom */
  --what-bar-shine: linear-gradient(
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.35) 55%,
    rgba(255, 255, 255, 0.6)
  );
  --shadow-what-bar:
    inset 0 var(--border-1) 0 var(--c-page),
    inset 0 calc(-1 * var(--border-1)) 0 rgba(28, 28, 30, 0.06),
    0 0 0 var(--border-1) rgba(255, 255, 255, 0.7),
    0 var(--sp-2) var(--sp-6) rgba(27, 85, 126, 0.12),
    0 0.2rem 0.6rem rgba(28, 28, 30, 0.06);
  --what-pill: /* the chosen step: glossy anthracite glass, shining on its top half */
    linear-gradient(
      rgba(255, 255, 255, 0.28),
      rgba(255, 255, 255, 0.06) 48%,
      rgba(255, 255, 255, 0) 52%
    ),
    linear-gradient(rgb(106, 110, 114), rgb(52, 55, 58));
  --shadow-what-pill:
    inset 0 var(--border-1) 0 rgba(255, 255, 255, 0.45),
    inset 0 calc(-1 * var(--border-1)) 0 rgba(0, 0, 0, 0.25),
    0 var(--sp-1) var(--sp-3) rgba(28, 28, 30, 0.28),
    0 var(--border-1) 0.2rem rgba(28, 28, 30, 0.2);
  /* Our areas of expertise (pages/home.css): a light panel, Dr. Beran with two products, three cards under her. */
  --areas-bg: /* faded in from the page's off-white at the top and out to it at the bottom; white top left to palest blue bottom right */
    linear-gradient(var(--c-off-white), rgba(250, 250, 250, 0) 24rem, rgba(250, 250, 250, 0) calc(100% - 24rem), var(--c-off-white)),
    linear-gradient(135deg, var(--c-page), var(--c-page) 40%, rgb(242, 247, 251) 70%, rgb(228, 240, 250));
  --areas-hex-band: linear-gradient(to top right, transparent 38%, rgb(0, 0, 0) 47%, rgb(0, 0, 0) 53%, transparent 62%); /* the hexagons: a band from top left to bottom right */
  --areas-hex-fade-in: 24rem;  /* 240px: the hexagons fade in from the top over this */
  --areas-trail-time: 6s;      /* the travelling hexagons: one trip down their eight steps */
  --areas-card-radius: 1.6rem; /* 16px: the cards' corners */
  --areas-photo-radius: 1.2rem; /* 12px: the cards' photos */
  --areas-title-w: 11em;       /* the title wraps over three lines */
  --areas-her-w: 32rem;        /* 320px: Dr. Beran's photo on phones (at most 72% of the panel) */
  --areas-her-w-lg: 36rem;     /* 360px: from 768px */
  --areas-her-fade: linear-gradient(rgb(0, 0, 0) 84%, transparent); /* she fades out at the bottom, behind the first card */
  --areas-her-look: brightness(1.04) saturate(0.88) sepia(0.08); /* a little warmer and softer */
  --shadow-areas-her: drop-shadow(1.6rem 2.4rem 3.2rem rgba(27, 85, 126, 0.16));
  /* Frequently asked questions (pages/home.css) */
  --faq-answer-w: 68ch;        /* an answer's longest line, so it stays easy to read */
  --shadow-areas-product: drop-shadow(0.8rem 1.6rem 1.6rem rgba(27, 85, 126, 0.22));
  --c-areas-card: rgba(255, 255, 255, 0.7); /* the cards: the background shows through a little */
  --c-areas-card-line: rgb(232, 236, 240); /* a light border round each card */
  --areas-cutout-fade: linear-gradient(rgb(0, 0, 0) 60%, transparent); /* a card photo fades out over its bottom 40% */
  --areas-white-fade-x: linear-gradient(to right, transparent, rgb(0, 0, 0) 12%, rgb(0, 0, 0) 88%, transparent); /* a photo on white also fades out at both sides */
  --areas-photo-w: 28rem;      /* 280px: the widest a card's photo gets */
  --areas-photo-w-wide: 48rem; /* 480px: the wide card's photo */
  --areas-overlap-md: 8rem;    /* 80px: how far the cards come up over her photo from 768px (40px on phones) */
  --areas-overlap-lg: 12rem;   /* 120px: from 992px */
  /* What our clients say (pages/home.css): a dark band with a row of quote cards that scrolls sideways. */
  --c-quotes-line: rgba(255, 255, 255, 0.14); /* the cards' outline and the line above the name */
  --c-quotes-card: rgba(255, 255, 255, 0.04); /* the cards: a touch lighter than the panel */
  --quotes-card-w: 85%;  /* phones: one card and the edge of the next */
  /* The drawn bottle of a product without a photo (as on the first site). */
  --bottle-w: 36%; /* of its card's photo box */
  --bottle-w-lg: 45%; /* of a product page's photo box */
  --c-bottle-cap: rgb(240, 120, 40); /* orange, on every other product */
  --c-bottle-band: rgb(90, 185, 190); /* the teal label */
  --shadow-bottle: 0 var(--sp-2) var(--sp-3) rgba(27, 85, 126, 0.12);
}

@media (min-width: 768px) {
  :root {
    --fs-ratio: 1.25;
    --gutter: var(--sp-10); /* 40px */
  }
}

@media (min-width: 1200px) {
  :root {
    --gutter: var(--sp-16); /* 64px */
  }
}
