@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ============================================================
   Rise Media — Performance marketing studio
   Static dark single-scroll site

   Contents
   01. Tokens & reset
   02. Ambient background (breathing grid / diagonal lines /
       orbiting orbs / grain)
   03. Typography system
   04. Buttons
   05. Navbar
   06. Hero
   07. Marquee
   08. Sections (Services / Why / Bento / Contact / Footer)
   09. Reveal animations
   10. Reduced motion
   ============================================================ */

/* ===== 01. Tokens & reset ===== */
:root {
  --bg: #080808;
  --text: #f2efe9;
  --accent: #d1eda5;
  --accent-deep: #0d1402;
  --muted: rgba(242, 239, 233, 0.58);
  --muted-strong: rgba(242, 239, 233, 0.78);
  --border: rgba(242, 239, 233, 0.1);
  --border-strong: rgba(242, 239, 233, 0.18);
  --surface: #0e0e0e;
  --surface-2: #131313;

  --font: "Space Grotesk", system-ui, sans-serif;
  --font-alt: "Manrope", system-ui, sans-serif;

  --container: 1280px;
  --radius: 18px;
  --radius-sm: 10px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --grid-cell: 120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--accent-deep); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-deep);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

main, .footer { position: relative; z-index: 1; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}
@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }
}

section[id] { scroll-margin-top: 90px; }

/* ===== 02. Ambient background ===== */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Breathing grid — drifts and swells very slowly, 40s per direction */
.ambient-grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(242, 239, 233, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 239, 233, 0.12) 1px, transparent 1px);
  background-size: var(--grid-cell) var(--grid-cell);
  animation: grid-breathe 40s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes grid-breathe {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(36px, 24px, 0) scale(1.04); }
}

/* Thin diagonal lines — drift across the page at different speeds/angles */
.ambient-line {
  position: absolute;
  top: -60vh;
  width: 2px;
  height: 220vh;
  background: linear-gradient(to bottom,
    transparent,
    rgba(242, 239, 233, 0.18) 20%,
    rgba(242, 239, 233, 0.18) 80%,
    transparent);
  will-change: transform;
  animation: line-drift var(--dur, 60s) ease-in-out infinite alternate;
}
@keyframes line-drift {
  from { transform: rotate(var(--angle, 20deg)) translateX(-14vw); }
  to   { transform: rotate(var(--angle, 20deg)) translateX(14vw); }
}
.line-1 { left: 12%; --angle: 18deg;  --dur: 52s; }
.line-2 { left: 30%; --angle: -24deg; --dur: 64s; animation-delay: -18s; }
.line-3 { left: 55%; --angle: 35deg;  --dur: 47s; animation-delay: -30s; }
.line-4 { left: 72%; --angle: -10deg; --dur: 75s; animation-delay: -10s; }
.line-5 { left: 88%; --angle: 28deg;  --dur: 58s; animation-delay: -42s; }

/* Soft accent orbs — heavy blur, slow circular orbits */
.ambient-orb {
  position: absolute;
  width: 44vmax;
  height: 44vmax;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(209, 237, 165, 0.12), transparent 70%);
  filter: blur(80px);
  will-change: transform;
  animation: orb-orbit var(--dur, 80s) linear infinite;
}
@keyframes orb-orbit {
  from { transform: rotate(0turn) translateX(var(--radius, 10vw)) rotate(0turn); }
  to   { transform: rotate(1turn) translateX(var(--radius, 10vw)) rotate(-1turn); }
}
.orb-a { top: -10vmax; left: -8vmax;  --radius: 9vw;  --dur: 70s; }
.orb-b { top: 35vh;    right: -14vmax; --radius: 12vw; --dur: 95s; }
.orb-c { bottom: -16vmax; left: 20vw;  --radius: 8vw;  --dur: 80s; }
.orb-d { top: 50%; left: 40%; --radius: 15vw; --dur: 110s; }

/* Static grain film over everything */
.grain {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ===== 03. Typography system ===== */
h1, h2, h3 {
  font-weight: 700;
}

em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
}

p,
.eyebrow,
.nav-links,
.contact-sub,
.footer-meta,
.service-card p,
.bento-card p,
.why-item p {
  font-family: var(--font-alt);
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ===== 04. Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.32s var(--ease), color 0.32s var(--ease),
              border-color 0.32s var(--ease), box-shadow 0.32s var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
  min-height: 44px;
}
.btn svg { transition: transform 0.32s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-deep);
}
.btn-primary:hover {
  background: #e1f6b7;
  box-shadow: 0 0 0 1px rgba(209, 237, 165, 0.25), 0 14px 40px -10px rgba(209, 237, 165, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--border-strong);
  background: rgba(242, 239, 233, 0.03);
}

.btn-large {
  padding: 1.15rem 2.1rem;
  font-size: 1.05rem;
}

