/* ==========================================================================
   Sevana Support Portal — brand.css
   Built standalone from the tokens in sevana-brand-handoff.md, not by
   reusing site.css (which carries homepage-specific weight/specificity).
   ========================================================================== */

:root {
  --ink: #13202e;
  --ink-muted: #5e6771;
  --paper: #fcfcfb;
  --panel: #f1f3f2;
  --line: #d7ddda;
  --accent: #f07c00;
  --accent-hover: #f4a645;
  --accent-ink: #1c160e;
  --navy: #13283b;
  --max: 1180px;
  --shadow: 0 18px 50px rgba(19, 32, 46, .12);
  --card-radius: 16px;  /* tactile/interactive cards — hero slides, SIDS */
  --radius: 0;          /* flat content cards — articles, tickets, forms */
  --header-surface: color-mix(in srgb, var(--paper) 94%, transparent);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--max);
  width: calc(100% - 48px);
  margin: 0 auto;
}
.container--narrow { max-width: 480px; }

h1, h2, h3, h4 {
  letter-spacing: -.035em;
  line-height: 1.08;
  margin: 0 0 .4em;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.6rem); max-width: 14ch; }
h2 { font-size: clamp(1.9rem, 3vw, 3rem); }
h3 { font-size: 1.35rem; }

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .15em;
  margin-bottom: .5em;
  display: block;
}

section { padding: clamp(40px, 7vw, 80px) 0; }
.section--panel { background: var(--panel); }

/* -------------------------------------------------------------------- */
/* Buttons                                                               */
/* -------------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 47px; padding: .65rem 1.4rem;
  font-weight: 800; font-size: .88rem;
  font-family: inherit;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s cubic-bezier(.23,1,.32,1), background .16s ease, color .16s ease;
}
.button:active { transform: scale(.97); }
.button:disabled { opacity: .5; cursor: not-allowed; }

.button--accent { background: var(--accent); color: var(--accent-ink); }
.button--accent:hover:not(:disabled) { background: var(--accent-hover); }

.button--quiet { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.button--quiet:hover:not(:disabled) { background: var(--ink); color: var(--paper); }

/* -------------------------------------------------------------------- */
/* Header                                                                */
/* -------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-surface);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
/* Used by admin-header.php (staff pages) — a separate, single-row
   header that was never affected by the customer-facing "Back to
   sevana.com" issue, since its logo already links to /support/admin/
   and it has no external link at all. Left exactly as it was. */
.site-header__inner {
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.site-header__inner .site-nav { margin-left: auto; }

/* Customer-facing header (header.php) — split into two independent
   rows so the logo and the sevana.com icon always stay pinned to a
   fixed top strip, regardless of how tall the nav grows from wrapping
   on narrower screens. */
.site-header__top {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-header__navrow {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__image { height: 58px; width: auto; max-width: min(320px, 48vw); object-fit: contain; }
.brand__portal-tag {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
}
.site-header__home-link {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: var(--accent); flex-shrink: 0; text-decoration: none;
  transition: background .15s ease;
}
.site-header__home-link:hover { background: var(--panel); }
.site-header__home-link svg { width: 22px; height: 22px; }
.site-nav {
  display: flex; align-items: center; justify-content: flex-end; gap: clamp(15px, 2vw, 29px);
  font-size: .91rem; color: var(--ink-muted);
  flex-wrap: wrap;
}
.site-nav a { text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--accent); }
.site-nav a.is-active { color: var(--accent); }

.site-header__menu-toggle {
  display: none; /* shown only under the mobile breakpoint below */
  align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: none; border: none; color: var(--ink); cursor: pointer; padding: 0;
  transition: background .15s ease;
}
.site-header__menu-toggle:hover { background: var(--panel); }
.site-header__menu-toggle svg { width: 24px; height: 24px; }

/* Mobile nav collapse — below this width the full nav (up to 8 links
   when signed in) no longer fits comfortably as a visible row, so it's
   hidden behind the hamburger toggle instead and shown as a stacked
   list on demand (toggled via .is-open, added/removed by portal.js). */
@media (max-width: 768px) {
  .site-header__menu-toggle { display: flex; }
  .site-header__navrow { display: none; padding-bottom: 10px; }
  .site-header__navrow.is-open { display: flex; }
  .site-nav {
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    width: 100%; gap: 4px;
  }
  .site-nav a { display: block; width: 100%; padding: .55rem 0; }
}

/* -------------------------------------------------------------------- */
/* Hero — rotating stat/feature cards, same rhythm as sevana.com's hero  */
/* -------------------------------------------------------------------- */
.hero {
  background: var(--navy);
  color: var(--paper);
  padding: clamp(40px, 6vw, 70px) 0;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
@media (min-width: 860px) {
  .hero__inner { grid-template-columns: 1.1fr 1fr; }
}
.hero__intro h1 { color: var(--paper); }
.hero__intro p { color: #b9c3cc; max-width: 46ch; }

.hero-slider { display: flex; flex-direction: column; gap: 14px; }
/* Grid-stack technique: every slide occupies the same single grid cell
   (row 1 / column 1), so they visually overlap for the crossfade exactly
   like the old position:absolute approach did — but because a grid cell
   sizes itself to its tallest normal-flow child, the stage's height now
   auto-sizes to whichever slide is currently longest, instead of being
   locked to a fixed box only the shortest slide fit in. That's what was
   causing text and the CTA button to spill outside the rounded card on
   mobile: the intro column is much narrower there, the same copy wraps
   onto more lines, and a fixed 220px box no longer had room for it. */
.hero-slider__stage {
  display: grid;
}
.hero-slide {
  grid-row: 1;
  grid-column: 1;
  min-height: 220px;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-slide.is-active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.hero-slide__eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; font-size: .78rem; letter-spacing: .12em; margin-bottom: .5em; }
.hero-slide__title { font-size: 1.4rem; margin-bottom: .4em; letter-spacing: -.02em; }
.hero-slide__body { color: var(--ink-muted); font-size: .92rem; margin-bottom: 1em; }
.hero-slide__cta { margin-top: auto; }

.hero-dots { display: flex; gap: 6px; }
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.3);
  cursor: pointer; padding: 0;
}
.hero-dots button.is-active { background: var(--accent); }

/* -------------------------------------------------------------------- */
/* Flat content cards — feature links, KB articles, tickets              */
/* -------------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.flat-card {
  border-top: 2px solid var(--ink);
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .16s ease;
}
.flat-card:hover { transform: translateY(-3px); }
.flat-card__body { padding: 22px; }
.flat-card__eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; margin-bottom: .5em; display: block; }
.flat-card__title { font-size: 1.2rem; margin-bottom: .4em; }
.flat-card__desc { color: var(--ink-muted); font-size: .92rem; }

/* -------------------------------------------------------------------- */
/* Forms                                                                 */
/* -------------------------------------------------------------------- */
.form-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 36px);
  max-width: 640px;
}
.form-group { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .85rem; font-weight: 700; color: var(--ink); }
.form-hint { font-size: .78rem; color: var(--ink-muted); }
.input-field {
  width: 100%; padding: .65rem .85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: .92rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, background .2s;
}
.input-field:focus { border-color: var(--accent); background: var(--paper); }
textarea.input-field { resize: vertical; min-height: 120px; }
.char-count { font-size: .72rem; color: var(--ink-muted); text-align: right; }

