/* =====================================================================
   style.css  -  shared by index.html, meetings.html, contact.html, about.html
   Change something here and it changes on every page.
   ---------------------------------------------------------------------
   HOW THIS FILE IS ORGANISED
     1. SETTINGS     fonts, colours, shadows and glass effects  (start here)
     2. BASE         page defaults
     3. MENU BAR     the glass bar at the top
     4. BOXES        the kinds of box, and how to make a new one
     5. EXTRAS       divider line, phone tweaks

   I WANT TO ...                                  CHANGE THIS (in section 1)
     make the text in the boxes bigger / smaller   --box-text-size
     make box headlines bigger / smaller           --box-headline-size
     change the font                               --font-body, --font-headings, --font-menu
     change the gold or silver border colour       --gold, --silver
     change the colour of links (and on hover)     --link-colour, --link-hover-colour
     make links bold or not / underlined or not    --link-weight, --link-underline
     make the menu bar more / less see-through     --menu-opacity
     make the boxes more / less see-through        --box-opacity
     stronger / weaker shadow on all text          --text-shadow  (none = no shadow)
     change the shadows                            --box-shadow, --menu-shadow
     make the corners rounder or square            --box-radius
     more / less space at the sides inside boxes   --box-padding-sides  (up/down: --box-padding)
     centre one box / one headline / one paragraph add class="center" (see TEXT ALIGNMENT, section 4)
     (the headline of PICTURE boxes has its own size: search for ".box.picture h2")

   Things that belong to ONE page only (its background picture, the slideshow,
   the landing section...) stay inside that page's own <style> block.
   ===================================================================== */


/* =====================================================================
   1. SETTINGS  -  the easy part: only change the values after the colons
   ===================================================================== */
:root {

  /* ---- FONTS --------------------------------------------------------
     Safe fonts that exist on nearly every device: Arial, Verdana, Tahoma,
     "Trebuchet MS", Georgia (serif), "Times New Roman" (serif).
     NOTE: "Segoe UI" is installed on Windows only. Other devices (Mac, iPhone, Android)
     use the next font in the list that they have, so the list below ends with fallbacks.
     Always end a list with a fallback: sans-serif or serif.
     Example:  --font-headings: Georgia, "Times New Roman", serif;
     (A font from Google Fonts also needs a <link> line in the <head> of
     every page - ask and I'll set it up.)                                */
  --font-body:     'Merriweather', Georgia, system-ui, -apple-system, 'Times New Roman', Times, serif;
  --font-headings: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;         /* box headlines */
  --font-menu:     "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;         /* menu links */
  --menu-font-size:        2.5rem;           /* menu links on large screens */
  --menu-font-size-mobile: 1.3rem;           /* ... and on phones */
  --menu-font-weight:      600;              /* 400 normal, 600 semi-bold, 700 bold */

  /* ---- TEXT SIZE IN BOXES ---------------------------------------------
     1rem = normal size,  1.5rem = half as big again,  2rem = double.
     clamp(smallest, preferred, largest) lets the text grow with the screen:
     phones use about the smallest value, big screens the largest.
     Simple version: write one value, e.g.  --box-text-size: 1.5rem;       */
  --box-text-size:     clamp(1rem, 2.6vw, 1.6rem);   /* normal text */
  --box-headline-size: clamp(1.2rem, 4vw, 2rem);          /* headlines (h2) */
  --box-line-height:   1.6;                             /* space between lines of text */
  --box-text-align:    left;                            /* how text in boxes starts out: left, center or right */

  /* ---- COLOURS ------------------------------------------------------ */
  --gold:           #fc9d03;                 /* border of normal boxes, links inside boxes */
  --silver:         #c0c0c0;                 /* border of picture boxes */
  --link-colour:       var(--gold);          /* every ordinary link */
  --link-hover-colour: #fff;                 /* ... when the mouse is over it (or it is tabbed to) */
  --link-weight:       700;                  /* 400 = normal letters, 700 = bold */
  --link-underline:    none;                 /* none, or underline */
  --text-on-dark:   #fff;                    /* text in boxes and the menu */
  --divider-colour: #b0b0b0;                 /* the thin line between content */
  --page-fallback:  #1b1b1b;                 /* only shows if a picture is missing or still loading */

  /* ---- MENU BAR GLASS ------------------------------------------------
     --menu-rgb is the colour as three numbers: red, green, blue (0-255).
     #0f265c = 15, 38, 92.   Opacity: 0 = invisible, 1 = solid.           */
  --menu-rgb:         15, 38, 92;
  --menu-opacity:     .5;
  --menu-blur:        10px;                  /* frosted-glass blur behind the bar (0px = none) */
  --menu-blur-mobile: 6px;                   /* lighter on phones, keeps scrolling smooth */
  --menu-shadow:      0 4px 12px rgba(0, 0, 0, .25);
  --text-shadow:      0 1px 3px rgba(0, 0, 0, .55);   /* subtle shadow on ALL text; write none to remove */
  --link-text-shadow: 0 2px 4px rgba(0, 0, 0, .6);   /* shadow on the menu text */
  --hover-highlight:  rgba(255, 255, 255, .15);      /* menu link when hovered / current page */

  /* ---- BOXES ----------------------------------------------------------
     A shadow is written: sideways  down  blur  colour.                   */
  --box-rgb:            0, 0, 0;             /* black, as three numbers */
  --box-opacity:        .8;                  /* see-through amount on computers */
  --box-opacity-mobile: .85;                 /* phones: a bit more solid, no blur (smoother) */
  --box-blur:           10px;
  --box-border-width:   1px;
  --box-radius:         15px;                 /* roundness of the corners (0 = square) */
  --box-padding:        1.5rem;              /* space above and below the text inside a box */
  --box-padding-sides:  clamp(1.75rem, 4vw, 3rem);   /* space left and right of the text (grows with the screen) */
  --box-shadow:         0 4px 14px rgba(0, 0, 0, .3);   /* used by ALL boxes, the slideshow and the black panel */
  --title-shadow:       0 2px 4px rgba(0, 0, 0, .6), 0 0 18px rgba(0, 0, 0, .5);   /* big text on picture boxes */
  --box-gap:            1.5rem;              /* space between stacked boxes */
  --content-width:      1000px;              /* widest the stack of boxes gets */
}


