/* =========================================================
   QUILLS DIGITAL — Base styles (theme, layout, nav, hero, footer)
   ========================================================= */

/* ---------- CSS Variables (light + dark themes) ---------- */
:root {
  --bg-body: #F8FAFC;
  --bg-surface: #F1F5F9;
  --bg-card: #FFFFFF;
  --text-primary: #1E293B;
  --text-heading: #0F172A;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  --border-color: rgba(226, 232, 240, 0.75);
  --border-hover: rgba(13, 123, 114, 0.28);

  --ink-accent: #0D7B72;
  --ink-light: #1A9E94;
  --ink-dark: #095D56;
  --ink-glow: #6BC8BF;

  --gold-accent: #C2923B;
  --gold-dark: #9A7530;
  --gold-glow: #E8C97E;

  --radius-card: 12px;
  --radius-btn: 8px;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;

  --nav-height: 80px;
}

html.dark {
  --bg-body: #070711;
  --bg-surface: #0F0F1A;
  --bg-card: #13131F;
  --text-primary: #E2E8F0;
  --text-heading: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(13, 123, 114, 0.45);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.05;
}

::selection { background: rgba(13, 123, 114, 0.16); color: var(--text-heading); }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: #A8D5D0; border-radius: 5px; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 86rem;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container--lg { max-width: 70rem; }
.container--md { max-width: 62rem; }
.container--sm { max-width: 54rem; }

.navbar .container,
.footer .container {
  max-width: none;
}

.section { padding-top: 80px; padding-bottom: 80px; }

.section--alt {
  background-color: var(--bg-surface);
  transition: background-color 0.5s ease;
}

.eyebrow {
  display: inline-block;
  color: var(--ink-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.eyebrow--gold { color: var(--gold-accent); }

.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--text-heading);
  margin-bottom: 20px;
}

.section-lead {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.7;
}

.text-center { text-align: center; }

.gradient-text {
  background: linear-gradient(135deg, var(--ink-accent) 0%, var(--gold-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 32px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s ease;
  text-align: center;
  line-height: 1;
}

.btn--primary { background: var(--ink-accent); color: #fff; }
.btn--primary:hover {
  background: var(--ink-light);
  box-shadow: 0 0 30px rgba(13, 123, 114, 0.4);
  transform: translateY(-1px);
}

.btn--outline { border: 1px solid #CBD5E1; color: var(--text-primary); background: transparent; }
html.dark .btn--outline { border-color: rgba(255, 255, 255, 0.14); }
.btn--outline:hover { border-color: var(--border-hover); background: var(--bg-surface); color: var(--ink-accent); }

.btn--ghost { border: 1px solid rgba(194, 146, 59, 0.45); color: var(--text-primary); background: transparent; }
.btn--ghost:hover { border-color: var(--gold-accent); color: var(--gold-dark); }

.btn--sm { padding: 11px 20px; font-size: 13px; }
.btn--block { width: 100%; }
.btn i { font-size: 15px; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border-color);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

html.dark .navbar.scrolled { background: rgba(15, 15, 26, 0.85); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo img { height: 32px; width: auto; }
.logo span {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.05em;
  color: var(--text-heading);
  white-space: nowrap;
}

.nav-links { display: none; align-items: center; gap: 4px; }

.nav-links a:not(.nav-cta) {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.nav-links a:not(.nav-cta):hover { color: var(--text-primary); }
.nav-links a.active { color: var(--ink-accent); }

.nav-cta {
  margin-left: 16px;
  padding: 10px 20px;
  background: var(--ink-accent);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-btn);
  white-space: nowrap;
  transition: background-color 0.3s ease;
}

.nav-cta:hover { background: var(--ink-light); }

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  margin-left: 8px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.theme-toggle:hover { color: var(--text-primary); border-color: var(--border-hover); }

.nav-right { display: flex; align-items: center; gap: 6px; }

.hamburger { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--text-heading); }

.hamburger .bars { width: 24px; height: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.hamburger .bars span { display: block; height: 2px; width: 100%; background: currentColor; transition: transform 0.3s ease, opacity 0.3s ease; }

.hamburger.open .bars span:nth-child(1) { transform: rotate(45deg) translateY(9px); }
.hamburger.open .bars span:nth-child(2) { opacity: 0; }
.hamburger.open .bars span:nth-child(3) { transform: rotate(-45deg) translateY(-9px); }

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu.open { max-height: 520px; opacity: 1; }

.mobile-menu-inner { padding: 12px 24px 24px; display: flex; flex-direction: column; gap: 2px; }
.mobile-menu a { padding: 13px 0; font-size: 15px; font-weight: 500; color: var(--text-muted); border-bottom: 1px solid var(--border-color); }
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu a.active { color: var(--ink-accent); }
.mobile-menu .nav-cta { margin-top: 14px; text-align: center; justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: calc(var(--nav-height) + 20px);
  padding-bottom: 60px;
  min-height: 100vh;
}

.hero--short { min-height: 58vh; }
.hero--med { min-height: 60vh; }

.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.4), rgba(0,0,0,0.65));
}

.hero-overlay--tint {
  background: linear-gradient(to right, rgba(13,123,114,0.12), transparent 40%, rgba(194,146,59,0.12));
}

.hero-overlay--fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 130px;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

.hero-content { position: relative; z-index: 10; width: 100%; }

.hero-mesh {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(13,123,114,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(194,146,59,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(13,123,114,0.04) 0%, transparent 60%),
    var(--bg-body);
}

.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  margin-bottom: 30px;
}

.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-accent); animation: pulse 2s ease-in-out infinite; }
.hero-badge span { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

.hero-badge--dark { background: rgba(13, 123, 114, 0.12); border-color: rgba(13, 123, 114, 0.3); }
.hero-badge--dark span { color: rgba(232, 201, 126, 0.95); }
.hero-badge--gold { background: rgba(194, 146, 59, 0.12); border-color: rgba(194, 146, 59, 0.3); }
.hero-badge--gold span { color: rgba(232, 201, 126, 0.95); }

.hero h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--text-heading);
  line-height: 0.98;
  margin-bottom: 22px;
}