.alert { font-size: .85rem; padding: .65rem .85rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert--error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert--success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* honeypot field — visually hidden but present in the DOM for real users
   (screen readers skip it via aria-hidden, not display:none, so it still
   looks convincing to bots that check computed visibility) */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.ticket-ref-box {
  font-size: 1.6rem; font-weight: 800; letter-spacing: .02em;
  background: var(--panel); border: 1px dashed var(--ink-muted);
  padding: .7em 1em; display: inline-block; margin: .5em 0 1em;
}

/* -------------------------------------------------------------------- */
/* Footer                                                                */
/* -------------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: #b9c3cc;
  padding: 50px 0 30px;
  margin-top: 60px;
}
.site-footer__inner { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.site-footer__logo { height: 40px; width: auto; }
.site-footer__tagline { font-size: .85rem; color: #8b96a1; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 18px; font-size: .85rem; }
.site-footer__links a { text-decoration: none; color: #b9c3cc; }
.site-footer__links a:hover { color: var(--accent); }
.site-footer__social { display: flex; gap: 12px; margin-top: 6px; }
.site-footer__social img { height: 22px; width: 22px; opacity: .8; }
.site-footer__social a:hover img { opacity: 1; }
.site-footer__bottom { font-size: .76rem; color: #6b7580; margin-top: 20px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; width: 100%; }

/* -------------------------------------------------------------------- */
/* Small utility classes — used instead of inline style="" attributes,  */
/* since the site's CSP has no unsafe-inline for style-src.             */
/* -------------------------------------------------------------------- */
.text-muted { color: var(--ink-muted); }
.text-error-inline { color: #b91c1c; }
.hidden { display: none !important; }
.lede { color: var(--ink-muted); max-width: 60ch; }
.mt-sm { margin-top: .8rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mb-md { margin-bottom: 1rem; }
.inline-form { display: inline; }
.article-hero-image { border-radius: 0; margin-bottom: 1.2em; }
.row-actions { margin-top: .8rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.row-actions--between { justify-content: space-between; align-items: center; margin-top: 0; }
.status-pill { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: .25em .7em; border-radius: 999px; }
.status-pill--pending { background: #fff7ed; color: #c2410c; }
.status-pill--approved { background: #f0fdf4; color: #15803d; }
.status-pill--rejected { background: #fef2f2; color: #b91c1c; }
.category-heading { margin: 2rem 0 1rem; font-size: 1.1rem; }
.category-heading:first-child { margin-top: 0; }
.qty-input { max-width: 90px; }
.textarea-large { min-height: 200px; }
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.cart-table th, .cart-table td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.cart-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-muted); }
.cart-table .num { text-align: right; }
.cart-total-row td { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: none; }
.address-option { display: block; border: 1px solid var(--line); padding: .9rem 1rem; margin-bottom: .6rem; cursor: pointer; }
.address-option input { margin-right: .5rem; }