/* ==========================================================================
   ALDERWORTH COMMERCE GROUP — MAIN STYLESHEET
   ------------------------------------------------------------------------
   This ONE file controls the visual design of every page on the site.
   All colors, fonts, and spacing are defined once at the top as
   "design tokens" under :root — change a value there and it updates
   everywhere the token is used.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  /* ---- Color tokens ----------------------------------------------------
     Keep this list short and consistent — every color on the site should
     trace back to one of these. */
  --navy: #101a2b;         /* primary text, footer background, headings */
  --slate: #58606e;        /* secondary / body-support text */
  --paper: #ffffff;        /* main background */
  --paper-alt: #f3f5f8;    /* alternating section background */
  --line: rgba(16, 26, 43, 0.12); /* hairline borders/dividers */

  --blue: #2c5aa0;         /* primary accent — CTAs, links, "Marketplaces & Channels" tag */
  --teal: #1f7a64;         /* "Brands" pillar tag */
  --violet: #6552a3;       /* "Technology" pillar tag */

  /* ---- Elevation tokens ---- */
  --shadow-sm: 0 1px 2px rgba(16, 26, 43, 0.06);
  --shadow-md: 0 12px 28px rgba(16, 26, 43, 0.10);

  /* ---- Type tokens ---- */
  --font-display: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* ---- Layout tokens ---- */
  --container: 1180px;
  --container-narrow: 760px;
  --gap: 24px;
  --radius: 8px;
}

/* ---- Reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- Layout helpers ---- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--paper-alt); }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--navy);
}
h1 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.35rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
p.lede {
  font-size: 1.15rem;
  color: var(--slate);
  max-width: 640px;
}
p { color: var(--navy); }
.text-support { color: var(--slate); }

/* ---- Eyebrow / pillar tag system ----
   A small mono-font label used above headings across the site. The color
   identifies which part of the business a section refers to: Brands,
   Marketplaces & Channels, or Technology. This is a real structural cue,
   not decoration — it helps readers place each section within the company. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--slate);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  display: inline-block;
}
.eyebrow-brands { color: var(--teal); }
.eyebrow-market { color: var(--blue); }
.eyebrow-tech { color: var(--violet); }

/* ---- Status tags (used on the Technology page) ---- */
.status-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--slate);
  background: var(--paper-alt);
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.brand span { color: var(--blue); }
.nav-links {
  display: flex;
  gap: 30px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
}
.nav-links a { position: relative; padding: 4px 0; color: var(--navy); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width 0.2s ease;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--blue); }

.nav-toggle {
  display: none;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  background: none;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 16px 24px; border-top: 1px solid var(--line); }
  .nav-toggle { display: block; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--navy);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--paper); box-shadow: var(--shadow-md); }

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
/* A faint data-grid texture, fading in from the right edge. Purely
   decorative — ties the hero to the site's data/analytics positioning
   without looking like a fake chart or dashboard. */
.hero::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 50%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(to left, black, transparent);
  mask-image: linear-gradient(to left, black, transparent);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

/* ---- Pillar cards (Brands / Marketplaces & Channels / Technology) ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { border-color: var(--navy); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card p { color: var(--slate); font-size: 0.98rem; margin-top: 10px; }
.card .card-link {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--blue);
}

/* ---- Brand cards (Our Businesses page) ----
   Both brand cards must look identical when nothing is being interacted
   with — no brand gets a permanent accent color. The category tag is
   neutral (inherits the default .eyebrow slate color) by default, and
   only picks up the brand accent color on hover/focus, applied equally
   to every card in this group. */
.brand-card .eyebrow { color: var(--slate); transition: color 0.2s ease; }
.brand-card:hover .eyebrow,
.brand-card:focus-within .eyebrow { color: var(--teal); }

/* ---- Operating model diagram (Home page signature element) ----
   A simple, honest visual: two operating layers (Brands, Marketplaces &
   Channels) sitting on a Technology foundation layer. Built with plain
   CSS — no image or JS required. */
.model-diagram { display: flex; flex-direction: column; gap: 10px; margin-top: 40px; }
.model-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.model-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  background: var(--paper);
}
.model-block h4 { font-size: 1rem; margin-bottom: 4px; }
.model-block p { font-size: 0.9rem; color: var(--slate); }
@media (max-width: 700px) {
  .model-row { grid-template-columns: 1fr; }
}

/* ---- Section headers ---- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }

/* ---- Notice / disclaimer box (used on Technology page) ---- */
.notice-box {
  border-left: 3px solid var(--violet);
  background: var(--paper-alt);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  color: var(--slate);
  margin: 28px 0 8px;
}

/* ---- Forms ---- */
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper-alt);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
  border-radius: var(--radius);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  background: var(--paper);
}
.form-field textarea { resize: vertical; min-height: 130px; }

/* ---- Contact info list ---- */
.info-list dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 0.95rem; }
.info-list dt { color: var(--slate); }
.info-list dd { color: var(--navy); font-weight: 500; }

/* ---- Legal / article content (Privacy Policy, Terms) ---- */
.legal-content h2 { margin-top: 40px; margin-bottom: 12px; font-size: 1.3rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: var(--slate); margin-bottom: 14px; }
.legal-content ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.legal-content li { color: var(--slate); margin-bottom: 6px; }
.legal-updated { font-family: var(--font-mono); font-size: 0.82rem; color: var(--slate); margin-bottom: 30px; display: block; }

/* ---- Footer ---- */
.site-footer {
  position: relative;
  background: var(--navy);
  color: rgba(255,255,255,0.82);
  padding: 56px 0 26px;
}
/* Thin accent bar echoing the three pillar colors used across the site
   (Brands / Marketplaces & Channels / Technology). */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--violet));
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid .brand { color: var(--paper); }
.footer-grid .brand span { color: #8fb4e8; }
.footer-grid p { color: rgba(255,255,255,0.6); font-size: 0.92rem; margin-top: 12px; max-width: 300px; }
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-grid a { color: rgba(255,255,255,0.82); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--paper); }
.footer-grid li { margin-bottom: 9px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.14);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Utility */
.mt-lg { margin-top: 56px; }
.text-center { text-align: center; margin-left: auto; margin-right: auto; }
