/* ============================================================
   Webwingz AU — Shared Stylesheet
   shared.css — loaded by all 9 pages
   ============================================================ */

/* ============================================================
   Section 1: Google Fonts import
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;1,9..144,300;1,9..144,400&family=Geist:wght@300;400;500;600&family=Geist+Mono:wght@400;500&display=swap');

/* ============================================================
   Section 2: CSS Custom Properties
   ============================================================ */
:root {
  /* Palette — Theme B: Slate & Sand */
  --bg: #F2F0EC;
  --bg-elev: #FFFFFF;
  --bg-soft: #E5E2D9;
  --bg-deep: #1C2B3A;
  --ink: #1C2B3A;
  --ink-2: #5C5F6B;
  --ink-3: #898880;
  --line: #D8D4CB;
  --accent: #E6A800;       /* text/italic uses */
  --accent-btn: #FFD335;   /* button backgrounds */
  --accent-2: #7B9EA8;
  --accent-soft: #1C2B3A; /* eyebrow pill bg */
  --gold: #7B9EA8;

  /* Layout */
  --maxw: 1200px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(28,43,58,.04), 0 2px 6px rgba(28,43,58,.04);
  --shadow-md: 0 4px 12px rgba(28,43,58,.06), 0 12px 32px rgba(28,43,58,.08);
  --shadow-lg: 0 12px 24px rgba(28,43,58,.08), 0 32px 64px rgba(28,43,58,.12);

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', monospace;

  /* Motion */
  --ease: cubic-bezier(.2,.8,.2,1);
  --dur: 0.25s;
}

[data-theme="dark"] {
  --bg: #131F2A;
  --bg-elev: #1d2a38;
  --bg-soft: #182030;
  --bg-deep: #0d1520;
  --ink: #F2F0EC;
  --ink-2: #c0b9ae;
  --ink-3: #8a8690;
  --line: #2a3a4a;
  --accent: #FFD335;
  --accent-btn: #FFD335;
  --accent-soft: #1a2a3a;
}

/* ============================================================
   Section 3: Global Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: var(--font-body); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-btn); color: var(--bg-deep); }

/* ============================================================
   Section 4: Navigation
   ============================================================ */
/* Nav is sticky top, backdrop blur, border-bottom */
.site-nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(20px) saturate(1.4); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 18px; font-weight: 400; color: var(--ink); text-decoration: none; }
.nav-logo svg { width: 32px; height: 32px; color: var(--ink); flex-shrink: 0; }
.logo { display: flex; align-items: center; text-decoration: none; color: var(--ink); }
.logo .logo-svg { height: 26px; width: auto; display: block; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: color var(--dur) var(--ease); }
.nav-links a:hover, .nav-links a.active, .nav-links a.nav-active { color: var(--ink); }
.nav-cta { background: var(--ink); color: var(--bg) !important; padding: 10px 20px; border-radius: var(--radius-pill); font-size: 13px !important; font-weight: 500 !important; transition: transform var(--dur) var(--ease), opacity var(--dur) !important; }
.nav-cta:hover { transform: translateY(-1px); opacity: 0.9; }
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 6px 10px; cursor: pointer; color: var(--ink-2); display: flex; align-items: center; transition: border-color var(--dur); }
.theme-toggle:hover { border-color: var(--ink); }
@media (max-width: 680px) { .nav-links { gap: 16px; } .nav-links a:not(.nav-cta) { display: none; } }

/* ============================================================
   Section 5: Buttons
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 16px 26px; border-radius: var(--radius-pill); font-family: var(--font-body); font-size: 15px; font-weight: 500; text-decoration: none; border: none; cursor: pointer; transition: transform var(--dur) var(--ease), box-shadow var(--dur); white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent-btn); color: var(--bg-deep); }
.btn-primary:hover { box-shadow: 0 4px 16px rgba(255,211,53,0.35); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-elev); }
.cta-card .btn-ghost { color: #F2F0EC; border-color: rgba(255,255,255,0.2); }
.cta-card .btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.35); }
.btn-dark { background: transparent; color: var(--bg); border: 1px solid rgba(255,255,255,0.2); }
.btn-dark:hover { background: rgba(255,255,255,0.06); }
.btn-lg { padding: 18px 32px; font-size: 16px; }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-visit { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
  padding: 11px 20px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  background: var(--bg-elev); transition: border-color .2s, color .2s, transform .2s; }
.btn-visit:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.btn-visit svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ============================================================
   Section 6: Eyebrow / Pills
   ============================================================ */
.eyebrow-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent-btn); padding: 6px 14px; border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }
.eyebrow-label { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }
.eyebrow-label.accent { color: var(--accent); }
.pulse-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5ec98a; box-shadow: 0 0 0 4px rgba(94,201,138,0.2); flex-shrink: 0; }
.topic-pill { display: inline-flex; align-items: center; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 5px 12px; font-family: var(--font-mono); font-size: 11px; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.08em; }

/* ============================================================
   Section 7: Section Layout Utilities
   ============================================================ */
.section { padding: 88px 24px; }
.section-sm { padding: 56px 24px; }
.section-lg { padding: 112px 24px; }
.section-soft { background: var(--bg-soft); }
.section-deep { background: var(--bg-deep); }
.container { max-width: var(--maxw); margin: 0 auto; }
.section-head { margin-bottom: 56px; }
.section-head .eyebrow-label { margin-bottom: 14px; }
.section-head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 4.2vw, 52px); color: var(--ink); line-height: 1.1; margin: 0; }
.section-head h2 em { font-style: italic; font-weight: 300; color: var(--accent); }
.section-head p { font-size: 17px; color: var(--ink-2); line-height: 1.65; margin-top: 16px; max-width: 560px; }
/* On dark sections, invert section-head text */
.section-deep .section-head h2 { color: var(--bg); }
.section-deep .section-head p { color: var(--ink-3); }
.section-deep .eyebrow-label { color: var(--accent-2); }

