/* ==========================================================================
   Cloud Based POS System - base styles
   Tokens, reset, typography, layout, header, footer, buttons.
   Colours come from the content briefs: primary #0B1F33, accent #0F766E, body #334155,
   muted #64748B, alt background #F8FAFC, dark band #0B1F33. Teal #14B8A6 and amber #F59E0B
   are decorative on light backgrounds and only used as text on the dark band.
   ========================================================================== */

:root {
  --primary: #0B1F33;
  --accent: #0F766E;          /* 5.47:1 on white */
  --accent-hover: #115E59;
  --accent-bright: #14B8A6;   /* decorative on light; text on dark only (6.71:1) */
  --amber: #F59E0B;           /* decorative on light; text on dark only (7.77:1) */
  --body: #334155;            /* 10.35:1 on white */
  --muted: #64748B;           /* 4.76:1 on white, 4.55:1 on #F8FAFC */
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-dark: #0B1F33;
  --bg-dark-2: #123A5E;
  --tint: #F0FDFA;
  --tint-2: #CCFBF1;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --field-border: #64748B;    /* >= 3:1 against white for form controls */
  --warning: #D97706;
  --warning-bg: #FEF3C7;
  --error: #B91C1C;

  --radius: 12px;             /* [CARD RADIUS] */
  --radius-sm: 8px;
  --btn-radius: 8px;          /* [BUTTON RADIUS] */
  --gap: 24px;                /* [GRID GAP] */
  --maxw: 1800px;             /* [MAX CONTENT WIDTH]: the site is full width, this only stops it stretching on very large monitors */
  --prose: 780px;             /* [MAX PROSE WIDTH] */
  --gutter: clamp(16px, 3.4vw, 64px);   /* side space: grows with the screen so the content always uses the width */
  --header-h: 72px;

  --shadow-sm: 0 1px 2px rgba(11, 31, 51, .06), 0 1px 3px rgba(11, 31, 51, .05);
  --shadow-md: 0 12px 32px rgba(11, 31, 51, .10);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (max-width: 480px) {
  :root { --header-h: 64px; }
}

/* ---- reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* a focused or targeted element is never hidden under the sticky header (WCAG 2.4.11) */
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.75;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }
svg { flex: none; }
ul, ol { margin: 0; padding: 0; }
p { margin: 0 0 1rem; }
address { font-style: normal; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
strong, b { font-weight: 700; }
button { font: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
main:focus { outline: none; }

::selection { background: var(--tint-2); color: var(--primary); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -120px;
  z-index: 300;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0; color: #fff; outline-color: var(--accent-bright); }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---- layout ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.prose { max-width: var(--prose); margin-inline: auto; }

.band { position: relative; padding-block: 64px; }
.band--alt { background: var(--bg-alt); }
.band--main { background: var(--bg); }

/* full-width dark band: white text, white underlined links, bright teal focus ring */
.band--dark {
  background:
    radial-gradient(900px 380px at 100% 0%, rgba(20, 184, 166, .16), transparent 60%),
    radial-gradient(700px 320px at 0% 100%, rgba(18, 58, 94, .9), transparent 70%),
    var(--bg-dark);
  color: #fff;
  overflow: hidden;
}
.band--dark h1, .band--dark h2, .band--dark h3, .band--dark p, .band--dark li, .band--dark address { color: #fff; }
.band--dark a { color: #fff; text-decoration: underline; }
.band--dark a:hover { color: #fff; text-decoration-thickness: 2px; }
.band--dark :focus-visible { outline-color: var(--accent-bright); }
.band--dark h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.band--dark .btn { text-decoration: none; }
.band--dark .prose > :last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .band { padding-block: 48px; }
}

/* ---- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .65rem 1.35rem;
  border: 2px solid transparent;
  border-radius: var(--btn-radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; }
.btn--lg { min-height: 52px; padding: .8rem 1.6rem; font-size: 1.0625rem; }

.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }   /* 5.47:1 */
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; box-shadow: 0 6px 16px rgba(15, 118, 110, .28); }

.btn--secondary { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn--secondary:hover { background: var(--tint); color: var(--accent-hover); border-color: var(--accent-hover); }

/* on the dark band */
.band--dark .btn--secondary, .btn--light { background: transparent; border-color: #fff; color: #fff; }
.band--dark .btn--secondary:hover, .btn--light:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }
.band--dark .btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.band--dark .btn--primary:hover { background: var(--accent); border-color: #fff; box-shadow: none; }   /* a white edge, since a lighter fill would drop white text below 4.5:1 */
.btn--teal { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--primary); }  /* 6.71:1 */
.band--dark .btn--teal, .btn--teal:hover { color: var(--primary); }
.btn--teal:hover { background: #2DD4BF; border-color: #2DD4BF; }
/* the main button on a dark photo band: [PRIMARY COLOR] text on white with a 2px white edge (16.6:1) */
.btn--white, .band--dark .btn--white { background: #fff; border-color: #fff; color: var(--primary); }
.btn--white:hover, .band--dark .btn--white:hover { background: var(--tint); border-color: #fff; color: var(--primary); box-shadow: none; }

/* text-style buttons (cookie banner "Manage Preferences", footer "Cookie Settings") */
.btn--link {
  min-height: 44px;
  padding: .5rem .75rem;
  border: 0;
  background: none;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .18em;
  font-weight: 600;
}
.btn--link:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
.btn--footer {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-weight: 500;
  font-size: inherit;
  text-decoration: none;
}
.btn--footer:hover { text-decoration: underline; }

.hero-actions, .btn-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }

/* ---- header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(11, 31, 51, .08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
  text-decoration: none;
}
.brand:hover { color: var(--primary); text-decoration: none; }
.brand__mark { width: 40px; height: 40px; flex: none; }

.primary-nav { display: flex; align-items: center; gap: 24px; }
.primary-nav__list { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.primary-nav__list > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: .97rem;
  font-weight: 600;
  text-decoration: none;
}
.primary-nav__list > li > a:hover { background: var(--tint); color: var(--accent); }
.primary-nav__list > li > a.is-current { color: var(--accent); }
.primary-nav__list > li > a.is-current::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.menu-toggle { display: none; }

@media (max-width: 1099px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--field-border);   /* 4.76:1, so the control's edge is visible (WCAG 1.4.11) */
    border-radius: var(--btn-radius);
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
  }
  .menu-toggle:hover { border-color: var(--accent); color: var(--accent); }
  .menu-toggle__icon { display: inline-flex; }
  .menu-toggle .icon--close, .menu-toggle[aria-expanded="true"] .icon--open { display: none; }
  .menu-toggle[aria-expanded="true"] .icon--close { display: inline; }

  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 8px var(--gutter) 24px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 28px rgba(11, 31, 51, .12);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .js .primary-nav { display: none; }
  .js .primary-nav.is-open { display: flex; }
  .primary-nav__list { flex-direction: column; gap: 0; }
  .primary-nav__list > li > a { display: flex; width: 100%; min-height: 48px; padding: 0 4px; border-radius: 0; border-bottom: 1px solid var(--border); font-size: 1.0625rem; }
  .primary-nav__list > li > a.is-current::after { left: 4px; right: auto; width: 24px; bottom: 8px; }
  .primary-nav__cta { width: 100%; }

  /* without JavaScript the links simply sit under the logo */
  .no-js .menu-toggle { display: none; }
  .no-js .header-inner { flex-wrap: wrap; padding-block: 8px; }
  .no-js .primary-nav { position: static; display: flex; width: 100%; box-shadow: none; border: 0; padding: 0 0 12px; max-height: none; }
}

@media (max-width: 380px) {
  .brand { font-size: .98rem; gap: 8px; }
  .brand__mark { width: 36px; height: 36px; }
  .menu-toggle { padding: 0 10px; }
}

/* ---- footer ------------------------------------------------------------ */
.site-footer {
  background: var(--bg-dark);
  color: #CBD5E1;                 /* 11.6:1 on #0B1F33 */
  padding: 64px 0 80px;           /* the bottom space keeps the copyright line clear of the back-to-top button */
  font-size: .97rem;
  line-height: 1.6;
}
.site-footer :focus-visible { outline-color: var(--accent-bright); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 1px; }

.footer-grid {
  display: grid;
  gap: 40px 32px;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
}
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { max-width: 34ch; color: #CBD5E1; }
.footer-contact { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact .icon { color: var(--accent-bright); margin-top: .2em; }
.footer-contact a { text-decoration: underline; }

.footer-col__title {
  margin: 0 0 14px;
  color: #94A3B8;                 /* 7.2:1 on #0B1F33 */
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.footer-col ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.footer-col a { display: inline-flex; align-items: center; min-height: 32px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .9rem;
}
.footer-bottom p { margin: 0; color: #CBD5E1; }
.footer-bottom__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.footer-sitemap, .privacy-choices { display: inline-flex; align-items: center; min-height: 32px; }
.privacy-choices { gap: 8px; }
.privacy-choices__icon { color: var(--accent-bright); }

/* ---- back to top: round button in the bottom-left corner (shown by site.js once the page has scrolled) ---- */
.to-top {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 120;                    /* above the page and the sticky header; site.js lifts it clear of the cookie banner (150) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid #fff;          /* keeps the teal disc visible over the dark footer */
  border-radius: 50%;
  background: var(--accent);       /* white arrow on it: 5.47:1 */
  color: #fff;
  box-shadow: 0 6px 18px rgba(11, 31, 51, .3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s, background-color .15s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { background: var(--accent-hover); }
.to-top:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; }
.to-top .icon { width: 24px; height: 24px; }
body:has(.menu-toggle[aria-expanded="true"]) .to-top { visibility: hidden; }   /* not over the open mobile menu */
@media (max-width: 560px) { .to-top { left: 12px; bottom: 12px; width: 44px; height: 44px; } }
@media print { .to-top { display: none !important; } }

@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-footer { padding-top: 48px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---- motion preferences ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