/* ===== 05. Navbar ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1.35rem 0;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease),
              border-color 0.4s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(8, 8, 8, 0.7);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
  padding: 0.85rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: opacity 0.3s var(--ease);
}
.logo:hover { opacity: 0.85; }

.logo-mark {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  background: var(--accent);
  color: var(--accent-deep);
  padding: 0.42rem 0.55rem;
  border-radius: 7px;
  line-height: 1;
}
.logo-mark.small {
  font-size: 0.68rem;
  padding: 0.35rem 0.48rem;
}
.logo-text {
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 2.4rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.nav-links a {
  position: relative;
  transition: color 0.25s var(--ease);
  padding: 0.3rem 0;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.32s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  min-height: 38px;
}
.nav-cta:hover {
  border-color: var(--accent);
  background: rgba(209, 237, 165, 0.08);
  color: var(--accent);
}

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ===== 06. Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  text-align: center;
  padding: 9rem 0 7rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(209, 237, 165, 0.18), transparent 60%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: blur(80px);
  will-change: transform;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-headline {
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 1.6rem 0 1.8rem;
  max-width: 17ch;
}
.headline-parallax {
  display: block;
  will-change: transform;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--muted-strong);
  max-width: 56ch;
  line-height: 1.55;
  margin: 0 auto 2.6rem;
}

.hero-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 1;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--muted-strong), transparent);
  animation: scroll-pulse 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(0.3); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}
@media (max-width: 768px) {
  .scroll-hint { display: none; }
  .hero { padding-bottom: 5rem; }
}

/* ===== 07. Marquee ===== */
.marquee {
  overflow: hidden;
  padding: 1.8rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: relative;
}
.marquee::before, .marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }

.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  font-weight: 500;
  font-size: clamp(1.4rem, 3.5vw, 2.5rem);
  letter-spacing: -0.01em;
  color: var(--text);
  animation: marquee 60s linear infinite;
  will-change: transform;
  padding-right: 2.5rem;
}
.marquee-track span { display: inline-block; flex-shrink: 0; }
.marquee-track .dot,
.marquee-track .dash { color: var(--accent); }

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-alt .marquee-track {
  animation-duration: 80s;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(0.85rem, 1.6vw, 1.15rem);
  color: var(--muted-strong);
}

/* ===== 08. Sections ===== */
.section { padding: 10rem 0; }

.section-head {
  margin-bottom: 5rem;
  max-width: 62ch;
}
.section-head .eyebrow { margin-bottom: 1.4rem; }

.section-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
}

@media (max-width: 768px) {
  .section { padding: 6rem 0; }
  .section-head { margin-bottom: 3.5rem; }
}

/* --- Services --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  position: relative;
  padding: 2.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  min-height: 340px;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(209, 237, 165, 0.12), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.service-card:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.service-card:hover::before { opacity: 1; }

.service-card > * { position: relative; z-index: 1; }

.service-num {
  font-weight: 600;
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}
.service-card h3 {
  font-size: 1.85rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}
.service-card p {
  color: var(--muted-strong);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.service-tags span {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 500;
}

/* --- Why Us --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 4rem;
}
@media (max-width: 768px) {
  .why-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.why-item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
}
.why-icon {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
  margin-bottom: 0.6rem;
}
.why-item h3 {
  font-size: 1.85rem;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.why-item p {
  color: var(--muted-strong);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 45ch;
}

/* --- Bento (Niches) --- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 1.25rem;
}
.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  overflow: hidden;
  position: relative;
}
.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom right, rgba(209, 237, 165, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.bento-card:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.bento-card:hover::before { opacity: 1; }

.bento-card > * { position: relative; z-index: 1; }
.bento-num {
  font-weight: 600;
  color: var(--accent);
  font-size: 1rem;
}
.bento-card h3 {
  font-size: 1.65rem;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 0.7rem;
}
.bento-card p {
  color: var(--muted-strong);
  font-size: 0.95rem;
  line-height: 1.55;
}
.bento-tag {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-weight: 500;
}

/* Bento layout — 4 col grid */
.bento-1 { grid-column: span 2; grid-row: span 2; }
.bento-1 h3 { font-size: 2.6rem; line-height: 1; }
.bento-1 p { font-size: 1.05rem; max-width: 40ch; }
.bento-2 { grid-column: span 2; }
.bento-3 { grid-column: span 2; }
.bento-4 { grid-column: span 1; }
.bento-5 { grid-column: span 3; }
.bento-5 h3 { font-size: 2rem; }
.bento-6 { grid-column: span 2; }
.bento-7 { grid-column: span 1; }
.bento-8 { grid-column: span 1; }
.bento-9 { grid-column: span 4; }
.bento-9 h3 { font-size: 2rem; }
.bento-9 p { max-width: 60ch; }

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(180px, auto); }
  .bento-1, .bento-2, .bento-3, .bento-4, .bento-5,
  .bento-6, .bento-7, .bento-8, .bento-9 {
    grid-column: span 2;
    grid-row: span 1;
  }
  .bento-1 h3 { font-size: 2rem; }
  .bento-5 h3, .bento-9 h3 { font-size: 1.65rem; }
}
@media (max-width: 580px) {
  .bento { grid-template-columns: 1fr; }
  .bento-1, .bento-2, .bento-3, .bento-4, .bento-5,
  .bento-6, .bento-7, .bento-8, .bento-9 { grid-column: span 1; }
}

/* --- Contact --- */
.contact {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(209, 237, 165, 0.2), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}
.contact-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact .eyebrow { margin-bottom: 1.6rem; }
.contact-headline {
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.025em;
  max-width: 16ch;
  margin-bottom: 1.8rem;
}
.contact-headline em {
  font-family: var(--font);
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
}
.contact-sub {
  color: var(--muted-strong);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  max-width: 52ch;
  line-height: 1.6;
  margin-bottom: 2.8rem;
}
.contact-meta {
  margin-top: 2.2rem;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* --- Footer --- */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-left {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.footer-wordmark {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.footer-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ===== 09. Reveal animations (JS-driven, gated by .js so no-JS sees content) ===== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(5px);
  transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out),
              filter 0.95s var(--ease-out);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ===== 10. Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
  .marquee-track,
  .scroll-line,
  .ambient-grid,
  .ambient-line,
  .ambient-orb { animation: none; }
}
