/* ============================================================
   PINOTAGE ADVISORY — Global Stylesheet
   Structure: variables → reset → typography → layout →
              components → nav → footer → animations → utils
   ============================================================ */

/* ── CSS VARIABLES ── */
:root {
  /* Colours */
  --ink:        #080c12;
  --deep:       #0f1520;
  --navy:       #141e30;
  --slate:      #1a2540;
  --gold:       #c9993c;
  --gold-lt:    #e8c97a;
  --gold-dim:   rgba(201, 153, 60, 0.15);
  --gold-border:rgba(201, 153, 60, 0.18);
  --sf-blue:    #00a1e0;
  --sf-dark:    #032d60;
  --white:      #f7f4ef;
  --muted:      rgba(247, 244, 239, 0.55);
  --border:     rgba(201, 153, 60, 0.18);
  --border-sub: rgba(247, 244, 239, 0.08);

  /* Typography */
  --font-display: 'Playfair Display', serif;
  --font-body:    'Outfit', sans-serif;

  /* Spacing */
  --section-pad:  6rem 6vw;
  --nav-height:   68px;

  /* Transitions */
  --transition:   all 0.25s ease;
  --transition-md:all 0.4s ease;
}

/* ── RESET ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea {
  font-family: var(--font-body);
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
}
h1 { font-size: clamp(2.8rem, 5vw, 5.2rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.1rem; }

h1 i, h2 i, h3 i { font-style: italic; color: var(--gold); }

p {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 300;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 300;
  max-width: 54ch;
}

/* ── LAYOUT ── */
section { padding: var(--section-pad); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 6vw; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

/* ── COMPONENTS ── */

/* Tag / Label */
.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1.8rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  line-height: 1;
}
.btn-gold {
  background: var(--gold);
  color: var(--ink);
}
.btn-gold:hover {
  background: var(--gold-lt);
  transform: translateY(-2px);
}
.btn-outline {
  border: 1px solid var(--border);
  color: var(--white);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-sf {
  background: var(--sf-blue);
  color: #fff;
}
.btn-sf:hover {
  background: #0088c2;
  transform: translateY(-2px);
}

/* Cards */
.card {
  background: rgba(20, 30, 48, 0.5);
  border: 1px solid var(--border);
  padding: 2rem;
  position: relative;
  transition: border-color 0.3s;
}
.card:hover { border-color: rgba(201, 153, 60, 0.4); }
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }

/* Feature check list */
.feature-list { display: flex; flex-direction: column; gap: 0.7rem; }
.feature-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.feature-check {
  width: 18px; height: 18px;
  background: var(--gold-dim);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 0.65rem;
  color: var(--gold);
}
.feature-text { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.feature-text strong { color: var(--white); font-weight: 500; }

/* Stat cell */
.stat-cell {
  padding: 1.5rem 2rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--white);
}
.stat-num sup { font-size: 1.2rem; color: var(--gold); vertical-align: super; }
.stat-lbl { font-size: 0.72rem; color: var(--muted); margin-top: 0.3rem; }

/* Tags / Pills */
.pill {
  border: 1px solid var(--border);
  padding: 0.28rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(247, 244, 239, 0.6);
  text-transform: uppercase;
}
.pill-gold {
  background: var(--gold-dim);
  border-color: var(--border);
  color: var(--gold);
}

/* Method tags */
.mtag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  color: var(--muted);
}

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.tl { display: flex; gap: 1.2rem; padding-bottom: 1.5rem; position: relative; }
.tl:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0.7rem; top: 1.4rem; bottom: 0;
  width: 1px;
  background: var(--border);
}
.tl-dot {
  flex-shrink: 0;
  width: 1.4rem; height: 1.4rem;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: 0.1rem;
}
.tl-dot::after {
  content: '';
  width: 5px; height: 5px;
  background: var(--gold);
  border-radius: 50%;
}
.tl-date {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.2rem;
}
.tl-text { font-size: 0.85rem; color: var(--muted); line-height: 1.65; }

/* Dividers */
.divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* Badges */
.badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
}
.badge-sf   { background: var(--sf-blue); color: #fff; }
.badge-aws  { background: #f90; color: #111; }
.badge-gcp  { background: #4285f4; color: #fff; }
.badge-ms   { background: #00a4ef; color: #fff; }
.badge-gen  { background: var(--border); color: var(--gold); }

/* Page header (inner pages) */
.page-header {
  padding: 8rem 6vw 4rem;
  background: var(--deep);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 50%, rgba(0,161,224,0.07) 0%, transparent 60%);
}
.page-header-inner { position: relative; z-index: 2; max-width: 700px; }
.page-header h1 { margin-bottom: 1rem; }
.page-header .lead { margin-bottom: 1.5rem; }
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--gold); text-decoration: none; }
.breadcrumb span { color: var(--border); }

/* ── NAVIGATION ── */
nav#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  padding: 0 6vw;
  background: rgba(8, 12, 18, 0.93);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.3s;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}
