/*
  Furst Works: light / dark color themes
  ======================================
  Every page links this file. The pages use color "variables" like
  var(--text) instead of fixed color codes. This file says what each
  variable means in light mode and in dark mode.

  To change a color: edit it here once and every page updates.
  The LIGHT values are the site's original colors, so light mode looks
  exactly like it did before dark mode was added.

  Which theme is active is decided by theme.js (visitor's saved choice,
  otherwise DARK, the default). It puts data-theme="light" or
  data-theme="dark" on the <html> tag.

  Colors NOT listed here (the charcoal "Built on Bedford stone" band,
  the footer text, the photo placeholders, the white text on teal buttons)
  are already light-on-dark, so they stay the same in both modes.
*/

/* ---------- LIGHT MODE (original site colors) ---------- */
:root {
  color-scheme: light;          /* tells the browser to draw light form controls and scrollbars */
  --page: #ECE8E1;              /* main page background (limestone) */
  --band: #F5F2EC;              /* lighter background stripes between sections */
  --card: #FBFAF7;              /* cards and the contact form box */
  --field: #FFFFFF;             /* inside of text boxes */
  --dark-band: #1C1F22;         /* charcoal sections (already dark) */
  --footer: #15171A;            /* footer background */
  --btn-dark: #1C1F22;          /* dark "Get in touch" button on the contact page */

  --text: #1C1F22;              /* main text (charcoal) */
  --text-soft: #45494D;         /* paragraph text */
  --text-muted: #55595D;        /* small print, labels */
  --accent-text: #1F6359;       /* teal headings, labels, links, logo */
  --accent-line: #1F6359;       /* teal decorative lines and borders */
  --link-hover: #14443D;        /* link color when the mouse is over it */

  --line: #D3CCBF;              /* thin divider lines */
  --line-soft: #E4DED3;         /* very light divider lines */
  --line-strong: #A9A398;       /* pill and dashed borders */
  --field-border: #8A857C;      /* text box borders */

  --error-bg: #FBEDEA;          /* "message didn't send" box */
  --error-text: #7A2A1F;
  --error-line: #A33A2B;
}

/* ---------- DARK MODE ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #15181B;
  --band: #1B1F23;
  --card: #1E2226;
  --field: #121417;
  --dark-band: #0E1012;         /* a bit darker than the page so the band still stands out */
  --footer: #0A0B0D;
  --btn-dark: #2E3338;

  --text: #ECE8E1;              /* limestone becomes the text color */
  --text-soft: #C9CCCE;
  --text-muted: #A3A8AC;
  --accent-text: #7DC2B4;       /* the site's existing lighter teal, readable on dark */
  --accent-line: #5FAE9F;
  --link-hover: #A6DCD1;

  --line: #2E3338;
  --line-soft: #262A2E;
  --line-strong: #4A5056;
  --field-border: #5E646A;

  --error-bg: #3A1F1B;
  --error-text: #F2B8AE;
  --error-line: #C0564A;
}

/* ---------- Page-wide rules that use the variables ---------- */
body { background: var(--page); }   /* fills the edges when a phone over-scrolls */
a { color: var(--accent-text); }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible { outline-color: var(--accent-line); }
:root[data-theme="dark"] ::placeholder { color: var(--text-muted); opacity: 1; }   /* dark mode only; light keeps the browser default */

/* ---------- The light/dark switch button in the header ---------- */
.fw-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;      /* 44px = comfortable finger size */
  border: 1.5px solid var(--line-strong); border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer;
}
.fw-theme-toggle:hover { border-color: var(--accent-line); color: var(--accent-text); }
.fw-theme-toggle[hidden] { display: none; }

/* Keep the switch in the upper-right corner of the header.
   Computers: logo on the left, then the menu, then the switch at the far right.
   Phones/small screens: the menu drops to its own row, and the switch stays
   up top to the right of the logo. */
.fw-theme-toggle { order: 3; flex: none; }
header nav[aria-label="Main"] { margin-left: auto; }   /* pushes the menu right, next to the switch */
@media (max-width: 899px) {
  .fw-theme-toggle { order: 2; }
  header nav[aria-label="Main"] { order: 3; flex-basis: 100%; }
}
/* Show the moon in light mode (click = go dark), the sun in dark mode (click = go light) */
.fw-theme-toggle .fw-icon-sun { display: none; }
:root[data-theme="dark"] .fw-theme-toggle .fw-icon-sun { display: block; }
:root[data-theme="dark"] .fw-theme-toggle .fw-icon-moon { display: none; }