.hero--dark h1 { color: #fff; }

.hero p.lead {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 42rem;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero--dark p.lead { color: rgba(255,255,255,0.6); }

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

.hero:has(> .scroll-indicator) { padding-bottom: 110px; }

.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator .mouse {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(100,116,139,0.4);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-indicator .mouse .wheel { width: 4px; height: 8px; border-radius: 999px; background: rgba(100,116,139,0.7); animation: pulse 2s ease-in-out infinite; }
.hero--dark .scroll-indicator .mouse { border-color: rgba(255,255,255,0.35); }
.hero--dark .scroll-indicator .mouse .wheel { background: rgba(255,255,255,0.65); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding-top: 70px;
  padding-bottom: 36px;
  transition: background-color 0.5s ease;
}

.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 20px 0 24px;
  max-width: 28rem;
}

.footer-col h4 { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--text-heading); margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col ul a { font-size: 14px; color: var(--text-muted); transition: color 0.3s ease; }
.footer-col ul a:hover { color: var(--ink-accent); }

.footer-bottom {
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-bottom p { font-size: 12px; color: var(--text-dim); }
.footer-bottom .links { display: flex; gap: 22px; }
.footer-bottom .links a { font-size: 12px; color: var(--text-dim); transition: color 0.3s ease; }
.footer-bottom .links a:hover { color: var(--text-muted); }

.social-row { display: flex; flex-wrap: wrap; gap: 9px; }
.social-row a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.3s ease;
}
.social-row a:hover { border-color: var(--border-hover); color: var(--ink-accent); }

/* ---------- Keyframe animations ---------- */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -10px); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typewriter-cursor {
  display: inline-block;
  width: 0;
  overflow: visible;
  white-space: nowrap;
  color: var(--gold-accent);
  animation: blink 0.9s step-end infinite;
  font-weight: 400;
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  padding: 40px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee-set {
  display: flex;
  align-items: center;
  gap: 56px;
  padding-right: 56px;
}

.marquee-set span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-dim);
  opacity: 0.55;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.marquee-set span:hover { opacity: 1; color: var(--text-muted); }

.marquee--logos {
  margin-top: 56px;
  border-top: none;
  border-bottom: none;
  padding: 36px 0 8px;
}

.marquee--logos .marquee-set {
  gap: 64px;
  padding-right: 64px;
  /* Keeps a single/few logos from sitting side-by-side as a fake duplicate. */
  min-width: 100vw;
  box-sizing: border-box;
  justify-content: space-evenly;
}

.marquee--logos .marquee-set img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  opacity: 0.55;
  filter: grayscale(1);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.marquee--logos .marquee-set img:hover {
  opacity: 1;
  filter: grayscale(0);
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}