/* =====================================================================
   2. BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page-fallback); }
body {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.6;
  color: #1f2933;
  text-shadow: var(--text-shadow);          /* all text inherits this; the menu, picture titles and landing page have their own */
}
h1, h2, h3 { font-family: var(--font-headings); }
button, input, textarea { font-family: inherit; }   /* so they use the site font too */

/* LINKS: every ordinary link is orange, bold, not underlined, and turns white when hovered or tabbed to.
   New links get this automatically. Change the colours in section 1. */
a {
  color: var(--link-colour);
  font-weight: var(--link-weight);
  text-decoration: var(--link-underline);
  transition: color .2s;
  font-family : "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
a:hover, a:focus-visible { color: var(--link-hover-colour); }


/* =====================================================================
   3. MENU BAR  (sticks to the top, glass look)
   ===================================================================== */
.menu {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(var(--menu-rgb), var(--menu-opacity));
  -webkit-backdrop-filter: blur(var(--menu-blur));
  backdrop-filter: blur(var(--menu-blur));
  box-shadow: var(--menu-shadow);
}
.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.menu a {
  display: block;
  padding: 1rem 2rem;                      /* thickness of the bar: first number = up/down */
  font-family: var(--font-menu);
  font-size: var(--menu-font-size);
  font-weight: var(--menu-font-weight);
  color: var(--text-on-dark);
  text-shadow: var(--link-text-shadow);
  text-decoration: none;
}
.menu a:hover,
.menu a:focus-visible,
.menu a[aria-current="page"] { background: var(--hover-highlight); }

/* Menu button: only shown on small screens */
.menu-toggle {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  height: 3.5rem;                            /* same height as one menu row */
  padding: 0 1.25rem;
  align-items: center;
  border: 0;
  background: none;
  color: var(--text-on-dark);
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6));
}
.menu-toggle svg { width: 1.9rem; height: 1.9rem; }
.menu-toggle:hover,
.menu-toggle:focus-visible { background: var(--hover-highlight); }

