/* ============================================================
   CISCO Website — Global Styles & Design System
   Phase 1: Wireframe styling only (no logic)
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* CISCO Blue — 4-shade accent system */
  --blue-primary:      #2563EB;  /* Blue-600: CTAs, buttons, focus */
  --blue-secondary:    #3B82F6;  /* Blue-500: badges, labels, tags */
  --blue-link:         #1E40AF;  /* Blue-800: text links, emphasis */
  --blue-accent:       #0EA5E9;  /* Sky-500: borders, icon accents */
  --cisco-blue:        #2563EB;  /* Alias for existing references */
  --cisco-blue-dark:   #1E40AF;
  --cisco-blue-light:  #dbeafe;
  --cisco-blue-soft:   #eff6ff;

  /* Neutrals for text/hierarchy */
  --text-primary:      #1f2933;
  --text-secondary:    #52606d;
  --text-muted:        #7b8794;

  /* Surfaces */
  --surface:           #ffffff;
  --surface-alt:       #f7f9fc;
  --border:            #e4e9f0;

  /* Gradients (subtle, white-based) */
  --gradient-hero:     linear-gradient(180deg, #ffffff 0%, var(--cisco-blue-light) 100%);
  --gradient-soft:     linear-gradient(135deg, #ffffff 0%, var(--cisco-blue-soft) 100%);

  /* Interaction */
  --hover-scale:       1.02;
  --shadow-card:       0 6px 20px rgba(15, 76, 129, 0.08);
  --shadow-card-hover: 0 12px 32px rgba(15, 76, 129, 0.16);
  --shadow-modal:      0 24px 64px rgba(15, 76, 129, 0.24);

  /* Typography */
  --font-heading:      "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body:         "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-quote:        Georgia, "Times New Roman", serif;

  /* Layout */
  --container-max:     1200px;
  --radius:            12px;
  --radius-lg:         20px;
  --transition:        0.3s ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* Horizontal clamp — nothing may ever widen the page. Without this, any
   element wider than the viewport (transition slides, 100vw blocks)
   creates scrollable sideways overflow, and iOS lets you grab and drag
   the whole site out of bounds. `clip` (NOT `hidden`): hidden would turn
   html/body into a scroll container and break the sticky editor-header
   and the fixed menu/overlay layers. Vertical scrolling is untouched. */
html,
body {
  /* Fallback for iOS < 16 (no `clip` support): hidden still clamps the
     sideways pan, at the cost of the sticky header on those old devices.
     Modern browsers override it with `clip` below, which keeps sticky
     and fixed layers working. */
  overflow-x: hidden;
  overflow-x: clip;
  /* Kill horizontal overscroll chaining so a sideways drag can never
     rubber-band the document past its edge. X-axis only — vertical
     scrolling and pull-to-refresh are untouched. */
  overscroll-behavior-x: none;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: #f5f5f5;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 199px, rgba(0,0,0,0.15) 199px, rgba(0,0,0,0.15) 200px),
    repeating-linear-gradient(90deg, transparent, transparent 99px, rgba(0,0,0,0.15) 99px, rgba(0,0,0,0.15) 100px);
  background-size: 100px 200px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--cisco-blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--cisco-blue-dark);
}

ul {
  list-style: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title .subtitle {
  display: block;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.quote {
  font-family: var(--font-quote);
  font-style: italic;
  color: var(--text-secondary);
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section--alt {
  background: var(--surface-alt);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
              background var(--transition), color var(--transition);
}

.btn--primary {
  background: var(--blue-primary);
  color: #ffffff;
  border-color: var(--blue-primary);
}

.btn--primary:hover {
  background: #ffffff;
  color: var(--blue-primary);
  border-color: var(--blue-primary);
  transform: scale(var(--hover-scale));
  box-shadow: var(--shadow-card-hover);
}

.btn--outline {
  background: transparent;
  color: var(--cisco-blue);
  border-color: var(--cisco-blue);
}

.btn--outline:hover {
  background: var(--cisco-blue-light);
  transform: scale(var(--hover-scale));
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn--ghost:hover {
  color: var(--cisco-blue);
  background: var(--cisco-blue-light);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cisco-blue-dark);
  color: #e8f1fa;
  padding: 2.5rem 0;
  text-align: center;
}

.site-footer a {
  color: #cfe3f5;
}

.site-footer a:hover {
  color: #ffffff;
}

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.site-footer small {
  color: rgba(232, 241, 250, 0.7);
}

.site-footer .footer-logo {
  height: 44px;
  width: auto;
  margin: 0 auto 1rem;
  opacity: 0.95;
}

/* Social icon band — circular buttons injected into #footerSocial by
   js/main.js (buildFooterSocial) from window.CISCO_CONTACT. */
.site-footer .footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(232, 241, 250, 0.6);
  color: #ffffff;
  text-decoration: none;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}
.footer-social__link svg {
  width: 18px;
  height: 18px;
  display: block;
}
.footer-social__link:hover {
  background: #ffffff;
  color: var(--cisco-blue, #2563eb);
  border-color: #ffffff;
  transform: translateY(-2px);
}
/* Even on the blue footer these stay user-selectable so a visitor can
   long-press / copy the URL if they open the link target. */

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--cisco-blue);
}

.breadcrumb .sep {
  color: var(--text-muted);
}

/* ---------- Back link ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: var(--gradient-hero);
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.page-hero--brutalist {
  background: #ffffff;
  border-bottom: 3px solid #000;
  padding: 4rem 0 3.5rem;
}

.page-hero--brutalist h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.page-hero--brutalist p {
  color: #666;
  max-width: 520px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.6;
}

.page-hero h1 {
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

/* ============================================================
   TEXT SELECTION — site-wide off by default (app-like feel);
   re-enabled where copying is meaningful: form controls, links,
   contact/email, code and editable content. Selection that IS
   allowed keeps the branded blue highlight (controls.css).
   ============================================================ */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Allow selecting exactly where it matters. */
input,
textarea,
select,
option,
[contenteditable],
a,
button:not([aria-disabled]),
code,
pre,
.member-email,
.footer a,
.footer-social__link,
.share-url,
.address,
address {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* No accidental image dragging / long-press save on touch. */
img,
svg,
picture,
video {
  -webkit-user-drag: none;
  user-select: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.7rem; }
}

@media (max-width: 767px) {
  .section { padding: 3rem 0; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .container { padding: 0 1rem; }
}

/* ---------- Index Strip pager (shared pagination) ----------
   "Ledger Footer": a ruled record-strip like the page number band
   on a print ledger. A top rule runs the full width; the count is
   a boxed chip pinned to the rule; tiles are solid paper squares
   with hard ink borders; the current page is a pressed blue key.
   Borders are 2px everywhere (never 0.5px — sub-pixel widths render
   inconsistently across browsers). Works on any background via
   currentColor — hosts set their own ink color. */
.pager {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 1.75rem 0 0;
  color: #1f2933; /* default ink; dark sections override */
  border-top: 3px solid currentColor;
}

.pager__count {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  margin-top: 0.8rem;
  height: 2.4rem;
  border: 2px solid currentColor;
  background: transparent;
  white-space: nowrap;
}

.pager__pages {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.pager__page,
.pager__arrow,
.pager__gap {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.pager__page,
.pager__arrow {
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid currentColor;
  border-radius: 0;
  background: #fff;
  color: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
              background 0.12s ease, color 0.12s ease;
}

.pager__page:hover:not(.is-current):not(:disabled),
.pager__arrow:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 currentColor;
}

.pager__page:active:not(.is-current):not(:disabled),
.pager__arrow:active:not(:disabled) {
  transform: translate(0, 0);
  box-shadow: none;
}

/* The current page is a "pressed key": solid CISCO blue, shadow
   stays on (it is part of the resting state, not a hover state). */
.pager__page.is-current {
  background: var(--blue-primary, #2563eb);
  border-color: var(--cisco-blue-dark, #1e40af);
  color: #fff;
  box-shadow: 4px 4px 0 var(--cisco-blue-dark, #1e40af);
  transform: translate(-2px, -2px);
  cursor: default;
}

.pager__arrow:disabled,
.pager__page:disabled {
  opacity: 0.3;
  cursor: default;
  background: transparent;
}

.pager__gap {
  padding: 0 0.25rem;
  opacity: 0.55;
  display: inline-flex;
  align-items: center;
}

.pager.is-empty { display: none; }