/* ============================================================
   Section 8: Cards
   ============================================================ */
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.card-lg { padding: 48px; border-radius: var(--radius-lg); }
.card:hover, .card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-deep { background: color-mix(in srgb, var(--bg-deep) 85%, var(--bg-elev)); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius); padding: 32px; }
.card-soft { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }

/* ============================================================
   Section 9: Dividers and borders
   ============================================================ */
.rule { border: none; border-top: 1px solid var(--line); margin: 0; }
.rule-deep { border-top-color: rgba(255,255,255,0.08); }

/* ============================================================
   Section 10: Typography helpers
   ============================================================ */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; color: var(--ink); }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 300; color: var(--accent); }
p { font-family: var(--font-body); color: var(--ink-2); line-height: 1.7; }
strong { font-weight: 600; color: var(--ink); }

/* ============================================================
   Section 11: Footer
   ============================================================ */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 56px 24px 32px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer-brand { font-family: var(--font-body); font-size: 14px; color: var(--ink-3); line-height: 1.65; margin-top: 14px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { font-size: 14px; color: var(--ink-2); transition: color var(--dur); }
.footer-col ul a:hover { color: var(--ink); }
.footer-bottom { max-width: var(--maxw); margin: 0 auto; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: 13px; color: var(--ink-3); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--ink-3); transition: color var(--dur); }
.footer-links a:hover { color: var(--ink); }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }

/* ============================================================
   Section 12: CTA dark card (used on every page)
   ============================================================ */
.cta-card { background: var(--bg-deep); border-radius: var(--radius-lg); padding: 80px 64px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; position: relative; overflow: hidden; }
.cta-card::before { content: ''; position: absolute; top: -50%; right: -10%; width: 60%; height: 200%; background: radial-gradient(ellipse, rgba(255,211,53,0.07) 0%, transparent 60%); pointer-events: none; }
.cta-card h3 { font-family: var(--font-display); font-weight: 300; font-size: clamp(24px, 3vw, 48px); color: #F2F0EC; line-height: 1.15; position: relative; }
.cta-card h3 em { font-style: italic; font-weight: 300; color: var(--accent-btn); }
.cta-card p { font-size: 16px; color: #7B9EA8; line-height: 1.7; margin-top: 16px; position: relative; }
[data-theme="dark"] .cta-card { background: #182030; border: 1px solid rgba(255,255,255,0.07); }
[data-theme="dark"] .cta-card h3 { color: #F2F0EC; }
[data-theme="dark"] .cta-card p { color: #7B9EA8; }
[data-theme="dark"] .btn-dark { color: #F2F0EC; border-color: rgba(255,255,255,0.18); }
[data-theme="dark"] .btn-dark:hover { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .btn-soft { color: #F2F0EC !important; border-color: rgba(255,255,255,0.18) !important; }
[data-theme="dark"] .btn-soft:hover { background: rgba(255,255,255,0.06) !important; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; position: relative; }
.cta-trust { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cta-trust span { font-size: 13px; color: var(--ink-3); }
@media (max-width: 720px) { .cta-card { grid-template-columns: 1fr; padding: 48px 28px; } }

/* ============================================================
   Section 13: Marquee animation
   ============================================================ */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-band { overflow: hidden; overflow-x: clip; padding: 24px 0; background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); white-space: nowrap; }
.marquee-track em { font-style: italic; color: var(--accent); margin-right: 6px; }

/* ============================================================
   Section 14: Stat strip (reused on most pages)
   ============================================================ */
.stats-strip { display: grid; }
.stat-cell { padding: 40px; border-right: 1px solid var(--line); }
.stat-cell:last-child { border-right: none; }
.stat-num { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4vw, 52px); color: var(--ink); line-height: 1; }
.stat-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-top: 8px; line-height: 1.4; }

/* ============================================================
   Section 15: Accordion / FAQ
   ============================================================ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; background: none; border: none; padding: 22px 0; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-family: var(--font-body); font-size: 16px; font-weight: 500; color: var(--ink); text-align: left; gap: 16px; }
.faq-icon { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; color: var(--ink-3); transition: transform var(--dur), border-color var(--dur); }
.faq-item.open .faq-icon { transform: rotate(45deg); border-color: var(--accent); color: var(--accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease), padding 0.3s; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a p { padding-bottom: 22px; font-size: 15px; color: var(--ink-2); line-height: 1.7; }

/* ============================================================
   Section 16: Theme toggle JS (inline script)
   ============================================================ */
/* Theme toggle JS is in shared-scripts.js or inline at page bottom */

/* ============================================================
   Section 17: Responsive utilities
   ============================================================ */
@media (max-width: 900px) { .section { padding: 64px 20px; } .section-lg { padding: 80px 20px; } }
@media (max-width: 600px) { .section { padding: 48px 16px; } .cta-card { padding: 40px 24px; } }

/* ============================================================
   Section 18: Back to work sticky tab (case study pages)
   ============================================================ */
#back-to-work {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  z-index: 200;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  background: var(--bg-deep);
  color: #F2F0EC;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 10px;
  border-radius: 0 8px 8px 0;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
#back-to-work:hover { background: var(--accent-btn); color: #1C2B3A; }
[data-theme="dark"] #back-to-work { background: var(--bg-elev); border: 1px solid var(--line); border-left: none; }
@media (max-width: 1100px) { #back-to-work { display: none; } }

/* ============================================================
   Section 19: Scrollable phone device frames
   ============================================================ */
.device-phone-inner {
  max-height: 640px;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.device-phone-inner::-webkit-scrollbar { display: none; }