/* Small screens: just Home plus the button; the rest unfolds as a list when pressed */
@media (max-width: 768px) {
  .menu ul { flex-direction: column; align-items: stretch; }
  .menu li:not(:first-child) { display: none; }
  .menu.open li:not(:first-child) { display: block; }
  .menu a {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    padding: 0 1.25rem;
    font-size: var(--menu-font-size-mobile);
  }
  .menu-toggle { display: flex; }
}


/* =====================================================================
   4. BOXES
   ---------------------------------------------------------------------
   All boxes sit inside <div class="boxes"> and are built from one base:

     KIND 1  normal box: black glass, gold border
             <section class="box"> <h2>Title</h2> <p>Text</p> </section>

     KIND 2  picture box: your picture as the background, silver border,
             big centred white title.  The picture is named on the box itself:
             <section class="box picture" style="--box-image: url('images/header.png')">
               <h2>Title</h2>
             </section>

     EXTRA   slim: a thinner box. Add the word  slim  to any kind:
             <section class="box slim">   or   class="box picture slim"

   TO MAKE A NEW KIND: write a new block that starts with  .box.  and a name,
   change only what should look different, then use that name in class="".
   Example - a green box (class="box green"):
             .box.green { border-color: #4ade80; background: rgba(0, 40, 0, .8); }
   ===================================================================== */
.boxes {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--box-gap);
}

/* Base box = KIND 1 (black glass, gold border) */
.box {
  width: 100%;                               /* each box fills the full width of the column */
  padding: var(--box-padding) var(--box-padding-sides);   /* up/down, then left/right */
  background: rgba(var(--box-rgb), var(--box-opacity));
  -webkit-backdrop-filter: blur(var(--box-blur));
  backdrop-filter: blur(var(--box-blur));
  border: var(--box-border-width) solid var(--gold);
  border-radius: var(--box-radius);
  color: var(--text-on-dark);
  text-align: var(--box-text-align);         /* normally left; see TEXT ALIGNMENT below */
  font-size: var(--box-text-size);           /* size of the text: change it in section 1 */
  line-height: var(--box-line-height);
  box-shadow: var(--box-shadow);
  
}
.box h2 { margin-top: 0; font-size: var(--box-headline-size); }

/* KIND 2: picture box */
.box.picture {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;                   /* text sits in the exact middle */
  text-align: center;                        /* picture boxes are always centred */
  min-height: clamp(9rem, 20vw, 16rem);      /* how tall the picture box is */
  background: var(--box-image) center / cover no-repeat;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: var(--silver);
}
.box.picture h2 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 3rem);       /* grows with the screen */
  font-weight: 700;
  color: #fff;
  text-shadow: var(--title-shadow);
}



/* EXTRA: slim (thinner) */
.box.slim { padding: .9rem var(--box-padding-sides); }
.box.slim h2, .box.slim p { margin: 0; }

/* TEXT ALIGNMENT
   Text in a box starts out as set by --box-text-align (left = a normal paragraph).
   Add a word to choose on purpose. It works on a whole box or on just one element:
     <section class="box center">          everything in the box centred
     <h2 class="center">Headline</h2>      only this headline centred, the paragraphs below stay left
     <p class="right">...</p>              only this paragraph right-aligned
   The words are: center, left, right. Mix and match as you like. */
.center { text-align: center; }
.left   { text-align: left; }
.right  { text-align: right; }


/* =====================================================================
   5. EXTRAS
   ===================================================================== */

/* Thin line between content, e.g. <hr class="divider"> */
.divider {
  width: min(80%, 26rem);
  margin: 1rem auto;
  border: 0;
  border-top: 1px solid var(--divider-colour);
}

/* E-mail address link (the address itself is put together by a small script on the page) */
.box a.mail { color: inherit; }              /* on purpose plain text instead of orange; tapping it opens an e-mail */

/* Phones: blurring everything behind every box makes scrolling choppy, so the boxes
   use a slightly more solid black instead, and the menu bar blurs a little less. */
@media (max-width: 768px), (hover: none) {
  .box { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(var(--box-rgb), var(--box-opacity-mobile)); }
  .menu { -webkit-backdrop-filter: blur(var(--menu-blur-mobile)); backdrop-filter: blur(var(--menu-blur-mobile)); }
}
