/* ============================================================
   DayStar Integrations — Shared Design System
   Black + Liquid Glass + Instrument Serif + Animated Gradients
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --ds-bg: #000000;
  --ds-ink: #F8F7F4;
  --ds-ink-dim: rgba(248, 247, 244, 0.70);
  --ds-ink-faint: rgba(248, 247, 244, 0.45);
  --ds-gold: #F5A623;
  --ds-gold-soft: rgba(245, 166, 35, 0.85);
  --ds-line: rgba(255, 255, 255, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--ds-ink);
  background: var(--ds-bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

/* ---------- Serif display ---------- */
.serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
.serif-italic { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; }

h1, h2, h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(3rem, 7vw, 6.5rem); }
h2 { font-size: clamp(2.25rem, 5vw, 4.25rem); }
h3 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }

p { margin: 0 0 1em; color: var(--ds-ink-dim); }

a { color: var(--ds-ink); text-decoration: none; }

/* ---------- Animated Gradient Background ---------- */
.gradient-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(245, 166, 35, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 30%, rgba(110, 70, 200, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 70% at 50% 90%, rgba(30, 120, 200, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 85%, rgba(200, 50, 90, 0.14), transparent 60%),
    #000;
  filter: saturate(1.1);
  animation: drift 28s ease-in-out infinite alternate;
}

.gradient-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(245, 166, 35, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(60, 180, 220, 0.14), transparent 60%);
  animation: drift 34s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -1%, 0) scale(1.05); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.08); }
}

/* Noise overlay for texture */
.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  mix-blend-mode: overlay;
}

/* ---------- Liquid Glass Card ---------- */
.liquid-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: none;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    0 20px 60px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}

.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.15) 22%,
    rgba(255, 255, 255, 0.00) 45%,
    rgba(255, 255, 255, 0.00) 55%,
    rgba(255, 255, 255, 0.15) 78%,
    rgba(255, 255, 255, 0.55) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.liquid-glass-tight { border-radius: 14px; }
.liquid-glass-tight::before { padding: 1px; }

/* ---------- Navigation ---------- */
.ds-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid var(--ds-line);
}

.ds-nav-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ds-ink);
}
.ds-nav-logo em { font-style: italic; color: var(--ds-gold); }

.ds-nav-links { display: flex; gap: 28px; align-items: center; }
.ds-nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ds-ink-dim);
  transition: color 0.2s ease;
}
.ds-nav-links a:hover { color: var(--ds-ink); }
.ds-nav-links a.active { color: var(--ds-ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ds-ink);
  color: #000;
}
.btn-primary:hover {
  background: var(--ds-gold);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(245, 166, 35, 0.25);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ds-ink);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-gold {
  background: var(--ds-gold);
  color: #000;
  font-weight: 600;
}
.btn-gold:hover {
  background: #ffb840;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(245, 166, 35, 0.35);
}

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
}

.section { padding: 120px 0; }
.section-sm { padding: 72px 0; }

/* ---------- Hero ---------- */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 80px 32px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ds-gold);
  margin-bottom: 24px;
  font-weight: 500;
}

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card-pad { padding: 32px; }
.card-pad-lg { padding: 48px; }

/* ---------- Scroll Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.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; }

.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Footer ---------- */
.ds-footer {
  padding: 60px 32px 40px;
  border-top: 1px solid var(--ds-line);
  margin-top: 100px;
  color: var(--ds-ink-faint);
  font-size: 0.88rem;
}
.ds-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.ds-footer a { color: var(--ds-ink-dim); }
.ds-footer a:hover { color: var(--ds-gold); }

/* ---------- Forms ---------- */
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--ds-ink);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--ds-gold);
  background: rgba(255, 255, 255, 0.07);
}
.form-textarea { min-height: 140px; resize: vertical; }
.form-label {
  display: block;
  font-size: 0.82rem;
  color: var(--ds-ink-dim);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

/* ---------- Misc helpers ---------- */
.text-center { text-align: center; }
.text-gold { color: var(--ds-gold); }
.text-dim { color: var(--ds-ink-dim); }
.text-faint { color: var(--ds-ink-faint); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 24px; }
.mb-6 { margin-bottom: 40px; }
.mb-8 { margin-bottom: 56px; }
.mt-4 { margin-top: 24px; }
.mt-6 { margin-top: 40px; }
.mt-8 { margin-top: 56px; }

.lead {
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  color: var(--ds-ink-dim);
  line-height: 1.55;
  max-width: 640px;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ds-line), transparent);
  margin: 80px 0;
  border: none;
}

/* ---------- List styles ---------- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  padding: 12px 0 12px 32px;
  position: relative;
  color: var(--ds-ink-dim);
  border-bottom: 1px solid var(--ds-line);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--ds-gold);
  font-weight: 600;
}

/* ---------- FAQ accordion ---------- */
.faq-item {
  border-bottom: 1px solid var(--ds-line);
  padding: 20px 0;
}
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: 'Instrument Serif', serif;
  font-size: 1.35rem;
  color: var(--ds-ink);
  padding: 8px 0;
}
.faq-q::after {
  content: '+';
  font-size: 1.6rem;
  color: var(--ds-gold);
  transition: transform 0.3s ease;
  font-family: 'Inter', sans-serif;
}
.faq-item.open .faq-q::after {
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  color: var(--ds-ink-dim);
}
.faq-item.open .faq-a {
  max-height: 600px;
  padding: 12px 0 20px;
}

/* ---------- Skip link ---------- */
.sr-only-focusable {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only-focusable:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  width: auto;
  height: auto;
  padding: 12px 20px;
  clip: auto;
  white-space: normal;
  background: var(--ds-gold);
  color: #000;
  font-weight: 600;
  border-radius: 8px;
}

/* ---------- Focus rings ---------- */
*:focus-visible {
  outline: 2px solid var(--ds-gold);
  outline-offset: 3px;
}

/* ---------- Hamburger toggle ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ds-ink);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .ds-nav { padding: 14px 20px; position: relative; }
  .nav-toggle { display: flex; }
  .ds-nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--ds-line);
    z-index: 49;
  }
  .ds-nav-links.open { max-height: 420px; }
  .ds-nav-links a:not(.btn) {
    display: block;
    padding: 16px 24px;
    border-bottom: 1px solid var(--ds-line);
    color: var(--ds-ink-dim);
    font-size: 1rem;
  }
  .ds-nav-links .btn { margin: 16px 24px; justify-content: center; }
  .container, .container-narrow { padding: 0 20px; }
  .section { padding: 80px 0; }
  .card-pad-lg { padding: 28px; }
  .hero { min-height: auto; padding: 60px 20px; }
  .ds-footer-inner { flex-direction: column; text-align: center; }
}