/* Real logo image in nav */
.nav-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  opacity: 0.92;
  transition: opacity 0.2s;
}
.nav-logo:hover .nav-logo-img { opacity: 1; }

/* PA hexagon mark + text — matches brand identity */
.nav-logo-mark {
  width: 34px; height: 34px;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem; font-weight: 700;
  color: var(--ink);
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  flex-shrink: 0;
  letter-spacing: 0;
}
.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  line-height: 1.2;
}
.nav-logo-text span { color: var(--gold); }

.nav-menu {
  display: flex; align-items: center;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.nav-menu > li { position: relative; }
.nav-menu a {
  display: block;
  padding: 0 0.7rem;
  height: var(--nav-height);
  line-height: var(--nav-height);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(247, 244, 239, 0.65);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-menu a:hover,
.nav-menu a.active { color: var(--gold); }

/* Dropdown */
.has-drop:hover .nav-drop { display: block; }
.nav-drop {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  background: var(--navy);
  border: 1px solid var(--border);
  min-width: 220px;
  z-index: 200;
}
.nav-drop a {
  height: auto;
  line-height: 1.4;
  padding: 0.7rem 1.2rem;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(201, 153, 60, 0.08);
}
.nav-drop a:last-child { border-bottom: none; }

.nav-cta {
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 1.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--gold-lt); }

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  transition: var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--navy);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 6vw 2rem;
  z-index: 999;
  flex-direction: column;
  gap: 0;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border-sub);
  letter-spacing: 0.04em;
}
.nav-mobile a:hover { color: var(--gold); }

/* ── FOOTER ── */
footer#main-footer {
  background: var(--deep);
  border-top: 1px solid var(--border);
}
.footer-top {
  padding: 3.5rem 6vw;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.75;
  margin: 1rem 0 1.25rem;
  max-width: 28ch;
}
.footer-sf {
  display: inline-flex;
  align-items: center; gap: 0.5rem;
}
.footer-sf-badge {
  background: var(--sf-blue);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.22rem 0.7rem;
  text-transform: uppercase;
}
.footer-sf-text { font-size: 0.72rem; color: var(--muted); }
.footer-col-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold-lt); }
.footer-bottom {
  padding: 1.25rem 6vw;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.footer-copy { font-size: 0.75rem; color: rgba(247, 244, 239, 0.3); }
.footer-reg  { font-size: 0.72rem; color: rgba(247, 244, 239, 0.25); }

/* ── ANIMATED SALESFORCE CHARACTERS ── */
.sf-char {
  pointer-events: none;
  line-height: 0;
  display: block;
}
.sf-char img {
  display: block;
  width: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.55));
}

/* Hero — floats top-right above stat card */
.sf-char--hero {
  position: absolute;
  right: -10px;
  top: -160px;
  z-index: 3;
}
.sf-char--hero img { height: 220px; }

/* Section header — sits inline at end of heading row */
.sf-char--section img { height: 120px; }

/* Why Us — inline beside heading */
.sf-char--why img { height: 105px; }

/* CTA banner — absolute inside banner */
.sf-char--cta {
  position: absolute;
  right: 260px;
  bottom: -8px;
  z-index: 1;
}
.sf-char--cta img { height: 160px; }

/* Page header — absolute bottom-right of header band */
.sf-char--page-header {
  position: absolute;
  right: 6vw;
  bottom: -20px;
  z-index: 3;
}
.sf-char--page-header img { height: 180px; }

/* Responsive: shrink on smaller screens */
@media (max-width: 1024px) {
  .sf-char--hero img    { height: 170px; }
  .sf-char--cta         { right: 200px; }
  .sf-char--cta img     { height: 130px; }
}
@media (max-width: 800px) {
  .sf-char--hero,
  .sf-char--cta,
  .sf-char--page-header { display: none; }
  .sf-char--section img,
  .sf-char--why img     { height: 80px; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Scroll-reveal helper */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.on {
  opacity: 1;
  transform: none;
}

/* Stagger helpers */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── UTILITY ── */
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--muted); }
.text-white  { color: var(--white); }
.bg-deep     { background: var(--deep); }
.bg-navy     { background: var(--navy); }
.bg-slate    { background: var(--slate); }
.bg-ink      { background: var(--ink); }
.border-top  { border-top: 1px solid var(--border); }
.border-bottom { border-bottom: 1px solid var(--border); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex       { display: flex; }
.flex-wrap  { flex-wrap: wrap; }
.gap-sm     { gap: 0.5rem; }
.gap-md     { gap: 1rem; }
.gap-lg     { gap: 2rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  section { padding: 4rem 5vw; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .nav-menu, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}
